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

Add --disable-default-rules flag #132

Merged
merged 6 commits into from
Nov 7, 2021
Merged

Conversation

caitlinelfring
Copy link
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the current behavior? (You can also link to an open issue here)
The process isn't great if you want to disable the default ruleset entirely and provide your own rules. You have to follow the instructions in https://github.com/get-woke/woke#disabling-default-rules and then add your own.

What is the new behavior (if this is a feature change)?
You can now provide --disable-default-rules as a flag which will not run any of the default rules. It will error if you run it with --disable-default-rules without providing your own rules because that would mean running woke without any rules, which is pointless

Does this PR introduce a breaking change? (What changes might users need to make due to this PR?)
No, this is an additive change only and will not impact users

Other information:
Closes #129

@codecov
Copy link

codecov bot commented Aug 12, 2021

Codecov Report

Merging #132 (ed305ae) into main (c5a39fe) will increase coverage by 0.57%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
+ Coverage   95.27%   95.84%   +0.57%     
==========================================
  Files          22       22              
  Lines         740      746       +6     
==========================================
+ Hits          705      715      +10     
+ Misses         21       19       -2     
+ Partials       14       12       -2     
Impacted Files Coverage Δ
cmd/root.go 88.57% <100.00%> (+6.48%) ⬆️
pkg/config/config.go 91.39% <100.00%> (+0.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bae3355...ed305ae. Read the comment docs.

@caitlinelfring caitlinelfring force-pushed the disable-default-rules-option branch from 5197c6d to fa60209 Compare August 12, 2021 13:51
woke will error if you run it with `--disable-default-rules` without providing your own rules in a config file (because that would mean you're running woke without any rules, which is pointless)
@caitlinelfring caitlinelfring force-pushed the disable-default-rules-option branch from fa60209 to 174840f Compare August 17, 2021 12:09
@caitlinelfring caitlinelfring merged commit e1176dc into main Nov 7, 2021
@caitlinelfring caitlinelfring deleted the disable-default-rules-option branch November 7, 2021 13:56
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.

Ability to disable default rules
1 participant