-
Notifications
You must be signed in to change notification settings - Fork 74
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: add ability to specify branches for (any)-file-content rules #293
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Brend Smits <[email protected]>
Signed-off-by: Brend Smits <[email protected]>
Signed-off-by: Brend Smits <[email protected]>
Thinking on the feature of "run repolinter on a specific branch instead of default", I'd approach it by enhance the
|
Thanks for commenting! I see where you are coming from, the problem with that approach is that you can't configure this per rule. You will lose the ability to run rule X for just the default branch, while running rule Y for various branches (all within the same ruleset). |
I see. In that case, may I request to move the feature change away from
|
My couple of thoughts here are:
|
Motivation
Some rules require you to check not just the default branch, but also other branches.
Proposed Changes
This is now possible by using the 'branches' option. Currently only works for the any-file-contents and file-contents rule.
The
skipDefaultBranch
option can be used if the user wants to skip the default branch from being checked. This will also fix #15Test Plan
Run NPM Tests. Example rulesets can be found here: https://github.com/Brend-Smits/repolinter-tests/tree/main/rulesets
We should consider moving this repository to the
todogroup
GitHub organization.Note: This pull request should be merged after #290. The rulesets that we use with testing, also refer to this rule. This is also the reason why some tests will fail. This will automatically be resolved when the other PR is merged.
Signed-off-by: Brend Smits [email protected]