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

reported depths do not reflect any changes made during the same run #300

Closed
RBusarow opened this issue Nov 23, 2021 · 0 comments · Fixed by #331
Closed

reported depths do not reflect any changes made during the same run #300

RBusarow opened this issue Nov 23, 2021 · 0 comments · Fixed by #331
Labels
bug Something isn't working

Comments

@RBusarow
Copy link
Member

RBusarow commented Nov 23, 2021

If executing moduleCheckAuto with depths enabled, the reported depths will reflect the state of the project before any fixes were applied for the other rules.

One possible fix would be to have the FindingFactory differentiate between rules which may apply fixes and those which are report-only. This could be done by tagging the rules with a marker interface like ReportOnly.

If auto-correct is enabled, then the runner can run the rules which apply fixes first, then take a second pass (everything's cached anyway) for the report-only rules.

If auto-correct is disabled, then everything can be run at once.

DepthRule is currently the only one that is strictly report-only, and on a 300 module project, it executes in under a second. Running it in a second pass should have a very negligible performance impact.

@RBusarow RBusarow added the bug Something isn't working label Nov 23, 2021
RBusarow added a commit that referenced this issue Dec 4, 2021
@kodiakhq kodiakhq bot closed this as completed in #331 Dec 4, 2021
kodiakhq bot pushed a commit that referenced this issue Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant