thoughtworks / talisman

Using a pre-commit hook, Talisman validates the outgoing changeset for things that look suspicious — such as tokens, passwords, and private keys.
https://thoughtworks.github.io/talisman/
MIT License
1.91k stars 241 forks source link

Allow set SEARCH_ROOT outside the script #349

Closed darakeon closed 2 years ago

darakeon commented 2 years ago

This is for allowing the script to be used inside automated environment, instead of someone manually installing talisman

codecov[bot] commented 2 years ago

Codecov Report

Merging #349 (d8f87ab) into master (17575b5) will decrease coverage by 2.48%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #349      +/-   ##
==========================================
- Coverage   72.29%   69.81%   -2.49%     
==========================================
  Files          31       33       +2     
  Lines        1451     1557     +106     
==========================================
+ Hits         1049     1087      +38     
- Misses        365      438      +73     
+ Partials       37       32       -5     
Impacted Files Coverage Δ
utility/sha_256_hasher.go 37.73% <0.00%> (-62.27%) :arrow_down:
scanner/scanner.go 15.09% <0.00%> (-3.09%) :arrow_down:
cmd/pattern_cmd.go 100.00% <0.00%> (ø)
gitrepo/git_readers.go 0.00% <0.00%> (ø)
utility/progress_bar.go 45.00% <0.00%> (ø)
cmd/runner.go 83.33% <0.00%> (+0.72%) :arrow_up:
talismanrc/entry-point.go 78.94% <0.00%> (+1.16%) :arrow_up:
cmd/scanner_cmd.go 86.36% <0.00%> (+1.36%) :arrow_up:
gitrepo/gitrepo.go 77.65% <0.00%> (+2.39%) :arrow_up:
detector/helpers/detection_results.go 60.84% <0.00%> (+7.82%) :arrow_up:
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 17575b5...d8f87ab. Read the comment docs.

darakeon commented 2 years ago

@tinamthomas , did I broke the coverage? My change should not break this much