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

Updating --include-path-patterns and --exclude-path-patterns to use a table of tables #289

Merged
merged 14 commits into from
Dec 9, 2021

Conversation

mayuriesha
Copy link
Contributor

To help us get this pull request reviewed and merged quickly, please be sure to include the following items:

  • Tests (if applicable)
  • Documentation (if applicable)
  • Changelog entry
  • A full explanation here in the PR description of the work done

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Backward Compatibility

Is this change backward compatible with the most recently released version? Does it introduce changes which might change the user experience in any way? Does it alter the API in any way?

  • Yes (backward compatible)
  • No (breaking changes)

Issue Linking

closes #257

What's new?

  • Supports table of tables format for --include-path-patterns and --exclude-path-patterns with an option to specify the reason.
    Ex: include-path-patterns = [{path-pattern="path-pattern", reason="reason to include path patterns"}]
  • Warns users about deprecation of old format
  • Making sure either one the formats is used until the old format is completely deprecated

tartufo/scanner.py Outdated Show resolved Hide resolved
tartufo/scanner.py Outdated Show resolved Hide resolved
tartufo/scanner.py Outdated Show resolved Hide resolved
tartufo/scanner.py Outdated Show resolved Hide resolved
tartufo/scanner.py Show resolved Hide resolved
tests/test_git_repo_scanner.py Outdated Show resolved Hide resolved
)
self.global_options.exclude_path_patterns = ("bar/",)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as the test above.

Copy link
Contributor

@rbailey-godaddy rbailey-godaddy left a comment

Choose a reason for hiding this comment

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

Pretty much one change to relax unintended restriction that needlessly crosses multiple configuration files.

tartufo/cli.py Show resolved Hide resolved
tartufo/scanner.py Outdated Show resolved Hide resolved
tartufo/scanner.py Outdated Show resolved Hide resolved
tartufo/scanner.py Outdated Show resolved Hide resolved
tartufo/scanner.py Show resolved Hide resolved
@mayuriesha
Copy link
Contributor Author

mayuriesha commented Dec 7, 2021

@rbailey-godaddy I have created an issue to address the last few review comments as part of another PR after 3.0 is released

Copy link
Contributor

@rbailey-godaddy rbailey-godaddy left a comment

Choose a reason for hiding this comment

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

LGTM (keeping in mind the new backlog story)

rscottbailey and others added 3 commits December 9, 2021 12:06
Clean up `included_paths` and `excluded_paths` with basically the same
logic used for godaddy#290.
Copy link
Contributor

@tarkatronic tarkatronic left a comment

Choose a reason for hiding this comment

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

🎉

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.

Change --include-path-patterns and --exclude-path-patterns to use a table of tables
5 participants