You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If tartufo is executed using multiple --config options, only the last-specified configuration file is processed.
To Reproduce
Using the tartufo repository itself as an example:
Copy the tartufo stuff out of pyproject.toml into a new foo.toml (leave all of the existing stuff alone so that what you are trying to look at doesn't get washed out with findings)
Add a new exclude-path-patterns entry such as {path-pattern = 'foo', reason = 'Testing'}, to foo.toml
Duplicate foo.toml to bar.toml, and change that new entry from foo to bar
Run tartufo -v --config foo.toml --config bar.toml scan-local-repo .
You can see in the output that the excluded paths list includes bar but not foo. Switch the order of the files and you get opposite results.
Interestingly, if you add a short exclude-entropy-patterns in foo.toml, for example:
this will get erased by bar.toml (even though bar.toml doesn't have an exclude-entropy-patterns in it), so it really is a case of "all but the last --config have no effect"
Expected Behavior
The multiple humans I have discussed this issue with expect that configuration files should be cumulative.
List-valued parameters, such as exclude-path-patterns and exclude-entropy-patterns, should be merged
Single-valued parameters, such as cleanup and entropy, should be determined by the last-specified configuration
Environment
I am reporting this problem against tartufo 4.0.1, but I believe this behavior exists in all previous versions of tartufo.
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
If tartufo is executed using multiple
--config
options, only the last-specified configuration file is processed.To Reproduce
Using the tartufo repository itself as an example:
pyproject.toml
into a newfoo.toml
(leave all of the existing stuff alone so that what you are trying to look at doesn't get washed out with findings)exclude-path-patterns
entry such as{path-pattern = 'foo', reason = 'Testing'},
tofoo.toml
foo.toml
tobar.toml
, and change that new entry fromfoo
tobar
tartufo -v --config foo.toml --config bar.toml scan-local-repo .
You can see in the output that the excluded paths list includes bar but not foo. Switch the order of the files and you get opposite results.
Interestingly, if you add a short
exclude-entropy-patterns
infoo.toml
, for example:this will get erased by
bar.toml
(even thoughbar.toml
doesn't have anexclude-entropy-patterns
in it), so it really is a case of "all but the last --config have no effect"Expected Behavior
The multiple humans I have discussed this issue with expect that configuration files should be cumulative.
exclude-path-patterns
andexclude-entropy-patterns
, should be mergedcleanup
andentropy
, should be determined by the last-specified configurationEnvironment
I am reporting this problem against tartufo 4.0.1, but I believe this behavior exists in all previous versions of tartufo.
The text was updated successfully, but these errors were encountered: