From 0f90c61bab9a44c2e7dff49955205e55a082fbe9 Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 17 May 2024 21:06:52 +0000 Subject: [PATCH 1/4] update pending configs --- config/default_pending.yml | 66 ++++++++++++++++++++++++++++++++ config/rails_pending.yml | 78 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) diff --git a/config/default_pending.yml b/config/default_pending.yml index ee85c60..d7161a4 100644 --- a/config/default_pending.yml +++ b/config/default_pending.yml @@ -4,3 +4,69 @@ Style/OperatorMethodCall: # new in 1.37 Enabled: false Style/RedundantStringEscape: # new in 1.37 Enabled: false +Gemspec/DevelopmentDependencies: # new in 1.44 + Enabled: true +Lint/DuplicateMatchPattern: # new in 1.50 + Enabled: true +Lint/ItWithoutArgumentsInBlock: # new in 1.59 + Enabled: true +Lint/LiteralAssignmentInCondition: # new in 1.58 + Enabled: true +Lint/MixedCaseRange: # new in 1.53 + Enabled: true +Lint/RedundantRegexpQuantifiers: # new in 1.53 + Enabled: true +Lint/UselessRescue: # new in 1.43 + Enabled: true +Metrics/CollectionLiteralLength: # new in 1.47 + Enabled: true +Style/ArrayIntersect: # new in 1.40 + Enabled: true +Style/ComparableClamp: # new in 1.44 + Enabled: true +Style/ConcatArrayLiterals: # new in 1.41 + Enabled: true +Style/DataInheritance: # new in 1.49 + Enabled: true +Style/DirEmpty: # new in 1.48 + Enabled: true +Style/ExactRegexpMatch: # new in 1.51 + Enabled: true +Style/FileEmpty: # new in 1.48 + Enabled: true +Style/MapIntoArray: # new in 1.63 + Enabled: true +Style/MapToSet: # new in 1.42 + Enabled: true +Style/MinMaxComparison: # new in 1.42 + Enabled: true +Style/RedundantArrayConstructor: # new in 1.52 + Enabled: true +Style/RedundantConstantBase: # new in 1.40 + Enabled: true +Style/RedundantCurrentDirectoryInPath: # new in 1.53 + Enabled: true +Style/RedundantDoubleSplatHashBraces: # new in 1.41 + Enabled: true +Style/RedundantEach: # new in 1.38 + Enabled: true +Style/RedundantFilterChain: # new in 1.52 + Enabled: true +Style/RedundantHeredocDelimiterQuotes: # new in 1.45 + Enabled: true +Style/RedundantLineContinuation: # new in 1.49 + Enabled: true +Style/RedundantRegexpArgument: # new in 1.53 + Enabled: true +Style/RedundantRegexpConstructor: # new in 1.52 + Enabled: true +Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 + Enabled: true +Style/SingleLineDoEndBlock: # new in 1.57 + Enabled: true +Style/SuperWithArgsParentheses: # new in 1.58 + Enabled: true +Style/YAMLFileRead: # new in 1.53 + Enabled: true +Performance/MapMethodChain: # new in 1.19 + Enabled: true diff --git a/config/rails_pending.yml b/config/rails_pending.yml index b3abb0b..893864b 100644 --- a/config/rails_pending.yml +++ b/config/rails_pending.yml @@ -18,3 +18,81 @@ Rails/WhereMissing: # new in 2.16 Enabled: false Rails/WhereNotWithMultipleConditions: # new in 2.17 Enabled: false +Gemspec/DevelopmentDependencies: # new in 1.44 + Enabled: true +Lint/DuplicateMatchPattern: # new in 1.50 + Enabled: true +Lint/ItWithoutArgumentsInBlock: # new in 1.59 + Enabled: true +Lint/LiteralAssignmentInCondition: # new in 1.58 + Enabled: true +Lint/MixedCaseRange: # new in 1.53 + Enabled: true +Lint/RedundantRegexpQuantifiers: # new in 1.53 + Enabled: true +Lint/UselessRescue: # new in 1.43 + Enabled: true +Metrics/CollectionLiteralLength: # new in 1.47 + Enabled: true +Style/ArrayIntersect: # new in 1.40 + Enabled: true +Style/ComparableClamp: # new in 1.44 + Enabled: true +Style/ConcatArrayLiterals: # new in 1.41 + Enabled: true +Style/DataInheritance: # new in 1.49 + Enabled: true +Style/DirEmpty: # new in 1.48 + Enabled: true +Style/ExactRegexpMatch: # new in 1.51 + Enabled: true +Style/FileEmpty: # new in 1.48 + Enabled: true +Style/MapIntoArray: # new in 1.63 + Enabled: true +Style/MapToSet: # new in 1.42 + Enabled: true +Style/MinMaxComparison: # new in 1.42 + Enabled: true +Style/RedundantArrayConstructor: # new in 1.52 + Enabled: true +Style/RedundantConstantBase: # new in 1.40 + Enabled: true +Style/RedundantCurrentDirectoryInPath: # new in 1.53 + Enabled: true +Style/RedundantDoubleSplatHashBraces: # new in 1.41 + Enabled: true +Style/RedundantEach: # new in 1.38 + Enabled: true +Style/RedundantFilterChain: # new in 1.52 + Enabled: true +Style/RedundantHeredocDelimiterQuotes: # new in 1.45 + Enabled: true +Style/RedundantLineContinuation: # new in 1.49 + Enabled: true +Style/RedundantRegexpArgument: # new in 1.53 + Enabled: true +Style/RedundantRegexpConstructor: # new in 1.52 + Enabled: true +Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 + Enabled: true +Style/SingleLineDoEndBlock: # new in 1.57 + Enabled: true +Style/SuperWithArgsParentheses: # new in 1.58 + Enabled: true +Style/YAMLFileRead: # new in 1.53 + Enabled: true +Performance/MapMethodChain: # new in 1.19 + Enabled: true +Rails/DangerousColumnNames: # new in 2.21 + Enabled: true +Rails/EnvLocal: # new in 2.22 + Enabled: true +Rails/RedundantActiveRecordAllMethod: # new in 2.21 + Enabled: true +Rails/ResponseParsedBody: # new in 2.18 + Enabled: true +Rails/ThreeStateBooleanColumn: # new in 2.19 + Enabled: true +Rails/UnusedRenderContent: # new in 2.21 + Enabled: true From fd01fa3db13bb21b11d2b2b0b38fe405e2f0041e Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 17 May 2024 21:07:47 +0000 Subject: [PATCH 2/4] Resolve Style/RedundantCurrentDirectoryInPath --- test/test_avoid_object_send_with_dynamic_method.rb | 2 +- test/test_insecure_hash_algorithm.rb | 2 +- test/test_rails_controller_render_action_symbol.rb | 2 +- test/test_rails_controller_render_literal.rb | 2 +- test/test_rails_controller_render_shorthand.rb | 2 +- test/test_rails_render_object_collection.rb | 2 +- test/test_rails_view_render_literal.rb | 2 +- test/test_rails_view_render_shorthand.rb | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/test_avoid_object_send_with_dynamic_method.rb b/test/test_avoid_object_send_with_dynamic_method.rb index bdca640..b176cbc 100644 --- a/test/test_avoid_object_send_with_dynamic_method.rb +++ b/test/test_avoid_object_send_with_dynamic_method.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/avoid_object_send_with_dynamic_method" diff --git a/test/test_insecure_hash_algorithm.rb b/test/test_insecure_hash_algorithm.rb index 71df7e3..6e0277f 100644 --- a/test/test_insecure_hash_algorithm.rb +++ b/test/test_insecure_hash_algorithm.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/insecure_hash_algorithm" diff --git a/test/test_rails_controller_render_action_symbol.rb b/test/test_rails_controller_render_action_symbol.rb index 8376ab6..9b67a2c 100644 --- a/test/test_rails_controller_render_action_symbol.rb +++ b/test/test_rails_controller_render_action_symbol.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_controller_render_action_symbol" diff --git a/test/test_rails_controller_render_literal.rb b/test/test_rails_controller_render_literal.rb index 712b81d..5acd5c2 100644 --- a/test/test_rails_controller_render_literal.rb +++ b/test/test_rails_controller_render_literal.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_controller_render_literal" diff --git a/test/test_rails_controller_render_shorthand.rb b/test/test_rails_controller_render_shorthand.rb index 4998c02..f4bb111 100644 --- a/test/test_rails_controller_render_shorthand.rb +++ b/test/test_rails_controller_render_shorthand.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_controller_render_shorthand" diff --git a/test/test_rails_render_object_collection.rb b/test/test_rails_render_object_collection.rb index e5fa972..c13ec9a 100644 --- a/test/test_rails_render_object_collection.rb +++ b/test/test_rails_render_object_collection.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_render_object_collection" diff --git a/test/test_rails_view_render_literal.rb b/test/test_rails_view_render_literal.rb index 0def50e..7c081dd 100644 --- a/test/test_rails_view_render_literal.rb +++ b/test/test_rails_view_render_literal.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_view_render_literal" diff --git a/test/test_rails_view_render_shorthand.rb b/test/test_rails_view_render_shorthand.rb index 4c8110f..0077cee 100644 --- a/test/test_rails_view_render_shorthand.rb +++ b/test/test_rails_view_render_shorthand.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_view_render_shorthand" From 689f5bbaf4d2cb57b03bb710db8e924adfbb1b0a Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 17 May 2024 21:11:45 +0000 Subject: [PATCH 3/4] Switch Gemspec/DevelopmentDependencies to gemspec --- .rubocop.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index afe2d02..50ed10d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -8,3 +8,7 @@ Naming/FileName: - "rubocop-github.gemspec" - "lib/rubocop-github.rb" - "lib/rubocop-github-rails.rb" + +Gemspec/DevelopmentDependencies: + Enabled: true + EnforcedStyle: gemspec From aacab4994a3f834688d2d0b415d09d6b9f79341e Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 17 May 2024 21:13:54 +0000 Subject: [PATCH 4/4] Default pendng to false --- config/default_pending.yml | 66 ++++++++++++++++---------------- config/rails_pending.yml | 78 +++++++++++++++++++------------------- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/config/default_pending.yml b/config/default_pending.yml index d7161a4..9d18903 100644 --- a/config/default_pending.yml +++ b/config/default_pending.yml @@ -5,68 +5,68 @@ Style/OperatorMethodCall: # new in 1.37 Style/RedundantStringEscape: # new in 1.37 Enabled: false Gemspec/DevelopmentDependencies: # new in 1.44 - Enabled: true + Enabled: false Lint/DuplicateMatchPattern: # new in 1.50 - Enabled: true + Enabled: false Lint/ItWithoutArgumentsInBlock: # new in 1.59 - Enabled: true + Enabled: false Lint/LiteralAssignmentInCondition: # new in 1.58 - Enabled: true + Enabled: false Lint/MixedCaseRange: # new in 1.53 - Enabled: true + Enabled: false Lint/RedundantRegexpQuantifiers: # new in 1.53 - Enabled: true + Enabled: false Lint/UselessRescue: # new in 1.43 - Enabled: true + Enabled: false Metrics/CollectionLiteralLength: # new in 1.47 - Enabled: true + Enabled: false Style/ArrayIntersect: # new in 1.40 - Enabled: true + Enabled: false Style/ComparableClamp: # new in 1.44 - Enabled: true + Enabled: false Style/ConcatArrayLiterals: # new in 1.41 - Enabled: true + Enabled: false Style/DataInheritance: # new in 1.49 - Enabled: true + Enabled: false Style/DirEmpty: # new in 1.48 - Enabled: true + Enabled: false Style/ExactRegexpMatch: # new in 1.51 - Enabled: true + Enabled: false Style/FileEmpty: # new in 1.48 - Enabled: true + Enabled: false Style/MapIntoArray: # new in 1.63 - Enabled: true + Enabled: false Style/MapToSet: # new in 1.42 - Enabled: true + Enabled: false Style/MinMaxComparison: # new in 1.42 - Enabled: true + Enabled: false Style/RedundantArrayConstructor: # new in 1.52 - Enabled: true + Enabled: false Style/RedundantConstantBase: # new in 1.40 - Enabled: true + Enabled: false Style/RedundantCurrentDirectoryInPath: # new in 1.53 - Enabled: true + Enabled: false Style/RedundantDoubleSplatHashBraces: # new in 1.41 - Enabled: true + Enabled: false Style/RedundantEach: # new in 1.38 - Enabled: true + Enabled: false Style/RedundantFilterChain: # new in 1.52 - Enabled: true + Enabled: false Style/RedundantHeredocDelimiterQuotes: # new in 1.45 - Enabled: true + Enabled: false Style/RedundantLineContinuation: # new in 1.49 - Enabled: true + Enabled: false Style/RedundantRegexpArgument: # new in 1.53 - Enabled: true + Enabled: false Style/RedundantRegexpConstructor: # new in 1.52 - Enabled: true + Enabled: false Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 - Enabled: true + Enabled: false Style/SingleLineDoEndBlock: # new in 1.57 - Enabled: true + Enabled: false Style/SuperWithArgsParentheses: # new in 1.58 - Enabled: true + Enabled: false Style/YAMLFileRead: # new in 1.53 - Enabled: true + Enabled: false Performance/MapMethodChain: # new in 1.19 - Enabled: true + Enabled: false diff --git a/config/rails_pending.yml b/config/rails_pending.yml index 893864b..3e9582d 100644 --- a/config/rails_pending.yml +++ b/config/rails_pending.yml @@ -19,80 +19,80 @@ Rails/WhereMissing: # new in 2.16 Rails/WhereNotWithMultipleConditions: # new in 2.17 Enabled: false Gemspec/DevelopmentDependencies: # new in 1.44 - Enabled: true + Enabled: false Lint/DuplicateMatchPattern: # new in 1.50 - Enabled: true + Enabled: false Lint/ItWithoutArgumentsInBlock: # new in 1.59 - Enabled: true + Enabled: false Lint/LiteralAssignmentInCondition: # new in 1.58 - Enabled: true + Enabled: false Lint/MixedCaseRange: # new in 1.53 - Enabled: true + Enabled: false Lint/RedundantRegexpQuantifiers: # new in 1.53 - Enabled: true + Enabled: false Lint/UselessRescue: # new in 1.43 - Enabled: true + Enabled: false Metrics/CollectionLiteralLength: # new in 1.47 - Enabled: true + Enabled: false Style/ArrayIntersect: # new in 1.40 - Enabled: true + Enabled: false Style/ComparableClamp: # new in 1.44 - Enabled: true + Enabled: false Style/ConcatArrayLiterals: # new in 1.41 - Enabled: true + Enabled: false Style/DataInheritance: # new in 1.49 - Enabled: true + Enabled: false Style/DirEmpty: # new in 1.48 - Enabled: true + Enabled: false Style/ExactRegexpMatch: # new in 1.51 - Enabled: true + Enabled: false Style/FileEmpty: # new in 1.48 - Enabled: true + Enabled: false Style/MapIntoArray: # new in 1.63 - Enabled: true + Enabled: false Style/MapToSet: # new in 1.42 - Enabled: true + Enabled: false Style/MinMaxComparison: # new in 1.42 - Enabled: true + Enabled: false Style/RedundantArrayConstructor: # new in 1.52 - Enabled: true + Enabled: false Style/RedundantConstantBase: # new in 1.40 - Enabled: true + Enabled: false Style/RedundantCurrentDirectoryInPath: # new in 1.53 - Enabled: true + Enabled: false Style/RedundantDoubleSplatHashBraces: # new in 1.41 - Enabled: true + Enabled: false Style/RedundantEach: # new in 1.38 - Enabled: true + Enabled: false Style/RedundantFilterChain: # new in 1.52 - Enabled: true + Enabled: false Style/RedundantHeredocDelimiterQuotes: # new in 1.45 - Enabled: true + Enabled: false Style/RedundantLineContinuation: # new in 1.49 - Enabled: true + Enabled: false Style/RedundantRegexpArgument: # new in 1.53 - Enabled: true + Enabled: false Style/RedundantRegexpConstructor: # new in 1.52 - Enabled: true + Enabled: false Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 - Enabled: true + Enabled: false Style/SingleLineDoEndBlock: # new in 1.57 - Enabled: true + Enabled: false Style/SuperWithArgsParentheses: # new in 1.58 - Enabled: true + Enabled: false Style/YAMLFileRead: # new in 1.53 - Enabled: true + Enabled: false Performance/MapMethodChain: # new in 1.19 - Enabled: true + Enabled: false Rails/DangerousColumnNames: # new in 2.21 - Enabled: true + Enabled: false Rails/EnvLocal: # new in 2.22 - Enabled: true + Enabled: false Rails/RedundantActiveRecordAllMethod: # new in 2.21 - Enabled: true + Enabled: false Rails/ResponseParsedBody: # new in 2.18 - Enabled: true + Enabled: false Rails/ThreeStateBooleanColumn: # new in 2.19 - Enabled: true + Enabled: false Rails/UnusedRenderContent: # new in 2.21 - Enabled: true + Enabled: false