Skip to content
Open
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: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '3.2'
- '3.3'
- '3.4'
- '4.0'
Expand Down Expand Up @@ -59,7 +58,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '3.2'
- '3.3'
- '3.4'
- '4.0'
Expand Down Expand Up @@ -90,7 +88,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '3.2'
- '3.3'
- '3.4'
- '4.0'
Expand Down Expand Up @@ -121,7 +118,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '3.2'
- '3.3'
- '3.4'
- '4.0'
Expand Down
9 changes: 8 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AllCops:
- 'tmp/**/*'
- 'vendor/**/*'
- 'gemfiles/*'
TargetRubyVersion: 3.2
TargetRubyVersion: 3.3

Gemspec/DevelopmentDependencies:
Exclude:
Expand Down Expand Up @@ -76,6 +76,13 @@ Style/Documentation:
Style/HashSyntax:
EnforcedShorthandSyntax: either

Style/OneClassPerFile:
Exclude:
- 'lib/rubycritic/analysers/helpers/ast_node.rb'
- 'test/analysers_test_helper.rb'
- 'test/fakefs_helper.rb'
- 'test/test_helper.rb'

Style/OpenStructUse:
Exclude:
- 'test/lib/rubycritic/generators/turbulence_test.rb'
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* [CHORE] ...
* [FEATURE] ...

* [CHANGE] Drop support for Ruby 3.2 (by [@faisal][])

# v5.0.0 / 2026-01-26 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.12.0...v5.0.0)

* [CHORE] Bump byebug dependency (by [@faisal][])
Expand Down
4 changes: 1 addition & 3 deletions lib/rubycritic/analysers/helpers/ast_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ def recursive_children(&block)
end

def module_names
ast_node_children = children.select do |child|
child.is_a?(Parser::AST::Node)
end
ast_node_children = children.grep(Parser::AST::Node)

children_modules = ast_node_children.flat_map(&:module_names)

Expand Down
4 changes: 2 additions & 2 deletions lib/rubycritic/analysis_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def initialize(analysed_modules)
end

def generate
%w[A B C D F].each_with_object({}) do |rating, summary|
summary[rating] = generate_for(rating)
%w[A B C D F].to_h do |rating|
[rating, generate_for(rating)]
end
end

Expand Down
2 changes: 1 addition & 1 deletion rubycritic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
spec.summary = 'RubyCritic is a Ruby code quality reporter'
spec.homepage = 'https://github.com/whitesmith/rubycritic'
spec.license = 'MIT'
spec.required_ruby_version = '>= 3.2.0'
spec.required_ruby_version = '>= 3.3.0'

spec.files = [
'CHANGELOG.md',
Expand Down
Loading