Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
update rubocop and haml_lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroPointEnergy committed Mar 9, 2020
1 parent c8f0177 commit 7efbf06
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 91 deletions.
7 changes: 6 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-rails
- rubocop-rspec
- rubocop-performance

inherit_gem:
rubocop-rails_config:
- config/rails.yml
- config/rails.yml
103 changes: 39 additions & 64 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-06-03 16:27:52 +0200 using RuboCop version 0.67.2.
# on 2020-03-09 09:09:50 +0100 using RuboCop version 0.80.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -22,7 +22,25 @@ Layout/ElseAlignment:
Exclude:
- 'lib/node_group_graph.rb'

# Offense count: 38
# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: around, only_before
Layout/EmptyLinesAroundAccessModifier:
Exclude:
- 'app/controllers/application_controller.rb'
- 'app/controllers/node_classes_controller.rb'
- 'app/controllers/node_groups_controller.rb'
- 'app/controllers/nodes_controller.rb'
- 'app/controllers/reports_controller.rb'
- 'app/mixins/searchable_index.rb'
- 'app/models/report.rb'
- 'app/models/status.rb'
- 'lib/node_group_graph.rb'
- 'lib/puppet/report_sanitizer.rb'
- 'lib/registry.rb'

# Offense count: 37
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, no_empty_lines
Expand Down Expand Up @@ -72,20 +90,21 @@ Layout/EndAlignment:
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: normal, rails
# SupportedStyles: normal, indented_internal_methods
Layout/IndentationConsistency:
Exclude:
- 'spec/helpers/application_helper_spec.rb'
- 'spec/lib/puppet/report_sanitizer_spec.rb'

# Offense count: 23
# Offense count: 22
# Cop supports --auto-correct.
# Configuration parameters: Width, IgnoredPatterns.
Layout/IndentationWidth:
Enabled: false

# Offense count: 16
# Offense count: 15
# Cop supports --auto-correct.
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
Layout/LeadingCommentSpace:
Exclude:
- 'lib/node_group_graph.rb'
Expand All @@ -95,7 +114,7 @@ Layout/LeadingCommentSpace:
- 'spec/models/report_spec.rb'
- 'spec/spec_helper.rb'

# Offense count: 95
# Offense count: 94
# Cop supports --auto-correct.
Layout/SpaceAfterComma:
Enabled: false
Expand Down Expand Up @@ -123,25 +142,6 @@ Layout/SpaceAroundKeyword:
- 'app/controllers/nodes_controller.rb'
- 'app/helpers/conflict_html.rb'

# Offense count: 77
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Layout/SpaceAroundOperators:
Exclude:
- 'app/helpers/application_helper.rb'
- 'app/models/metric.rb'
- 'app/models/status.rb'
- 'lib/data_generator.rb'
- 'lib/node_group_graph.rb'
- 'lib/progress_bar.rb'
- 'spec/controllers/node_groups_controller_spec.rb'
- 'spec/controllers/nodes_controller_spec.rb'
- 'spec/factories.rb'
- 'spec/lib/puppet/report_sanitizer_spec.rb'
- 'spec/lib/report_transformer_spec.rb'
- 'spec/models/report_spec.rb'
- 'spec/models/resource_status_spec.rb'

# Offense count: 54
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
Expand All @@ -157,7 +157,7 @@ Layout/SpaceBeforeComma:
- 'app/helpers/application_helper.rb'
- 'spec/models/report_spec.rb'

# Offense count: 212
# Offense count: 211
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
Expand Down Expand Up @@ -189,14 +189,13 @@ Layout/SpaceInsideParens:
- 'spec/helpers/application_helper_spec.rb'
- 'spec/models/report_spec.rb'

# Offense count: 10
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: final_newline, final_blank_line
Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
Exclude:
- 'app/helpers/conflict_html.rb'
- 'lib/progress_bar.rb'
- 'lib/tasks/rake_helpers.rb'
- 'lib/tasks/schematize_reports.rake'
- 'lib/tasks/update_report_data.rake'
Expand Down Expand Up @@ -237,13 +236,12 @@ Lint/ShadowingOuterLocalVariable:
- 'app/controllers/node_groups_controller.rb'
- 'spec/factories.rb'

# Offense count: 24
# Offense count: 21
Lint/UselessAssignment:
Exclude:
- 'app/controllers/nodes_controller.rb'
- 'app/helpers/application_helper.rb'
- 'app/helpers/conflict_html.rb'
- 'lib/progress_bar.rb'
- 'spec/controllers/nodes_controller_spec.rb'
- 'spec/helpers/application_helper_spec.rb'
- 'spec/lib/report_transformer_spec.rb'
Expand Down Expand Up @@ -277,20 +275,6 @@ Style/AndOr:
- 'lib/tasks/install.rake'
- 'lib/tasks/node.rake'

# Offense count: 47
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: braces, no_braces, context_dependent
Style/BracesAroundHashParameters:
Exclude:
- 'app/helpers/application_helper.rb'
- 'app/models/timeline_event.rb'
- 'spec/controllers/node_groups_controller_spec.rb'
- 'spec/controllers/nodes_controller_spec.rb'
- 'spec/helpers/application_helper_spec.rb'
- 'spec/views/node_groups/edit.html.haml_spec.rb'
- 'spec/views/nodes/edit.html.haml_spec.rb'

