Created
June 26, 2020 10:38
-
-
Save davidstosik/923d644b622c335256bb60d8617ca242 to your computer and use it in GitHub Desktop.
Cookpad custom RuboCop cops
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/.rubocop.yml w/.rubocop.yml | |
index 1369eedefc..9335038ac7 100644 | |
--- i/.rubocop.yml | |
+++ w/.rubocop.yml | |
@@ -1,5 +1,6 @@ | |
require: | |
- rubocop-rails | |
+ - "./lib/rubocop-cookpad.rb" | |
AllCops: | |
TargetRailsVersion: 6.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubocop" | |
# Require all cops in ./lib/rubocop/cop/cookpad/ | |
Dir[File.join(__dir__, "rubocop/cop/cookpad", "**", "*.rb")].sort.each do |file| | |
require file | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This directory will contain the custom cop classes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment