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

Resolve `--target-dir` against the current directory and reject report flags for single files

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
63/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
cli

Research direction

Start by tracing how bal scan parses --target-dir and --scan-report, then check the path resolution and standalone .bal file validation entry points. Add or update tests for paths resolved from the current directory and for usage errors when either report option is used with a standalone file. Update the release notes for the path behavior change.

Written by the indexing model from the issue text.

Description

Type/Improvement
Current Limitation
  • --target-dir is resolved against the package root, not the current directory. bal scan ../pkg --target-dir out writes to ../pkg/out, which is not what a user would expect on the command line.
  • For a standalone .bal file, --target-dir and --scan-report are ignored with a warning, and the scan continues.
Suggested Improvement
  • Resolve --target-dir against the current directory, like other path arguments. Note the change in the release notes.
  • Reject --target-dir and --scan-report on a standalone file as a usage error, instead of ignoring them.
Version

0.13.0-SNAPSHOT

Dominant language
Java
Stars
15
Forks
12
Avg merge
12h 17m
Merged PRs (30d)
13

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.