mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
One of the biggest pros of linters like Rubocop is to get valuable feedback to help write better code. The way we have Rubocop configured now we don't prevent new code from adhere improved code quality and this is specially important when touching code that already suffers from complexity. Without all Rubocop's Metrics cops enabled there's no way to get this insights and write better code. This enables them while regenerating the `.rubocop_todo.yml` to hide the current violations. So, next time we touch existing code that we think could be simpler, we should go to `.rubocop_todo.yml` and remove any occurrences of the file in question. This way we could Rubocop's feedback right in the editor. This is tremendously helpful when refactoring. It shows you where to start.
44 lines
875 B
YAML
44 lines
875 B
YAML
version: "2"
|
|
plugins:
|
|
rubocop:
|
|
enabled: true
|
|
channel: "rubocop-0-57"
|
|
scss-lint:
|
|
enabled: true
|
|
checks:
|
|
ImportantRule:
|
|
enabled: false
|
|
VendorPrefix:
|
|
enabled: false
|
|
duplication:
|
|
enabled: true
|
|
exclude_patterns:
|
|
- "db/**"
|
|
- "config/initializers/active_record_postgresql_referential_integrity_patch.rb"
|
|
checks:
|
|
argument-count:
|
|
enabled: false
|
|
complex-logic:
|
|
enabled: false
|
|
file-lines:
|
|
enabled: false
|
|
method-complexity:
|
|
enabled: false
|
|
method-count:
|
|
enabled: false
|
|
method-lines:
|
|
enabled: false
|
|
nested-control-flow:
|
|
enabled: false
|
|
return-statements:
|
|
enabled: false
|
|
similar-code:
|
|
enabled: false
|
|
identical-code:
|
|
enabled: false
|
|
exclude_patterns:
|
|
- "spec/**/*"
|
|
- "vendor/**/*"
|
|
- "app/assets/javascripts/shared/*"
|
|
- "app/assets/javascripts/jquery-migrate-1.0.0.js"
|