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

Suppress a particular rule in a particular folder #371

Open
3 tasks done
tylerlaprade opened this issue Jul 22, 2023 · 1 comment
Open
3 tasks done

Suppress a particular rule in a particular folder #371

tylerlaprade opened this issue Jul 22, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@tylerlaprade
Copy link

Checklist

  • This is a new feature, not a refactoring suggestion
  • I have checked for this feature in the Sourcery documentation
  • I have checked there are no open requests referencing the same feature

Description

I would like to suppress a given rule only in a certain folder or subset of files. For example, I'd like to suppress refactoring:class-extract-method in my tests/ folder because it's important that each test clearly specify what behavior is under test without requiring the reader to understand context from elsewhere in the file. However, I want to continue running that check in the rest of code.

Similar functionality can be found in Ruff's per-file-ignores and ESLint's overrides.

@tylerlaprade tylerlaprade added the enhancement New feature or request label Jul 22, 2023
@Hellebore
Copy link
Collaborator

That's a nice use case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants