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

feat(scan): consider .gitignore to automatically exclude paths by default #5506

Merged
merged 13 commits into from
Jul 29, 2022

Conversation

rafaela-soares
Copy link
Contributor

Issue #4584 will be closed when the branch release/1.6 is merged into the master.

Proposed Changes

  • consider .gitignore to automatically exclude paths by default

I submit this contribution under the Apache-2.0 license.

@rafaela-soares rafaela-soares added feature request Community: new feature request go Pull requests that update Go code labels Jun 21, 2022
@rafaela-soares rafaela-soares self-assigned this Jun 21, 2022
@rafaela-soares rafaela-soares marked this pull request as draft June 22, 2022 07:59
@roi-orca
Copy link
Contributor

@rafaela-soares I would suggest having the default behavior as of today, meaning .gitignore content will be taken into consideration as part of the scan, and the newly added flag, which can be called "--include-gitignore" will exclude the content from the scan.

If we do that, we do not break the current usage of the CLI, and we are having a "strict by default" approach

Copy link
Collaborator

@nunoocx nunoocx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review the suggestions

@rafaela-soares
Copy link
Contributor Author

@rafaela-soares I would suggest having the default behavior as of today, meaning .gitignore content will be taken into consideration as part of the scan, and the newly added flag, which can be called "--include-gitignore" will exclude the content from the scan.

If we do that, we do not break the current usage of the CLI, and we are having a "strict by default" approach

Hello, @roi-orca!

Thank you so much for being involved in this question and for your suggestion.

It was a product decision to exclude paths specified within .gitignore file by default. A few users suggested that since the .gitignore file presents the files that will be not committed. Since it can be considered a breaking change, this new behavior will be only included from version 1.6. To disable this behavior, you can use flag --add-gitignore.

@rafaela-soares rafaela-soares marked this pull request as ready for review July 19, 2022 09:12
@rafaela-soares rafaela-soares requested a review from nunoocx July 19, 2022 09:15
Copy link
Collaborator

@nunoocx nunoocx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@rafaela-soares rafaela-soares merged commit 8f56be6 into release/1.6 Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Community: new feature request go Pull requests that update Go code release/1.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants