Merged
Conversation
TharmiganK
commented
Oct 17, 2025
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #613 +/- ##
============================================
- Coverage 82.32% 82.03% -0.30%
- Complexity 241 369 +128
============================================
Files 29 41 +12
Lines 1375 1714 +339
Branches 191 266 +75
============================================
+ Hits 1132 1406 +274
- Misses 196 215 +19
- Partials 47 93 +46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
57a579f to
ba004dc
Compare
daneshk
previously approved these changes
Oct 17, 2025
4f94f61 to
b673aed
Compare
daneshk
previously approved these changes
Oct 20, 2025
|
daneshk
approved these changes
Oct 21, 2025
TharmiganK
added a commit
that referenced
this pull request
Oct 21, 2025
* Refactor static code rule implementation * Update spec with scan rules * Update changelog * Address sonar cloud reported issues * Add enable code coverage report for compiler plugin * Bump to the next minor version * [Automated] Update the native jar versions * Improve code coverage * Update AES encryption example from CCM to CBC * Fix reference to SHA256 in password hashing function (cherry picked from commit cf1437f)
randilt
pushed a commit
to randilt/module-ballerina-crypto
that referenced
this pull request
Dec 7, 2025
* Refactor static code rule implementation * Update spec with scan rules * Update changelog * Address sonar cloud reported issues * Add enable code coverage report for compiler plugin * Bump to the next minor version * [Automated] Update the native jar versions * Improve code coverage * Update AES encryption example from CCM to CBC * Fix reference to SHA256 in password hashing function
This file contains hidden or 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
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.



Purpose
Fixes:
ballerina-platform/ballerina-library#8354
Fixed issues:
referencesAPI to check whether the value is modified. But this is not ideal since if the variable is even used without reassignment or modification, it can be referenced. Ideal solution would be navigate to the references and check the nodes. But this is a very complex process. Hence, used an analysis based on the global and local block scopes to find the modifications or reassignments. Yet, any blocks like if, match, etc. can change the values, so avoided to resolve the variable declaration finding if we encounter any block statements. This is the least intrusive option.Examples
N/A
Checklist
Checked native-image compatibility