-
Notifications
You must be signed in to change notification settings - Fork 423
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
chplcheck: allow ignoring parent/child incorrect indentation using @chplcheck.ignore
#25800
Merged
DanilaFe
merged 5 commits into
chapel-lang:main
from
DanilaFe:chplcheck-ignore-incorrect-indentation
Aug 22, 2024
Merged
chplcheck: allow ignoring parent/child incorrect indentation using @chplcheck.ignore
#25800
DanilaFe
merged 5 commits into
chapel-lang:main
from
DanilaFe:chplcheck-ignore-incorrect-indentation
Aug 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ments It's unclear how to silence this for sibling statements; using attributes on either sibling doesn't seem like the right approach. Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
jabraham17
approved these changes
Aug 22, 2024
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.
Looks good!
Can you also open an issue for the feature request we discussed offline, chplcheck.ignoreAll(ruleName)
to ignore the rule in all children
Signed-off-by: Danila Fedorin <[email protected]>
Woohoo! Thanks for the quick help here, Daniel! |
bradcray
added a commit
that referenced
this pull request
Aug 26, 2024
[reviewed by @lydia-duncan] This adds and updates module index description comments in support of #25667. Here, I focused on modules I obviously own, key distributions that were lacking a description, and entries that took up multiple lines: * BlockCycDist.chpl * BlockDist.chpl * CyclicDist.chpl * PrivateDist.chpl * ReplicatedDist.chpl * StencilDist.chpl * LayoutCS.chpl * Math.chpl * OS.chpl In order to add documentation for the block and cyclic distributions, I had to add an explicit `module` keyword. This flipped it from a prototype module to a production module, popping us into Chapel's stricter error-handling mode. As a result, I had to add some new `throws` declarations to dsiSerialRead/Write routines to make them pass. Happily, since these are internal routines, it is not a breaking change. (I also removed a commented out and redundant dsiSerialWrite routine in CyclicDist.chpl). Adding the `module` keyword (but not doing any other reformatting), I broke our CI's linting of the file and didn't want to wrestle with fixing the indentation here. As a result, I applied the new attribute added by Daniel in #25800 to keep things working for the time being.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This RP allows for disabling the
IncorrectIndentation
warning for statements that are incorrectly indented relatively to their parent:This helps the case in which a previously-implicit module is converted into an explicit module.
This code:
Becomes:
Now,
foo
is incorrectly indented. To fix this, the entire file would need to be indented by two spaces, which creates a big diff and may be undesirable. By adding the ability to ignore an individual parent/child indentation violation using@chplcheck.ignore
, this PR makes it possible to silence the warnings from explicitly definingNewMod
, while preserving all other indentation warnings that had existed in the code previously (or would appear in the code in the future).This PR also adds the
chplcheck
attribute to a list of well-known tools by the compiler, in preparation of using this attribute with the standard library.Reviewed by @jabraham17 -- thanks!
Testing
test/chplcheck