# Offense count: 6
# Cop supports --auto-correct.
Style/ColonMethodCall:
Expand All @@ -305,10 +289,10 @@ Style/DefWithParentheses:
Exclude:
- 'lib/puppet/report_sanitizer.rb'

# Offense count: 156
# Offense count: 155
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: when_needed, always, never
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
Enabled: false

Expand All @@ -335,6 +319,12 @@ Style/RedundantBegin:
- 'app/controllers/reports_controller.rb'
- 'app/models/resource_event.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/RedundantPercentQ:
Exclude:
- 'spec/controllers/nodes_controller_spec.rb'

# Offense count: 18
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Expand All @@ -350,7 +340,7 @@ Style/RedundantReturn:
- 'lib/tasks/install.rake'
- 'spec/support/from_response_body.rb'

# Offense count: 13
# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Style/Semicolon:
Expand All @@ -360,25 +350,10 @@ Style/Semicolon:
- 'app/helpers/conflict_analyzer.rb'
- 'app/helpers/conflict_html.rb'
- 'lib/node_group_graph.rb'
- 'lib/progress_bar.rb'

# Offense count: 1974
# Offense count: 1980
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Enabled: false

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
Style/TrivialAccessors:
Exclude:
- 'lib/progress_bar.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/UnneededPercentQ:
Exclude:
- 'spec/controllers/nodes_controller_spec.rb'
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ group :development, :test do
gem 'listen'
gem 'simplecov'
gem 'simplecov-console'
gem 'rubocop', '~> 0.67.0'
gem 'rubocop'
gem 'rubocop-performance'
gem 'rubocop-rails'
gem 'rubocop-rails_config'
gem 'rubocop-rspec'
gem 'haml_lint', require: false
end

Expand Down
62 changes: 37 additions & 25 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ GEM
bindex (0.8.1)
bootsnap (1.4.5)
msgpack (~> 1.0)
builder (3.2.3)
concurrent-ruby (1.1.5)
crass (1.0.5)
builder (3.2.4)
concurrent-ruby (1.1.6)
crass (1.0.6)
daemons (1.3.1)
delayed_job (4.1.8)
activesupport (>= 3.0, < 6.1)
Expand Down Expand Up @@ -80,7 +80,7 @@ GEM
haml (>= 4.0.6, < 6.0)
html2haml (>= 1.0.1)
railties (>= 5.1)
haml_lint (0.34.0)
haml_lint (0.35.0)
haml (>= 4.0, < 5.2)
rainbow
rubocop (>= 0.50.0)
Expand All @@ -93,7 +93,7 @@ GEM
haml (>= 4.0, < 6)
nokogiri (>= 1.6.0)
ruby_parser (~> 3.5)
i18n (1.7.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
inherited_resources (1.11.0)
actionpack (>= 5.0, < 6.1)
Expand All @@ -113,7 +113,7 @@ GEM
listen (3.2.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.3.1)
loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
Expand All @@ -125,20 +125,19 @@ GEM
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.13.0)
minitest (5.14.0)
mocha (1.9.0)
metaclass (~> 0.0.1)
msgpack (1.3.1)
mysql2 (0.5.2)
nio4r (2.5.2)
nokogiri (1.10.8)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
parallel (1.18.0)
parser (2.6.5.0)
parallel (1.19.1)
parser (2.7.0.4)
ast (~> 2.4.0)
pg (1.1.4)
psych (3.1.0)
rack (2.0.8)
rack (2.2.2)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.3)
Expand Down Expand Up @@ -170,7 +169,7 @@ GEM
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (13.0.0)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
Expand All @@ -179,6 +178,7 @@ GEM
responders (3.0.0)
actionpack (>= 5.0)
railties (>= 5.0)
rexml (3.2.4)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
Expand All @@ -205,17 +205,26 @@ GEM
rspec-mocks (~> 3.9.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.0)
rubocop (0.67.2)
rubocop (0.80.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
psych (>= 3.1.0)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
rexml
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.6)
rubocop-rails_config (0.5.1)
railties (>= 3.0)
rubocop (~> 0.60)
unicode-display_width (>= 1.4.0, < 1.7)
rubocop-performance (1.5.2)
rubocop (>= 0.71.0)
rubocop-rails (2.4.2)
rack (>= 1.1)
rubocop (>= 0.72.0)
rubocop-rails_config (0.10.0)
railties (>= 5.0)
rubocop (~> 0.80)
rubocop-performance (~> 1.3)
rubocop-rails (~> 2.0)
rubocop-rspec (1.38.1)
rubocop (>= 0.68.1)
ruby-progressbar (1.10.1)
ruby_parser (3.14.1)
sexp_processor (~> 4.9)
Expand Down Expand Up @@ -262,15 +271,15 @@ GEM
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.20.3)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
timeline_fu (0.3.0)
tzinfo (1.2.5)
tzinfo (1.2.6)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.5.0)
unicode-display_width (1.6.1)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
Expand Down Expand Up @@ -312,8 +321,11 @@ DEPENDENCIES
rspec-collection_matchers
rspec-html-matchers
rspec-rails
rubocop (~> 0.67.0)
rubocop
rubocop-performance
rubocop-rails
rubocop-rails_config
rubocop-rspec
ruby-progressbar
safe_yaml
sass-rails (~> 5)
Expand All @@ -329,4 +341,4 @@ DEPENDENCIES
will_paginate

BUNDLED WITH
1.17.3
2.1.4

0 comments on commit 7efbf06

Please sign in to comment.