File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ Layout/LineLength:
3939 AllowedPatterns :
4040 - " ^\\ s*#.*$"
4141 - ^require(_relative)?
42- - " FinchAPI::(Models|Resources)::"
42+ - " FinchAPI::(Models|Resources|Test )::"
4343 Max : 110
4444
4545Layout/MultilineArrayLineBreaks :
@@ -122,9 +122,9 @@ Metrics/PerceivedComplexity:
122122Naming/BlockForwarding :
123123 Enabled : false
124124
125+ # Underscores are generally useful for disambiguation.
125126Naming/ClassAndModuleCamelCase :
126- Exclude :
127- - " **/*.rbi"
127+ Enabled : false
128128
129129Naming/MethodParameterName :
130130 Enabled : false
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ require "rubocop/rake_task"
99
1010CLEAN . push ( *%w[ .idea/ .ruby-lsp/ .yardoc/ ] )
1111
12- xargs = %w[ xargs --no-run-if-empty --null --max-procs=0 --max-args=300 -- ]
13-
1412multitask ( default : [ :test ] )
1513
1614multitask ( :test ) do
@@ -22,17 +20,17 @@ multitask(:test) do
2220 ruby ( *%w[ -w -e ] , rb , verbose : false ) { fail unless _1 }
2321end
2422
25- RuboCop ::RakeTask . new ( :rubocop ) do |t |
26- t . options = %w[ --fail-level E ]
27- if ENV . key? ( "CI" )
28- t . options += %w[ --format github ]
29- end
23+ rubo_find = %w[ find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0 ]
24+ xargs = %w[ xargs --no-run-if-empty --null --max-procs=0 --max-args=300 -- ]
25+
26+ multitask ( :rubocop ) do
27+ lint = xargs + %w[ rubocop --fail-level E ] + ( ENV . key? ( "CI" ) ? %w[ --format github ] : [ ] )
28+ sh ( "#{ rubo_find . shelljoin } | #{ lint . shelljoin } " )
3029end
3130
3231multitask ( :ruboformat ) do
33- find = %w[ find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0 ]
3432 fmt = xargs + %w[ rubocop --fail-level F --autocorrect --format simple -- ]
35- sh ( "#{ find . shelljoin } | #{ fmt . shelljoin } " )
33+ sh ( "#{ rubo_find . shelljoin } | #{ fmt . shelljoin } " )
3634end
3735
3836multitask ( :syntax_tree ) do
You can’t perform that action at this time.
0 commit comments