diff --git a/.hound.yml b/.hound.yml new file mode 100644 index 000000000..26cdad927 --- /dev/null +++ b/.hound.yml @@ -0,0 +1,4 @@ +rubocop: + config_file: .rubocop_basic.yml +scss: + config_file: .scss-lint.yml \ No newline at end of file diff --git a/.rubocop.yml b/.rubocop.yml index 93a1a6ce9..02cf06874 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,36 +1,8 @@ -inherit_from: .rubocop_todo.yml -require: rubocop-rspec - -AllCops: - DisplayCopNames: true - DisplayStyleGuide: true - Include: - - '**/Rakefile' - - '**/config.ru' - Exclude: - - 'db/**/*' - - 'config/**/*' - - 'script/**/*' - TargetRubyVersion: 2.3 - # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop - # to ignore them, so only the ones explicitly set in this file are enabled. - DisabledByDefault: true +inherit_from: .rubocop_basic.yml Metrics/LineLength: Max: 100 -Layout/IndentationConsistency: - EnforcedStyle: rails - -Layout/EndOfLine: - EnforcedStyle: lf - -Layout/TrailingBlankLines: - Enabled: true - -Layout/TrailingWhitespace: - Enabled: true - Bundler/DuplicatedGem: Enabled: true diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml new file mode 100644 index 000000000..3c95a8a60 --- /dev/null +++ b/.rubocop_basic.yml @@ -0,0 +1,28 @@ +require: rubocop-rspec + +AllCops: + DisplayCopNames: true + DisplayStyleGuide: true + Include: + - '**/Rakefile' + - '**/config.ru' + Exclude: + - 'db/**/*' + - 'config/**/*' + - 'script/**/*' + TargetRubyVersion: 2.3 + # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop + # to ignore them, so only the ones explicitly set in this file are enabled. + DisabledByDefault: true + +Layout/IndentationConsistency: + EnforcedStyle: rails + +Layout/EndOfLine: + EnforcedStyle: lf + +Layout/TrailingBlankLines: + Enabled: true + +Layout/TrailingWhitespace: + Enabled: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml deleted file mode 100644 index f3a40d8ab..000000000 --- a/.rubocop_todo.yml +++ /dev/null @@ -1,71 +0,0 @@ -# This configuration was generated by -# `rubocop --auto-gen-config` -# on 2018-02-10 21:25:09 +0100 using RuboCop version 0.52.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 -# versions of RuboCop, may require this file to be generated again. - -# Offense count: 10 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: normal, rails -Layout/IndentationConsistency: - Exclude: - - 'spec/features/tracks_spec.rb' - - 'spec/models/budget/investment_spec.rb' - - 'spec/models/legislation/draft_version_spec.rb' - - 'spec/models/proposal_spec.rb' - -# Offense count: 1225 -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. -# URISchemes: http, https -Metrics/LineLength: - Max: 248 - -# Offense count: 4 -# Cop supports --auto-correct. -Performance/RedundantMatch: - Exclude: - - 'app/controllers/valuation/budget_investments_controller.rb' - - 'app/controllers/valuation/spending_proposals_controller.rb' - -# Offense count: 11 -RSpec/DescribeClass: - Exclude: - - 'spec/customization_engine_spec.rb' - - 'spec/i18n_spec.rb' - - 'spec/lib/acts_as_paranoid_aliases_spec.rb' - - 'spec/lib/cache_spec.rb' - - 'spec/lib/graphql_spec.rb' - - 'spec/lib/tasks/communities_spec.rb' - - 'spec/lib/tasks/dev_seed_spec.rb' - - 'spec/lib/tasks/map_location_spec.rb' - - 'spec/lib/tasks/settings_spec.rb' - - 'spec/models/abilities/organization_spec.rb' - - 'spec/views/welcome/index.html.erb_spec.rb' - -# Offense count: 2 -# Configuration parameters: SkipBlocks, EnforcedStyle. -# SupportedStyles: described_class, explicit -RSpec/DescribedClass: - Exclude: - - 'spec/controllers/concerns/has_filters_spec.rb' - - 'spec/controllers/concerns/has_orders_spec.rb' - -# Offense count: 6 -RSpec/ExpectActual: - Exclude: - - 'spec/routing/**/*' - - 'spec/features/admin/budget_investments_spec.rb' - -# Offense count: 830 -# Configuration parameters: AssignmentOnly. -RSpec/InstanceVariable: - Enabled: false - -# Offense count: 1 -# Configuration parameters: IgnoreSymbolicNames. -RSpec/VerifiedDoubles: - Exclude: - - 'spec/models/verification/management/email_spec.rb'