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 incorrect error diagnostic location parameters #31

Conversation

SasinduDilshara
Copy link
Contributor

Fixes #29

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.32%. Comparing base (5453af9) to head (5f72f90).
Report is 24 commits behind head on static-code-analysis-tool.

Additional details and impacted files
@@                       Coverage Diff                       @@
##             static-code-analysis-tool      #31      +/-   ##
===============================================================
+ Coverage                        88.95%   89.32%   +0.37%     
- Complexity                         182      197      +15     
===============================================================
  Files                               18       18              
  Lines                              706      740      +34     
  Branches                            77       79       +2     
===============================================================
+ Hits                               628      661      +33     
  Misses                              49       49              
- Partials                            29       30       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarqubecloud bot commented Nov 1, 2024

Comment on lines +48 to +50
this.location = new BLangDiagnosticLocation(lineRange.fileName(), lineRange.startLine().line() + 1,
lineRange.endLine().line() + 1, lineRange.startLine().offset() + 1, lineRange.endLine().offset() + 1,
textRange.startOffset() + 1, textRange.length());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't change this. We should change the assertion util method instead. Similar to org.ballerinalang.test.BAssertUtil#validateError(org.ballerinalang.test.CompileResult, int, java.lang.String, int, int).

@gayaldassanayake gayaldassanayake deleted the branch ballerina-platform:static-code-analysis-tool November 5, 2024 04:32
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.

3 participants