-
Notifications
You must be signed in to change notification settings - Fork 5
Add lint-configuration through comments #126
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
base: main
Are you sure you want to change the base?
Conversation
JonatanWaern
commented
Jul 18, 2025
- Clean trailing whitespace
- Dont move string for begin_style_check
- Re-enable main lint test
- Add support for lint configuration annotations in comments
- Introduce the USAGE.md file
Fixes #121 |
@jvsqzj your insight is valuable here, as well, if you have any thoughts on this |
185ed42
to
9d4b75f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave it up to you if you want to wait for further reviewing before merging.
21b523f
to
f61f217
Compare
@anankos-intel any opinions/suggestions on syntax for this? |
Signed-off-by: Jonatan Waern <[email protected]>
Signed-off-by: Jonatan Waern <[email protected]>
Signed-off-by: Jonatan Waern <[email protected]>
f61f217
to
66e29b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for lint configuration through inline comments, allowing users to disable specific linting rules on a per-file or per-line basis. It also includes code cleanup and re-enables a main lint test.
- Introduces lint annotation syntax
// dls-lint: <command>=<target>
with support forallow
andallow-file
commands - Adds comprehensive parsing and validation for lint annotations with proper error reporting
- Implements
FromStr
trait forRuleType
enum to enable string-to-rule conversion
Reviewed Changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/lint/rules/tests/mod.rs | Changed common module visibility to public |
src/lint/rules/tests/common.rs | Updated function signature to use string slice and removed unnecessary clones |
src/lint/rules/mod.rs | Added Copy trait and Configuration variant to RuleType, implemented FromStr |
src/lint/mod.rs | Core implementation of lint annotation parsing, filtering, and integration |
USAGE.md | Added comprehensive documentation for inline lint configuration feature |
README.md | Updated to reference the new USAGE.md file |
CHANGELOG.md | Added entry documenting the new lint annotation feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Jonatan Waern <[email protected]>
Signed-off-by: Jonatan Waern <[email protected]>
66e29b9
to
f6f5e17
Compare