Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ PATH
remote: .
specs:
rubocop-github (0.27.0)
rubocop (>= 1.76)
rubocop (>= 1.91)
rubocop-performance (>= 1.24)
rubocop-rails (>= 2.23)
rubocop-rails (>= 2.34)

GEM
remote: https://rubygems.org/
Expand Down
6 changes: 3 additions & 3 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ Lint/ConstantOverwrittenInRescue:
Lint/ConstantResolution:
Enabled: false

Lint/CopDirectiveSyntax:
Enabled: false

Lint/Debugger:
Enabled: true

Expand Down Expand Up @@ -1149,9 +1152,6 @@ Style/Documentation:
Style/DocumentationMethod:
Enabled: false

Style/DoubleCopDisableDirective:
Enabled: false

Style/DoubleNegation:
Enabled: false

Expand Down
84 changes: 84 additions & 0 deletions config/default_pending.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,89 @@ Style/SendWithLiteralMethodName: # new in 1.64
Enabled: false
Style/SuperArguments: # new in 1.64
Enabled: false
Gemspec/AttributeAssignment: # new in 1.77
Enabled: true
Layout/EmptyLinesAfterModuleInclusion: # new in 1.79
Enabled: true
Lint/ArgumentMismatch: # new in 1.90
Enabled: true
Lint/ArrayLiteralInRegexp: # new in 1.71
Enabled: true
Lint/DataDefineOverride: # new in 1.85
Enabled: true
Lint/DeprecatedReference: # new in 1.89
Enabled: true
Lint/MisplacedMagicComment: # new in 1.91
Comment thread
issyl0 marked this conversation as resolved.
Enabled: true
Lint/NameTypo: # new in 1.89
Enabled: true
Lint/RedundantTypeConversion: # new in 1.72
Enabled: true
Lint/SuperArgumentMismatch: # new in 1.90
Enabled: true
Lint/SuppressedExceptionInNumberConversion: # new in 1.72
Enabled: true
Lint/UnreachablePatternBranch: # new in 1.85
Enabled: true
Lint/UselessConstantScoping: # new in 1.72
Enabled: true
Lint/UselessDefaultValueArgument: # new in 1.76
Enabled: true
Lint/UselessOr: # new in 1.76
Enabled: true
Naming/PredicateMethod: # new in 1.76
Enabled: true
Style/ArrayIntersectWithSingleElement: # new in 1.81
Enabled: true
Style/CollectionQuerying: # new in 1.77
Enabled: true
Style/ComparableBetween: # new in 1.74
Enabled: true
Style/DirectiveScope: # new in 1.90
Enabled: true
Style/EmptyClassDefinition: # new in 1.84
Enabled: true
Style/EmptyStringInsideInterpolation: # new in 1.76
Enabled: true
Style/FileOpen: # new in 1.85
Enabled: true
Style/HashFetchChain: # new in 1.75
Enabled: true
Style/HashSlice: # new in 1.71
Enabled: true
Style/ItBlockParameter: # new in 1.75
Enabled: true
Style/MapJoin: # new in 1.85
Enabled: true
Style/ModuleMemberExistenceCheck: # new in 1.82
Enabled: true
Style/NegativeArrayIndex: # new in 1.84
Enabled: true
Style/OneClassPerFile: # new in 1.85
Enabled: true
Style/PartitionInsteadOfDoubleSelect: # new in 1.85
Enabled: true
Style/PredicateWithKind: # new in 1.85
Enabled: true
Style/ReduceToHash: # new in 1.85
Enabled: true
Style/RedundantArrayFlatten: # new in 1.76
Enabled: true
Style/RedundantFormat: # new in 1.72
Enabled: true
Style/RedundantMinMaxBy: # new in 1.85
Enabled: true
Style/ReverseFind: # new in 1.84
Enabled: true
Style/SelectByKind: # new in 1.85
Enabled: true
Style/SelectByRange: # new in 1.85
Enabled: true
Style/TallyMethod: # new in 1.85
Enabled: true
Style/TimeNow: # new in 1.90
Enabled: true
Performance/StringBytesize: # new in 1.23
Enabled: false
Performance/ZipWithoutBlock: # new in 1.24
Enabled: true
12 changes: 12 additions & 0 deletions config/rails_pending.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,15 @@ Rails/EnumSyntax: # new in 2.26
Enabled: false
Rails/WhereRange: # new in 2.25
Enabled: false
Rails/FindByOrAssignmentMemoization: # new in 2.33
Enabled: true
Rails/HttpStatusNameConsistency: # new in 2.34
Comment thread
issyl0 marked this conversation as resolved.
Enabled: true
Rails/MultipleRoutePaths: # new in 2.29
Enabled: true
Rails/OrderArguments: # new in 2.33
Enabled: true
Rails/RedirectBackOrTo: # new in 2.34
Enabled: true
Rails/StrongParametersExpect: # new in 2.29
Enabled: true
3 changes: 3 additions & 0 deletions lib/rubocop/cop/github/rails_view_render_literal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def on_send(node)
return
end

# `many?` is an ActiveSupport extension, but this cop runs without ActiveSupport.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing the reference to many? that this comment references 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The disabled cop just beneath it wants to change the count > 1 to many?.

# rubocop:disable Style/CollectionQuerying
if render_literal?(node) && node.arguments.count > 1
# rubocop:enable Style/CollectionQuerying
locals = node.arguments[1]
elsif option_pairs = render_with_options?(node)
locals = option_pairs.map { |pair| locals_key?(pair) }.compact.first
Expand Down
6 changes: 3 additions & 3 deletions rubocop-github.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Gem::Specification.new do |s|

s.files = Dir["README.md", "STYLEGUIDE.md", "LICENSE", "config/*.yml", "lib/**/*.rb", "guides/*.md"]

s.required_ruby_version = ">= 3.3.0"
s.required_ruby_version = ">= 3.4.2"

s.add_dependency "rubocop", ">= 1.76"
s.add_dependency "rubocop", ">= 1.91"
s.add_dependency "rubocop-performance", ">= 1.24"
s.add_dependency "rubocop-rails", ">= 2.23"
s.add_dependency "rubocop-rails", ">= 2.34"

s.add_development_dependency "actionview", "~> 8.1.3"
s.add_development_dependency "minitest"
Expand Down
Loading