Change naming linting for extern symbols #26598
Merged
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.
Fixes how we lint extern symbols in chplcheck for name violations.
Extern symbols should not be linted for name violations, because they typically come from another language that has different naming conventions. Furthermore, the user may have no control over the type name (i.e. using a third-party library).
chplcheck
already handled this correctly for functions and variables/types, but not for records. This PR rectifies that.This PR also adds an opt-out, if the user has renamed their symbol, then they do have full control of the name and this PR turns on linting in that case. In the following program, we should lint the name
chapelFunc
, because that's a name picked by the user and not relevant to the external name.start_test test/chplcheck
[Reviewed by @brandon-neth]