Skip to content

Commit

Permalink
Add .NET packages.lock.json to is_lock_file filter (#593)
Browse files Browse the repository at this point in the history
* Add .NET packages.lock.json to is_lock_file filter

* Add trailing comma

* Fix "E275 missing whitespace after keyword"
  • Loading branch information
Mikael Berrin committed Aug 25, 2022
1 parent 88a3fc1 commit e61b9f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions detect_secrets/filters/heuristic.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def is_lock_file(filename: str) -> bool:
'Pipfile.lock',
'poetry.lock',
'Cargo.lock',
'packages.lock.json',
}


Expand Down
3 changes: 2 additions & 1 deletion tests/filters/heuristic_filter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ def test_is_indirect_reference(line, result):


def test_is_lock_file():
# Basic test
# Basic tests
assert filters.heuristic.is_lock_file('composer.lock')
assert filters.heuristic.is_lock_file('packages.lock.json')

# file path
assert filters.heuristic.is_lock_file('path/yarn.lock')
Expand Down

0 comments on commit e61b9f9

Please sign in to comment.