Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Rename `--format` to `--report-format` and align its values and default

Open
#132 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
cli, tooling

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

Type/Improvement
Current Limitation
  • --format is 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 default json. The code accepts ballerina|json|sarif, describes the default as ballerina, and defaults to BALLERINA.
  • An invalid value leaks Java internals: invalid value for option '--format': cannot convert 'xml' to ReportFormat (java.lang.IllegalArgumentException: Unknown report format: xml). The invalid.format message in scan.properties is 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 --format as a hidden, deprecated alias for one release.
  • Decide whether ballerina stays as a value. If it is the same as json, drop it from the code.
  • Report an invalid value as a usage error: invalid report format 'xml'; supported formats are json, sarif.
  • Rename --scan-report to --html-report, with --scan-report kept as a deprecated alias. Alternatively, fold it into --report-format if 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ballerina-platform/static-code-analysis-tool

All issues in ballerina-platform/static-code-analysis-tool

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.