detect-secrets-server
detect-secrets-server copied to clipboard
Fix exclude_regex functionality (Issue 17)
Addresses https://github.com/Yelp/detect-secrets-server/issues/17 and https://github.com/Yelp/detect-secrets-server/issues/44
Removes exclude_regex from tracked repo metadata and config yaml add and replaces with an exclude_files_regex and exclude_lines_regex. CLI args are appended to the repo args (but are not overwritten in tracked repo metadata).
Thanks so much for making this! 🙏 I will take a look at it this weekend
(Gonna review after Tavis passes currently get a
self.add_non_local_repo(mock_rootdir)
> assert not mock_file_operations.write.called
E AssertionError: assert not True
E + where True = <MagicMock name='open().write' id='139948498142936'>.called
E + where <MagicMock name='open().write' id='139948498142936'> = <MagicMock name='open()' id='139948498142488'>.write
tests/actions/initialize_test.py:243: AssertionError
===================== 1 failed, 97 passed in 1.22 seconds ======================
I think)
(Gonna review after Tavis passes currently get a
self.add_non_local_repo(mock_rootdir) > assert not mock_file_operations.write.called E AssertionError: assert not True E + where True = <MagicMock name='open().write' id='139948498142936'>.called E + where <MagicMock name='open().write' id='139948498142936'> = <MagicMock name='open()' id='139948498142488'>.write tests/actions/initialize_test.py:243: AssertionError ===================== 1 failed, 97 passed in 1.22 seconds ======================I think)
Similar test case modification for the empty repo PR #46. Will open a new issue to handle overriding globally because maybe someone wants to not always override?
Looks like this PR pushed us under 93% coverage in Travis:
ERROR: InvocationError for command /home/travis/build/Yelp/detect-secrets-server/.tox/pypy/bin/coverage report --show-missing '--include=detect_secrets_server/*' --fail-under 93 (exited with code 2)