# We will use cops to detect bugs in an early stage # Feel free to use .rubocop_todo.yml by --auto-gen-config inherit_from: .rubocop_todo.yml require: - rubocop-performance - rubocop-rubycw - rubocop-rake AllCops: # drop support for < 2.7 TargetRubyVersion: 2.7 # accept new cops if any NewCops: enable # === # alias is hard to see separately Style/Alias: EnforcedStyle: prefer_alias_method # For consistency and portability Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: comma Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: comma # Should not set for Style/TrailingCommaInArguments # === # To let you know the possibility of refactoring === # # avoid unused variable asignment Rubycw/Rubycw: Exclude: - 'test/**/*' Lint/UselessAssignment: Exclude: - 'test/**/*' # Disabled to define Vector operators Lint/BinaryOperatorWithIdenticalOperands: Exclude: - 'test/test_vector_function.rb' # Need for test with empty block Lint/EmptyBlock: Exclude: - 'test/test_group.rb' # Max: 120 Layout/LineLength: Max: 118 Exclude: - 'test/**/*' # <= 17 satisfactory # 18..30 unsatisfactory # > 30 dangerous Metrics/AbcSize: Max: 30 Exclude: - 'lib/red_amber/data_frame_displayable.rb' # Max: 55 - 'lib/red_amber/data_frame_selectable.rb' # Max: 51 - 'lib/red_amber/vector_updatable.rb' # Max: 36 - 'lib/red_amber/vector_selectable.rb' # Max: 33 # Max: 25 Metrics/BlockLength: Max: 25 Exclude: - 'test/**/*' # Max: 100 Metrics/ClassLength: Max: 100 Exclude: - 'test/**/*' - 'lib/red_amber/data_frame.rb' #Max: 131 - 'lib/red_amber/vector.rb' #Max: 102 # Max: 7 Metrics/CyclomaticComplexity: Max: 12 Exclude: - 'lib/red_amber/data_frame_displayable.rb' # Max: 18 - 'lib/red_amber/data_frame_selectable.rb' # Max: 14 - 'lib/red_amber/vector_selectable.rb' # Max: 13 - 'lib/red_amber/vector_updatable.rb' # Max: 14 # Max: 10 Metrics/MethodLength: Max: 30 Exclude: - 'lib/red_amber/data_frame_displayable.rb' # Max: 33 # Max: 100 Metrics/ModuleLength: Max: 100 Exclude: - 'lib/red_amber/data_frame_selectable.rb' # Max: 141 - 'lib/red_amber/vector_functions.rb' # Max: 114 - 'lib/red_amber/data_frame_displayable.rb' # Max: 132 # Max: 8 Metrics/PerceivedComplexity: Max: 13 Exclude: - 'lib/red_amber/data_frame_selectable.rb' # Max: 14 - 'lib/red_amber/vector_updatable.rb' # Max: 15 - 'lib/red_amber/data_frame_displayable.rb' # Max: 19 Naming/FileName: Exclude: - 'lib/red-amber.rb' # Necessary to define is_na, is_in, etc. Naming/PredicateName: Exclude: - 'lib/red_amber/vector_functions.rb' - 'lib/red_amber/vector.rb' - 'lib/red_amber/vector_selectable.rb' # Necessary to test when range.end == -1 Style/SlicingWithRange: Exclude: - 'test/test_data_frame_selectable.rb' # Necessary to Vector < 0 element-wise comparison Style/NumericPredicate: Exclude: - 'lib/red_amber/data_frame_selectable.rb' - 'lib/red_amber/vector_selectable.rb'