Rename `--format` to `--report-format` and align its values and default
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start at the CLI option definitions and the report format conversion code, then read the scan.properties messages and existing option tests. Check how --format and --scan-report are parsed and documented. Done means the format names, defaults, aliases, and invalid value error follow one chosen behavior, with tests covering those cases.
Written by the indexing model from the issue text.
Description
Current Limitation
--formatis a generic name for what is the report file format, and is easy to confuse with an output format option.- The help and the code disagree. The help lists
--format=<json|sarif>with defaultjson. The code acceptsballerina|json|sarif, describes the default asballerina, and defaults toBALLERINA. - An invalid value leaks Java internals:
invalid value for option '--format': cannot convert 'xml' to ReportFormat (java.lang.IllegalArgumentException: Unknown report format: xml). Theinvalid.formatmessage inscan.propertiesis never used. - The HTML report is selected with a separate boolean,
--scan-report, whose name does not say what it produces.
Suggested Improvement
- Rename the option to
--report-format <json|sarif>, with one documented default. Keep--formatas a hidden, deprecated alias for one release. - Decide whether
ballerinastays as a value. If it is the same asjson, drop it from the code. - Report an invalid value as a usage error:
invalid report format 'xml'; supported formats are json, sarif. - Rename
--scan-reportto--html-report, with--scan-reportkept as a deprecated alias. Alternatively, fold it into--report-formatif more than one format may be selected.
Version
0.13.0-SNAPSHOT
- Dominant language
- Java
- Stars
- 15
- Forks
- 12
- Avg merge
- 11h 57m
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ballerina-platform/static-code-analysis-tool
-
Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ballerina-platform/static-code-analysis-tool#140 ·
Maintainers usually reply within 1 day
-
Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ballerina-platform/static-code-analysis-tool#139 ·
Maintainers usually reply within 1 day
-
Type/Improvement
Difficulty 3/5 1-2 days Newbie friendliness 62/100
ballerina-platform/static-code-analysis-tool#138 ·
Maintainers usually reply within 1 day
-
Type/Improvement
Difficulty 3/5 1-2 days Newbie friendliness 63/100
ballerina-platform/static-code-analysis-tool#137 ·
Maintainers usually reply within 1 day
-
Type/Improvement
Difficulty 3/5 1-2 days Newbie friendliness 62/100
ballerina-platform/static-code-analysis-tool#136 ·
Maintainers usually reply within 1 day
All issues in ballerina-platform/static-code-analysis-tool
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Dans-Plugins/Medieval-Roleplay-Engine#384 ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
:Search Relevance/Vectors >test-failure needs:risk Team:Search Relevance
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
elastic/elasticsearch#163668 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug critical
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
agent:working bug follow-up lane:auto
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Sanne/incus-spawn#1765 · 2 comments ·
Maintainers usually reply within 1 day