Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ajoute rubocop-rails #1321

Merged
merged 16 commits into from Apr 15, 2021
65 changes: 39 additions & 26 deletions .rubocop.yml
Expand Up @@ -2,60 +2,73 @@ inherit_from: .rubocop_todo.yml

require:
- rubocop-rspec
- rubocop-rails

AllCops:
Exclude:
- "vendor/bundle/**/*"
- "bin/*"
- "node_modules/**/*"
- 'db/schema.rb'
NewCops: enable
TargetRubyVersion: 2.7.2

Bundler/OrderedGems:
Exclude:
- 'Gemfile'

Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented

Style/AsciiComments:
Enabled: false

Style/NumericLiterals:
Rails/ApplicationController:
Exclude:
- "db/schema.rb"
- 'app/controllers/api/v1/base_controller.rb'

Style/HashEachMethods:
Enabled: true
Rails/CreateTableWithTimestamps:
Exclude:
- 'db/migrate/20200427093834_create_agents_users_join_table.rb'
- 'db/migrate/20201005094454_extract_sectors.rb'
- 'db/migrate/20210301135256_create_territories.rb'

Style/HashTransformKeys:
Enabled: true
Rails/Delegate:
Exclude:
- 'config/initializers/recurrence_monkey_patch.rb'

Style/HashTransformValues:
Enabled: true
Rails/DynamicFindBy:
Exclude:
- 'spec/features/agents/admin_can_configure_the_organisation_spec.rb'

Metrics/BlockLength:
Rails/RakeEnvironment:
Exclude:
- 'db/schema.rb'
- 'lib/tasks/matomo.rake'

Style/StringLiterals:
EnforcedStyle: double_quotes
Enabled: true
Rails/ReversibleMigration:
Exclude:
- 'db/migrate/20200401145901_remove_by_phone_from_motifs.rb'
- 'db/migrate/20200907084438_delete_old_notes_from_users.rb'
- 'db/migrate/20200907123203_remove_old_notes_from_user_profiles.rb'
- 'db/migrate/20201112164609_remove_disable_notifications_for_users_from_motifs.rb'

Lint/MissingSuper:
Style/AsciiComments:
Enabled: false

Bundler/OrderedGems:
Exclude:
- 'Gemfile'

Lint/EmptyBlock:
Enabled: False
Style/StringLiterals:
EnforcedStyle: double_quotes

RSpec/ContextWording:
Enabled: False

RSpec/MultipleExpectations:
Enabled: False

RSpec/ExampleLength:
Max: 10

RSpec/MessageSpies:
EnforcedStyle: receive

RSpec/MultipleExpectations:
Enabled: False

Style/ClassAndModuleChildren:
Enabled: false

Style/Documentation:
Enabled: false