Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --gitignore option #337

Open
azu opened this issue Nov 19, 2022 · 1 comment
Open

Add --gitignore option #337

azu opened this issue Nov 19, 2022 · 1 comment
Labels
Status: Proposal Request for comments

Comments

@azu
Copy link
Member

azu commented Nov 19, 2022

Summary

Secretlint has used globby and globby has gitignore option.

It is useful that user can use secretlint --gitignore "**/*" instead of secretlint --secretlintignore .gitignore "**/*".

Basic example

If use want to respect gitinore, --gitignore enable this feature.

# respect .secretlintignore and .gitignore
$ secretlint --gitignore  "**/*"

This feature should be opt-in, as some secrets may already be included under git.

Ref #204 (comment)

Motivation

secretlint --secretlintignore .gitignore is not intuitive.
Also, secretlint --secretlintignore .gitignore disable .secretlintignore
secretlint --gitignore respects .gitignore and .secretlintignore.

Additionally, gitignore option will cover edge case. It is more safe.

Naming

We need to think easy to understand name.

  • --gitignore: Respect .gitignore file

Another option:

globby has ignoreFiles option.

Memo

I do not known if the gitignore option respects cascaded .gitignore files.

@azu azu added the Status: Proposal Request for comments label Nov 19, 2022
@azu azu mentioned this issue Nov 19, 2022
@azu
Copy link
Member Author

azu commented Nov 19, 2022

📝 I received a message that current secretlint --secretlintignore .gitignore is something wrong.
https://twitter.com/takeokunn/status/1581667659329855488
This feature may resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Proposal Request for comments
Projects
None yet
Development

No branches or pull requests

1 participant