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

Add new lint rule flavor, @location_rule #26191

Merged
merged 18 commits into from
Dec 16, 2024

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Oct 31, 2024

Adds a new chplcheck lint rule flavor, called @location_rule. This allows rule authors and users to write purely text based lint rules.

This PR then uses that functionality to implement a proper LineLength lint rule that defaults to 80 characters, but can be configured as users desire.

Subsumes #25938 and resolves #25220

[Reviewed by @DanilaFe]

jabraham17 added a commit that referenced this pull request Dec 10, 2024
Expands chplcheck rule capabilities by allowing rules to specify extra
settings to make them more configurable. This allows users to specify
additional arguments to rules to better configure them to suit their
needs.

No new rules are added in this PR, this just lays the foundation for
future work (see #26191)

[Reviewed by @DanilaFe]
@jabraham17 jabraham17 marked this pull request as ready for review December 12, 2024 00:11
@jabraham17 jabraham17 requested a review from DanilaFe December 12, 2024 00:12
test/chplcheck/PREDIFF Outdated Show resolved Hide resolved
test/chplcheck/Unused.chpl Outdated Show resolved Hide resolved
test/chplcheck/allrules.prediff Outdated Show resolved Hide resolved
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
@jabraham17 jabraham17 merged commit 5a4520d into chapel-lang:main Dec 16, 2024
8 checks passed
@jabraham17 jabraham17 deleted the add-freeform branch December 16, 2024 17:02
jabraham17 added a commit that referenced this pull request Jan 6, 2025
Fixes the location reporting for AstNode's that have name locations. A
previous [PR](#26191) had
accidentally broken this functionality,m this PR restores it.

Testing
- [x] ran `start_test test/chplcheck`

[Reviewed by @DanilaFe]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Lint rule for line length
2 participants