Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caches work incorrectly: additionalEditorconfig should be @Input instead of @Internal #750

Closed
m-burst opened this issue Feb 23, 2024 · 3 comments · Fixed by #758
Closed

Comments

@m-burst
Copy link
Contributor

m-burst commented Feb 23, 2024

Steps to reproduce:

  1. Write some code with ktlint violations
  2. Run ktlint via plugin with enabled build cache
  3. Disable the violated rule using additionalEditorconfig
  4. Run ktlint again with enabled build cache

Expected behaviour: ktlint will be re-run with updated editorconfig and will not report the violations

Actual behaviour: ktlint will use the cached result

As far as I understand, the cause of this is that BaseKtLintCheckTask.additionalEditorconfig is not checked when computing cache keys for the task because it is marked as @Internal, and should be @Input instead.

Unless there are any reasons for this property being @Internal, I would gladly submit a PR changing it to @Input.

@wakingrufus
Copy link
Collaborator

I would love a PR for this. There should be some tests already that are fairly similar you can copy from to get started on your test. Let me know if you get stuck and I can assist.

@m-burst
Copy link
Contributor Author

m-burst commented Apr 2, 2024

I finally got around to this and opened #758. Could you please take a look?

wakingrufus pushed a commit that referenced this issue Apr 4, 2024
@m-burst
Copy link
Contributor Author

m-burst commented Apr 5, 2024

Thanks for reviewing and merging!
Do you have any plans to cut a release sometime soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants