Parse .gitignore
See original GitHub issueSummary
It would be ideal to respect .gitignore
by default, ignoring the same files that Git does.
Motivation
Files that match patterns in .gitignore
are unlikely to be committed to the repository, which is what Secretlint intends to prevent when it detects secrets. Presently, one generally has to duplicate .gitignore
in .secretlintignore
unless they are identical, in which case one can configure Secretlint to use .gitignore
directly.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
parse-gitignore
Parse a .gitignore or .npmignore file into an array of patterns.. Latest version: 2.0.0, last published: 7 months ago.
Read more >gitignore-parser
A spec-compliant gitignore parser for Python 3.5+. https://github.com/mherrmann/gitignore_parser. Project details. Project links. Homepage. Statistics.
Read more >Parse a gitignore file into an array of patterns. Comments ...
As of v1.0, parse-gitignore was refactored and simplified down to less than ~50 sloc and no dependencies to provide a quick and easy...
Read more >Parse::Gitignore
NAME. Parse::Gitignore - parse .gitignore files. SYNOPSIS. produces output. (This example is included as synopsis.pl in the distribution.) VERSION.
Read more >Parse-gitignore NPM | npm.io
Parse a .gitignore or .npmignore file into an array of patterns. Please consider following this project's author, Jon Schlinkert, and consider starring the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sanmai-NL I agree. It is reasonable.
I think that respecting
.gitignore
is opt-in feature. I close this issue, and open new issue.I think it’s not wise to partly or fully equate
.gitignore
with.secretlintignore
. Should any secret be committed that is covered by.gitignore
, then that secret won’t be detected. The whole point of the secrets leak risk is that they can inadvertently end up under version control. Indeed, only a few lines pertaining to secret files from the.gitignore
should be included in.secretlintignore
.