require: - rubocop-sketchup - rubocop-minitest - rubocop-rake AllCops: TargetRubyVersion: 2.5 DisabledByDefault: false NewCops: enable DisplayCopNames: true ExtraDetails: true SuggestExtensions: false Exclude: - '_tools/jf_RubyPanel.rb' - '_tools/jf_RubyPanel/**/*.rb' - '_tools/su_attributes.rb' - '_tools/su_attributes/**/*.rb' - '_tools/su_attributes/**/*.rb' - '_sqlite3/**/*.rb' - 'ui/**/*' - 'speckle_connector/src/ext/**/*.rb' - 'vendor/bundle/**/*' - 'tests/**/*.rb' SketchUp: SourcePath: . TargetSketchUpVersion: 2021 Exclude: # Exclude common folders. - 'tests/**/*' - 'benchmarks/**/*' - '_tools/**/*' - 'Rakefile' Layout: Enabled: true Layout/IndentationStyle: EnforcedStyle: spaces IndentationWidth: 2 # If DisabledByDefault is set to true then we need to enable the SketchUp # related departments: SketchupDeprecations: Enabled: true SketchupPerformance: Enabled: true SketchupRequirements: Enabled: true SketchupSuggestions: Enabled: true SketchupBugs: Enabled: true SketchupRequirements/FileStructure: Enabled: false SketchupSuggestions/ModelEntities: Enabled: false Metrics/AbcSize: Max: 30 Metrics/BlockLength: # Exclude spec tests Exclude: - "**/*_spec.rb" Metrics/MethodLength: Max: 20 Metrics/ClassLength: Max: 200 Layout/EndOfLine: Enabled: false EnforcedStyle: lf Minitest/MultipleAssertions: Max: 5 Naming/MethodParameterName: AllowedNames: [x, y, z, id] Naming/VariableNumber: EnforcedStyle: snake_case # SketchUp 2017 uses Ruby 2.2 where safe navigation is not available Style/SafeNavigation: Enabled: false Style/AndOr: Enabled: false Style/Documentation: Exclude: - "*tests/**/*_spec.rb" - "*tests/**/*_test.rb" Style/Not: Enabled: false Style/NumericLiterals: Enabled: false Style/NumericPredicate: EnforcedStyle: comparison Style/Proc: Enabled: false Style/RedundantReturn: Enabled: false # SketchUp 2017 uses Ruby 2.2 where safe navigation is not available Style/SlicingWithRange: Enabled: false # SketchUp 2017 uses Ruby 2.2 where transform_values is not available Style/HashTransformValues: Enabled: false # SketchUp 2017 uses Ruby 2.2 where transform_keys is not available Style/HashTransformKeys: Enabled: false # SketchUp 2017 uses Ruby 2.2 where block needs to be wrapped in begin/end if ensure can be used Style/RedundantBegin: Enabled: false