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

Fix several CLS bugs #25843

Merged
merged 9 commits into from
Aug 29, 2024
Merged

Fix several CLS bugs #25843

merged 9 commits into from
Aug 29, 2024

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Aug 29, 2024

This PR fixes two CLS and adds a workaround for an existing chplcheck issue.

  • Prior to this PR, name locations where not being recorded for enum element
    enum A {
      a = 123 // the location is `a = 123`, the name location is `a`
    }
  • Prior to this PR, inherit expressions and expressions inside enum elements were not being properly scope resolved by chapel-py
    class CC { }
    class C: CC { } // now goto-def works on `CC`
    
    proc foo param do return 1;
    enum A {
      a = foo // now goto-def works on `foo`
    }
  • Prior to this PR, chplcheck would report IncorrectIndentation for if/else if chains erroneously. While that bug still exists, this PR adds a skip for else if (similar to the public/private workaround)

Tested that start_test test/chplcheck and make test-cls both work.

[Reviewed by @DanilaFe]

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 requested a review from DanilaFe August 29, 2024 15:16
Signed-off-by: Jade Abraham <[email protected]>
tools/chplcheck/src/rules.py Outdated Show resolved Hide resolved
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 merged commit 39f7d38 into chapel-lang:main Aug 29, 2024
8 checks passed
@jabraham17 jabraham17 deleted the fix-cls-bugs branch August 29, 2024 17:10
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