tartufo icon indicating copy to clipboard operation
tartufo copied to clipboard

Output contains duplicate entries in excluded_paths

Open davidrmcharles opened this issue 3 years ago • 1 comments

I see these duplicate entries in the output of tartufo:

  . . .
  "excluded_paths": [
    "tartufo.toml",
    "test/data",
    "tartufo.toml",
    "test/data"
  ],
  . . .

When I invoke tartufo like this:

$ tartufo --regex --json scan-local-repo . > build/tartufo.json

With this tartufo.toml file:

$ cat tartufo.toml 
[tool.tartufo]
exclude-paths = 'tartufo.exclude-paths'

And this tartufo.exclude-paths file:

tartufo.toml
test/data

davidrmcharles avatar Mar 09 '21 14:03 davidrmcharles

FWIW I get the same problem with this:

[tool.tartufo]
json = true
regex = true
entropy = true
exclude-paths = ".tartufo-excludes"

and this in .tartufo-excludes

^tartufo\.toml$

then a tartufo scan-local-repo --no-fetch . yields:

  "excluded_paths": [
    "^tartufo\\.toml$",
    "^tartufo\\.toml$"
  ],

but if I run tartufo pre-commit then it doesn't show duplicates:

  "excluded_paths": [
    "^tartufo\\.toml$",
  ],

pmevzek-godaddy avatar Mar 12 '21 22:03 pmevzek-godaddy