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

Filter for scripts has substring bug #6

Open
havanagrawal opened this issue Aug 24, 2019 · 0 comments
Open

Filter for scripts has substring bug #6

havanagrawal opened this issue Aug 24, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@havanagrawal
Copy link
Owner

Problem

One of the options for scripts is --filter which can accept property IDs such as P143. However, the way we check this has a bug, where it will also match properties such as P1436.

def should_fix(fix, filters):
    return any(filter in fix.summary for filter in filters)

Proposed Solution

Split the summary by spaces (and other token characters), and then for each filter, check containment, instead of checking the string directly.

@havanagrawal havanagrawal self-assigned this Aug 24, 2019
@havanagrawal havanagrawal added the bug Something isn't working label Aug 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant