Skip to content

Commit 2d0682b

Browse files
committed
feat: add rake lint task for combined syntax and style checks
- Add rake lint task that runs both syntax checking and RuboCop - Update rake ci to use lint task for better organization - Update rake help to show lint as the primary code quality check - Update README documentation to highlight lint task - Provide granular options: lint (combined), syntax (only), rubocop (only) - Improve development workflow with clearer task hierarchy
1 parent 778b182 commit 2d0682b

2 files changed

Lines changed: 25 additions & 10 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,14 @@ bundle exec rake help
215215
# Run all CI checks (recommended for development)
216216
bundle exec rake ci
217217

218-
# Individual commands
219-
bundle exec rake rubocop # Run RuboCop linter
220-
bundle exec rake test # Run all tests
218+
# Code quality checks
219+
bundle exec rake lint # Run linting (syntax + rubocop)
220+
bundle exec rake rubocop # Run RuboCop linter only
221221
bundle exec rake syntax # Check syntax only
222222

223+
# Testing
224+
bundle exec rake test # Run all tests
225+
223226
# Run specific test groups
224227
bundle exec rake test_services
225228
bundle exec rake test_app

Rakefile

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ task :help do
2626
puts ""
2727

2828
puts "🔧 Code Quality:"
29-
puts " rake syntax # Check Ruby syntax"
30-
puts " rake rubocop # Run RuboCop linter"
29+
puts " rake lint # Run linting checks (syntax + rubocop)"
30+
puts " rake syntax # Check Ruby syntax only"
31+
puts " rake rubocop # Run RuboCop linter only"
3132
puts ""
3233

3334
puts "📦 Release Management:"
@@ -90,10 +91,10 @@ task :syntax do
9091
puts 'All files have valid syntax!'
9192
end
9293

93-
# Run all CI checks (same as GitHub Actions)
94-
desc 'Run all CI checks (syntax + rubocop + tests) - same as GitHub Actions'
95-
task :ci do
96-
puts '🔍 Running CI checks...'
94+
# Run linting checks (syntax + rubocop)
95+
desc 'Run linting checks (syntax + rubocop)'
96+
task :lint do
97+
puts '🔍 Running linting checks...'
9798

9899
puts "\n📋 Step 1: Checking syntax..."
99100
Rake::Task[:syntax].invoke
@@ -105,7 +106,18 @@ task :ci do
105106
puts '⚠️ RuboCop not available, skipping...'
106107
end
107108

108-
puts "\n🧪 Step 3: Running tests..."
109+
puts "\n✅ All linting checks passed!"
110+
end
111+
112+
# Run all CI checks (same as GitHub Actions)
113+
desc 'Run all CI checks (syntax + rubocop + tests) - same as GitHub Actions'
114+
task :ci do
115+
puts '🔍 Running CI checks...'
116+
117+
puts "\n� Step 1: Running linting checks..."
118+
Rake::Task[:lint].invoke
119+
120+
puts "\n🧪 Step 2: Running tests..."
109121
Rake::Task[:test].invoke
110122

111123
puts "\n✅ All CI checks passed!"

0 commit comments

Comments
 (0)