Skip to content

CLS/chplcheck: Support editor agnostic configuration files #26978

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

Merged
merged 12 commits into from
Apr 8, 2025

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Mar 24, 2025

This PR expands the existing support for using ConfigArgParse to allow for editor-agnostic configuration files. This allows users to specify options for their project in an editor-agnostic way, and then allow CLS/chplcheck to auto-pick them up.

This also integrates nicely with Mason, allowing users to specify CLS/chplcheck options in a Mason.toml file. For example

[brick]
...

[tool.chplcheck]
disable-rule = ["UnusedLoopIndex"]

This PR also expands the options for chplcheck, allowing the following

...

[tool.chplcheck]
file = ["src/*.chpl"]
add-rules = ["lint/rules.py"]
disable-rule = ["IncorrectIndentation"]

This lets users specify all the options needed in 1 file, and then from the project root running just chplcheck does the right thing

This PR also adds the -M/--module-dir options to CLS, allowing users to add a few paths to the module search path instead of needing a full .cls-commands file. This also includes adding an internal, developer only, ability to set the root directory for standard modules.

  • paratest with/without gasnet

[Reviewed by @DanilaFe]

@jabraham17 jabraham17 marked this pull request as draft March 24, 2025 21:15
@jabraham17 jabraham17 force-pushed the cls-chplcheck-cfg branch 2 times, most recently from 7eea477 to 4da2dd2 Compare March 28, 2025 18:47
@jabraham17 jabraham17 marked this pull request as ready for review March 28, 2025 19:14
@jabraham17 jabraham17 requested a review from DanilaFe March 28, 2025 19:38
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 merged commit f53b87f into chapel-lang:main Apr 8, 2025
11 checks passed
@jabraham17 jabraham17 deleted the cls-chplcheck-cfg branch April 8, 2025 22:21
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