rubocop: a few fixes
* disable Layout/LineLength for now; it's not auto-correctable, and we have a LOT of violations * add a comment showing how to generate the final RuboCop enforced config * fix forcing of error level for gergich * fix boyscout mode always being on Change-Id: Ie68b612f107e9e98b50a230a65ef2a616751362d Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274008 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: August Thornton <august@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
dd814ee5a2
commit
8b690ddc32
|
@ -20,6 +20,8 @@ Gemspec/OrderedDependencies:
|
|||
Layout/IndentationConsistency:
|
||||
Exclude:
|
||||
- "**/Gemfile.d/*" # we purposely indent dependent gems
|
||||
Layout/LineLength:
|
||||
Enabled: false
|
||||
|
||||
Lint/Debugger:
|
||||
Severity: error
|
||||
|
|
|
@ -9,6 +9,9 @@ AllCops:
|
|||
|
||||
<%=
|
||||
|
||||
# if you want to see what this all evaluates to, you can run
|
||||
# `require 'erb'; puts ERB.new(File.read(".rubocop.enforced.yml")).result(binding)` from IRB
|
||||
|
||||
# keys are cops you want to opt in for (nil being all cops)
|
||||
# values are an array of directories to opt in for (nil being all directories)
|
||||
OPT_IN = {
|
||||
|
|
|
@ -87,7 +87,6 @@ class Linter
|
|||
:campsite_mode,
|
||||
:command,
|
||||
:comment_post_processing,
|
||||
:default_boyscout_mode,
|
||||
:custom_comment_generation,
|
||||
:env_sha,
|
||||
:file_regex,
|
||||
|
@ -164,7 +163,7 @@ class Linter
|
|||
if gerrit_patchset
|
||||
if boyscout_mode
|
||||
processed_comments.each do |comment|
|
||||
comment[:severity] = :error
|
||||
comment[:severity] = 'error'
|
||||
end
|
||||
end
|
||||
publish_gergich_comments(processed_comments)
|
||||
|
|
|
@ -15,7 +15,7 @@ linter_options = {
|
|||
campsite_mode: false,
|
||||
append_files_to_command: true,
|
||||
severe_levels: [],
|
||||
default_boyscout_mode: false,
|
||||
boyscout_mode: false,
|
||||
heavy_mode_proc: proc do |ruby_files|
|
||||
args = ruby_files
|
||||
args_index = ARGV.index('--')
|
||||
|
|
|
@ -9,8 +9,7 @@ linter_options = {
|
|||
format: 'stylelint',
|
||||
command: 'node_modules/.bin/stylelint',
|
||||
campsite_mode: false,
|
||||
append_files_to_command: true,
|
||||
default_boyscout_mode: false
|
||||
append_files_to_command: true
|
||||
}
|
||||
|
||||
stylelint = Linter.new(linter_options)
|
||||
|
|
Loading…
Reference in New Issue