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

bug fix: upgrading from v0.12-0.14 incorrectly handles exclude_regex #446

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

domanchi
Copy link
Contributor

@domanchi domanchi commented Apr 8, 2021

This is a suboptimal patch, but is the best that we can do.

In older versions, it looks like exclude_regex deals with files, not lines (source). This change modifies the auto-upgrade script to handle this properly for all other users who haven't upgraded yet.

However, for those users who upgraded their baselines between <0.12 and =~1.0, they will need to apply the change manually. This is because once this change has been made, we cannot assume that the regex that applies to lines should have been applied to files (as new --exclude-line regexes could have been applied). As such, there's no automated manner to upgrade this. ☹️

Kudos to @calvinli for finding this one.

Copy link
Member

@calvinli calvinli left a comment

Choose a reason for hiding this comment

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

As you point out this is a breaking change, hopefully not too bad though?

@domanchi domanchi merged commit e2a5e36 into master Apr 8, 2021
killuazhu pushed a commit to IBM/detect-secrets that referenced this pull request Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants