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

Failing check for SpacingBetweenPackageAndImports issues contained in baseline 1.19.0 #4537

Closed
richdapice opened this issue Jan 27, 2022 Discussed in #4532 · 2 comments · Fixed by #4548
Closed

Failing check for SpacingBetweenPackageAndImports issues contained in baseline 1.19.0 #4537

richdapice opened this issue Jan 27, 2022 Discussed in #4532 · 2 comments · Fixed by #4548
Labels

Comments

@richdapice
Copy link

richdapice commented Jan 27, 2022

Expected Behavior

SpacingBetweenPackageAndImports issues that are added to the baseline should not fail when running detekt.

Observed Behavior

The issue is in the baseline <ID>SpacingBetweenPackageAndImports:HttpClient.kt$ </ID>

But the check fails for the issue SpacingBetweenPackageAndImports - [HttpClient.kt]

Steps to Reproduce

  1. Add SpacingBetweenPackageAndImports issue to .kt file that is included in the detekt baseline.
  2. Run baseline.
  3. Observe baseline has the ID for the issue.
  4. Run the check, observe failure.

Your Environment

Version of detekt used: 1.19.0
Version of Gradle used (if applicable): 7.0.4

Discussed in #4532

Originally posted by richdapice January 26, 2022
I recently upgraded to 1.19.0 and updated my rules as well, although I already had SpacingBetweenPackageAndImports and MaxLineLength and they were both active.

I am able to generate a baseline file after deleting the previous baseline I see it being created. The problem is, after generating the baseline I run my check but I fail for issues that ARE IN the baseline.

SpacingBetweenPackageAndImports - [HttpClient.kt] - Log

<ID>SpacingBetweenPackageAndImports:HttpClient.kt$ </ID> - baseline.xml

I have checked my detekt configuration multiple times and wasn't having this issue before the update.
I am failing the check locally and as a GitHub action.

Thanks!

Links

Caused by #4335
Related to #4504

@BraisGabin BraisGabin added the bug label Jan 28, 2022
@BraisGabin
Copy link
Member

Maybe we should revert #4335. This was kind of a best effert to allow auto-format the baseline but we know that not any format is supported by detekt right now.

@cortinico
Copy link
Member

Maybe we should revert #4335

That's a good call 👍

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

Successfully merging a pull request may close this issue.

3 participants