Rubocop rules

This commit is contained in:
Nedim
2025-02-17 19:12:40 +01:00
parent ef01db0700
commit ee89170c32
42 changed files with 1043 additions and 267 deletions

38
.rubocop.yml Normal file
View File

@@ -0,0 +1,38 @@
inherit_mode:
merge:
- Exclude
require:
- rubocop-factory_bot
- rubocop-performance
- rubocop-rails
- rubocop-rspec
- rubocop-rspec_rails
inherit_from:
- .rubocop/base.yml # cross-repo rubocop config based on OC Ruby Style Guide
- .rubocop/rails.yml # cross-repo rubocop-rails config
- .rubocop/rails_5.yml # cross-repo rubocop-rails version 5 config
- .rubocop/rspec.yml # cross-repo rubocop-rspec config
- .rubocop/factory_bot.yml # cross-repo rubocop-factory_bot config
- .rubocop/local.yml # local repo rubocop config
- .rubocop/strict.yml # strict cops - any offenses are not tolerated - needs to be at end of inherit_from list
AllCops:
TargetRubyVersion: 2.7
NewCops: enable
Exclude:
# Rubocop does not support .erb out of the box
- app/views/**/*
- bin/**/*
- client/**/*
- db/**/*
- log/**/*
- node_modules/**/*
- script/**/*
- vendor/**/*
# list of files/cops that caused errors when running rubocop
Style/SuperArguments:
Exclude:
- app/helpers/tracking_httparty.rb # 2024-07-05