Fix line coverage in html#61
Merged
gayaldassanayake merged 1 commit intoballerina-platform:mainfrom May 31, 2025
Merged
Conversation
8 tasks
SasinduDilshara
previously approved these changes
May 21, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR enhances HTML line highlighting to cover full issue ranges, adjusts issue reporting to pinpoint the visibility token, and bumps version identifiers.
- Highlight all lines between an issue’s start and end in
SingleFileContent.jsxinstead of a single line. - Report issues at the exact visibility token in
StaticCodeAnalyzer.javaand update related tests for rules 3–6. - Bump project versions to
0.9.1-SNAPSHOTand update HTML report fixtures to reference the new bundle names.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| static-code-analysis-report/src/components/SingleFileContent.jsx | Iterate over full line ranges for each issue, with validation |
| static-code-analysis-report/src/main/java/io/ballerina/scan/internal/StaticCodeAnalyzer.java | Report issues at the public token and introduce getQualifier |
| scan-command/.../Rule003And004Test.java | Adjust expected line numbers to only the definition line |
| scan-command/.../Rule005And006Test.java | Adjust expected line numbers to only the definition line |
| static-code-analysis-report/package.json | Version bumped to 0.9.1-SNAPSHOT |
| scan-command/tool-scan/Dependencies.toml | Version bumped to 0.9.1-SNAPSHOT |
| scan-command/tool-scan/Ballerina.toml | Version bumped to 0.9.1-SNAPSHOT |
| scan-command/tool-scan/BalTool.toml | JAR path updated to 0.9.1-SNAPSHOT |
| scan-command/.../issues-html-report.txt (windows/unix/common) | Updated script filename hashes in fixtures |
Comments suppressed due to low confidence (1)
static-code-analysis-report/src/components/SingleFileContent.jsx:10
- The new multi-line highlighting and the invalid-range error branch aren’t covered by existing tests. Consider adding unit tests for both happy-path and error-handling behaviors.
useEffect(() => {
dd665ae to
5af4aaf
Compare
5af4aaf to
f1bd5a5
Compare
|
SasinduDilshara
approved these changes
May 30, 2025
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 #29
Approach
It looks as follows now.
Check List