AllCops: TargetRubyVersion: 2.3 DisplayCopNames: true Exclude: - db/schema.rb - "**/*/node_modules/**/*" # Do not sort gems in Gemfile, since we are grouping them by functionality. Bundler/OrderedGems: Enabled: false # Add a comment before each gem in Gemfile. Bundler/GemComment: Enabled: true # Trailing commas are required on multiline method arguments. Style/TrailingCommaInArguments: EnforcedStyleForMultiline: comma # Trailing commas are required in multiline arrays. Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: comma # Trailing commas are required in multiline hashes. Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: comma # Allow indenting multiline chained operations. Layout/MultilineMethodCallIndentation: EnforcedStyle: indented # Allow not adding parentheses around blocks in DSLs. # E.g.: # expect { … }.to change { … } Lint/AmbiguousBlockAssociation: Exclude: - spec/**/* # Limit method length (default is 10). Metrics/MethodLength: Max: 15 # Limit class length (default is 100). Metrics/ClassLength: Max: 200 # Do not require `# frozen_string_literal: true` at the top of every file. FrozenStringLiteralComment: Enabled: false # Allow ASCII comments (e.g "…"). Style/AsciiComments: Enabled: false # Do not comment the class we create, since the name should be self explanatory. Documentation: Enabled: false # Do not verify the length of the blocks in DSLs. Metrics/BlockLength: Exclude: - "**/*/spec/**/*" - lib/tasks/**/* - app/admin/**/* ExcludedMethods: - included # Allow any number of keyword arguments in methods. Metrics/ParameterLists: CountKeywordArgs: false # Prefer `a_variable_1` to `a_variable1`. Naming/VariableNumber: EnforcedStyle: snake_case # Prefer `== 0`, `< 0`, `> 0` to `zero?`, `negative?` or `positive?`, # since they don't exist before Ruby 2.3 or Rails 5 and can be ambiguous. Style/NumericPredicate: EnforcedStyle: comparison # This cop by default assumes that `Rails.root.join('foo', 'bar')` works # better under Windows than `Rails.root.join('foo/bar')`. Rails/FilePath: EnforcedStyle: slashes # Do not checks for the use of output safety calls like `html_safe` and `raw`, # we know what we are doing. Rails/OutputSafety: Enabled: false # Allow `update_attribute`, we know when to use it. Rails/SkipsModelValidations: Enabled: false # Allow creating tables without timestamps, whe know what we are doing. Rails/CreateTableWithTimestamps: Enabled: false # Allow template token "%{foo}" since they are used in translation keys. Style/FormatStringToken: Enabled: false # Do not prefer `lambda` to `->` for DSLs. Style/Lambda: Exclude: - app/graph/**/*