aspect-build / aspect-build/aspect-cli

[FR]: Change exit code when linting requested but no lintable targets provided

Open Beginner friendly
#1,341 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Starlark
Stars
165
Forks
45
Avg merge
1d 47m
Merged PRs (30d)
35

Description

### What is the current behavior?

When running `aspect lint` and providing an explicit list of targets, the process will exit with 1 if no lint-able targets were specified.

### Describe the feature

The request here is to change the exit code to 4, [matching the behaviour of `bazel test`](https://bazel.build/run/scripts) when testing is requested but no test targets are specified.

Original slack thread: https://bazelbuild.slack.com/archives/C04281DTLH0/p1784137418806149

Contributor guide

No contributing guide indexed for this repository

Research direction

Run `aspect lint` with an explicit target list containing no lintable targets and compare the result with `bazel test` when no test targets are specified. Trace the lint command's exit-code handling and add or update a regression test so the no-lintable-target case exits 4 while normal lint behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.