Skip to content

Fix #484: skipping behavior for multi-location errors#485

Draft
kluhan wants to merge 2 commits intocodefori:mainfrom
Inventegrate:fix/linter-skip-multi-location-error
Draft

Fix #484: skipping behavior for multi-location errors#485
kluhan wants to merge 2 commits intocodefori:mainfrom
Inventegrate:fix/linter-skip-multi-location-error

Conversation

@kluhan
Copy link
Copy Markdown

@kluhan kluhan commented Mar 2, 2026

Changes

  • Fixed @rpglint-skip to properly suppress errors with multiple locations.
  • Introduced pushErrorIfNotSkipped to simplify error handling across existing rules.

Tests

  • Added unit tests for skip behavior with repeated literals.
  • Verified skipped ranges don’t suppress unrelated errors.

Why It Matters

Previously, some errors (like variable casing) weren’t suppressed on second-pass checks. This unifies skip logic, ensures consistent suppression, and enables future directives like @rpglint-skip: StringLiteralDupe without extra complexity.

@kluhan
Copy link
Copy Markdown
Author

kluhan commented Mar 3, 2026

@worksofliam Could you help clarify the difference between @rpglint-skip-rules and @rpglint-skip?
I’ve checked the documentation but couldn’t find anything, and from what I can see in the code, they appear to behave the same.
Currently, my fix applies only to @rpglint-skip.

@kluhan kluhan changed the title Fix skipping behavior for multi-location errors (#484) Fix #484: skipping behavior for multi-location errors Mar 3, 2026
Copy link
Copy Markdown
Member

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kluhan

To me it's like this:

  • @rpglint-skip skips both rules and indentation checks
  • @rpglint-skip-rules skips all rules but indentation
  • @rpglint-skip-indent skils indent checking, but checks all other rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants