Accumulate multiple uses of --instrumentation_filter cli flag
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
Multiple uses of [—instrumentation_filter ](https://bazel.build/reference/command-line-reference#flag--instrumentation_filter)cli flag aren’t accumulated. This makes it difficult to have short hand config for a combination of coverage flags in a bazelrc file. e.g.,
```
build:covA --flagA --instrumentation_filter=afoo/abar,-afoo/abaz
build:covB --flagB --instrumentation_filter=bfoo/bbar,-bfoo/bbaz
build:covAB --flagA --flagB --instrumentation_filter=afoo/abar,-afoo/abaz,bfoo/bbar,-bfoo/bbaz # Filters list need to be created again
```
If --instrumentation_filter has the ability to accumulate multiple uses, having coverage for a combination of flags would have been as simple as,
```
build:covAB --config covA --config covB
```
Hence the feature being requested is to accumulate multiple uses of `--instrumentation_filter` cli flag.
### Which category does this issue belong to?
Configurability
### What underlying problem are you trying to solve with this feature?
Please see Description.
### Which operating system are you running Bazel on?
Linux
### What is the output of `bazel info release`?
release 7.2.1
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
https://bazelbuild.slack.com/archives/CA31HN1T3/p1720168700052469
Contributor guide
Research direction
No source file or test is named. Start by searching the Bazel repository for `instrumentation_filter` and inspect how repeated command-line and bazelrc options are parsed and applied. Done means separate `--instrumentation_filter` uses combine so `--config covA --config covB` behaves like the explicitly combined filter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100