From 9cd4791ea151601a8f7f6dbd19bccd119b42f382 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 4 Jul 2026 20:20:51 +0200 Subject: [PATCH 1/8] RuboCop: avoid configuration that fails at start > Error: configuration for Lint/Syntax cop found in .rubocop.yml > It's not possible to disable this cop. This ended the whole execution. --- .rubocop.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 0b5a83bba..a50e8b830 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,10 +9,6 @@ AllCops: - bin/**/* - vendor/bundle/**/* -Lint/Syntax: - Exclude: - - app/views/**/*.haml - plugins: - rubocop-capybara - rubocop-performance From 2950126427665d4f6a77b84e76b18771b5dccd37 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 4 Jul 2026 20:25:49 +0200 Subject: [PATCH 2/8] chore: lint Lint/UselessAssignment --- lib/tasks/setup.rake | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/tasks/setup.rake b/lib/tasks/setup.rake index 8103c36d5..cae579efc 100644 --- a/lib/tasks/setup.rake +++ b/lib/tasks/setup.rake @@ -216,7 +216,6 @@ namespace :setup do puts errors = @results.count { |r| r[:status] == :error } warnings = @results.count { |r| r[:status] == :warn } - ok_count = @results.count { |r| r[:status] == :ok } if errors.zero? && warnings.zero? puts "✅ All checks passed! Your environment is ready for development." From cfa404f6506ce38819af0065c7511e8504a80c4d Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 4 Jul 2026 20:26:43 +0200 Subject: [PATCH 3/8] chore: lint Style/RedundantBegin --- lib/tasks/setup.rake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/tasks/setup.rake b/lib/tasks/setup.rake index cae579efc..9b61c560a 100644 --- a/lib/tasks/setup.rake +++ b/lib/tasks/setup.rake @@ -151,17 +151,17 @@ namespace :setup do end def check_database_connection - begin + ActiveRecord::Base.connection.execute('SELECT 1') ok('Database connection', 'can connect to PostgreSQL') rescue StandardError => e error('Database connection', "cannot connect (#{e.class}: #{e.message})", 'Check PostgreSQL is running and credentials in config/database.yml are correct.') - end + end def check_database_exists - begin + ActiveRecord::Base.connection.execute('SELECT 1') if ActiveRecord::Base.connection.execute("SELECT 1 FROM pg_database WHERE datname = 'planner_development'").any? ok('Development database', 'planner_development exists') @@ -172,11 +172,11 @@ namespace :setup do rescue StandardError => e error('Development database', "cannot check (#{e.class}: #{e.message})", 'Run: bundle exec rake db:create') - end + end def check_database_migrated - begin + if ActiveRecord::Base.connection.execute("SELECT 1 FROM schema_migrations LIMIT 1") latest = ActiveRecord::Base.connection.execute( "SELECT version FROM schema_migrations ORDER BY version DESC LIMIT 1" @@ -191,7 +191,7 @@ namespace :setup do rescue StandardError => e error('Database migrations', "cannot check (#{e.class}: #{e.message})", 'Run: bundle exec rake db:migrate') - end + end def check_test_database From e48680bbb5b45e8e03f1c21e562cf262d3015d3f Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 4 Jul 2026 20:28:27 +0200 Subject: [PATCH 4/8] chore: lint Layout/RescueEnsureAlignment --- lib/tasks/setup.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/setup.rake b/lib/tasks/setup.rake index 9b61c560a..e9c3d60bf 100644 --- a/lib/tasks/setup.rake +++ b/lib/tasks/setup.rake @@ -154,7 +154,7 @@ namespace :setup do ActiveRecord::Base.connection.execute('SELECT 1') ok('Database connection', 'can connect to PostgreSQL') - rescue StandardError => e + rescue StandardError => e error('Database connection', "cannot connect (#{e.class}: #{e.message})", 'Check PostgreSQL is running and credentials in config/database.yml are correct.') @@ -169,7 +169,7 @@ namespace :setup do error('Development database', 'planner_development does not exist', 'Run: bundle exec rake db:create') end - rescue StandardError => e + rescue StandardError => e error('Development database', "cannot check (#{e.class}: #{e.message})", 'Run: bundle exec rake db:create') @@ -188,7 +188,7 @@ namespace :setup do 'Run: bundle exec rake db:migrate') end end - rescue StandardError => e + rescue StandardError => e error('Database migrations', "cannot check (#{e.class}: #{e.message})", 'Run: bundle exec rake db:migrate') From b98af1a2882bccd5a39d0a4eea2421a2f34a27a6 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 4 Jul 2026 20:29:26 +0200 Subject: [PATCH 5/8] chore: lint Style/SymbolArray --- lib/tasks/setup.rake | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/tasks/setup.rake b/lib/tasks/setup.rake index e9c3d60bf..6fa313382 100644 --- a/lib/tasks/setup.rake +++ b/lib/tasks/setup.rake @@ -9,18 +9,18 @@ namespace :setup do end class SetupChecker - CHECKS = [ - :check_ruby_version, - :check_bundler, - :check_mise, - :check_postgresql, - :check_imagemagick, - :check_github_credentials, - :check_bundle, - :check_database_connection, - :check_database_exists, - :check_database_migrated, - :check_test_database + CHECKS = %i[ + check_ruby_version + check_bundler + check_mise + check_postgresql + check_imagemagick + check_github_credentials + check_bundle + check_database_connection + check_database_exists + check_database_migrated + check_test_database ].freeze def initialize From cc77b102b3afd78449f9b3dbc6d8b8e5846bddc5 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 4 Jul 2026 20:30:06 +0200 Subject: [PATCH 6/8] chore: lint Style/StringLiterals --- lib/tasks/setup.rake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/tasks/setup.rake b/lib/tasks/setup.rake index 6fa313382..17770722f 100644 --- a/lib/tasks/setup.rake +++ b/lib/tasks/setup.rake @@ -177,9 +177,9 @@ namespace :setup do def check_database_migrated - if ActiveRecord::Base.connection.execute("SELECT 1 FROM schema_migrations LIMIT 1") + if ActiveRecord::Base.connection.execute('SELECT 1 FROM schema_migrations LIMIT 1') latest = ActiveRecord::Base.connection.execute( - "SELECT version FROM schema_migrations ORDER BY version DESC LIMIT 1" + 'SELECT version FROM schema_migrations ORDER BY version DESC LIMIT 1' ).first if latest ok('Database migrations', "up to date (latest: #{latest['version']})") @@ -218,12 +218,12 @@ namespace :setup do warnings = @results.count { |r| r[:status] == :warn } if errors.zero? && warnings.zero? - puts "✅ All checks passed! Your environment is ready for development." + puts '✅ All checks passed! Your environment is ready for development.' puts - puts "Next steps:" - puts " bundle exec rails server # Start the app" - puts " bundle exec rspec # Run the test suite" - puts " bundle exec rake db:seed # (Optional) Add sample data" + puts 'Next steps:' + puts ' bundle exec rails server # Start the app' + puts ' bundle exec rspec # Run the test suite' + puts ' bundle exec rake db:seed # (Optional) Add sample data' elsif errors.zero? puts "⚠️ #{warnings} warning(s). You can probably start developing, but review the warnings above." else From d8f02c90beb4c508cad61cc281f030791d3b039f Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 4 Jul 2026 20:31:04 +0200 Subject: [PATCH 7/8] chore: lint Layout/TrailingWhitespace --- lib/tasks/setup.rake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/tasks/setup.rake b/lib/tasks/setup.rake index 17770722f..2623aa082 100644 --- a/lib/tasks/setup.rake +++ b/lib/tasks/setup.rake @@ -151,17 +151,17 @@ namespace :setup do end def check_database_connection - + ActiveRecord::Base.connection.execute('SELECT 1') ok('Database connection', 'can connect to PostgreSQL') rescue StandardError => e error('Database connection', "cannot connect (#{e.class}: #{e.message})", 'Check PostgreSQL is running and credentials in config/database.yml are correct.') - + end def check_database_exists - + ActiveRecord::Base.connection.execute('SELECT 1') if ActiveRecord::Base.connection.execute("SELECT 1 FROM pg_database WHERE datname = 'planner_development'").any? ok('Development database', 'planner_development exists') @@ -172,11 +172,11 @@ namespace :setup do rescue StandardError => e error('Development database', "cannot check (#{e.class}: #{e.message})", 'Run: bundle exec rake db:create') - + end def check_database_migrated - + if ActiveRecord::Base.connection.execute('SELECT 1 FROM schema_migrations LIMIT 1') latest = ActiveRecord::Base.connection.execute( 'SELECT version FROM schema_migrations ORDER BY version DESC LIMIT 1' @@ -191,7 +191,7 @@ namespace :setup do rescue StandardError => e error('Database migrations', "cannot check (#{e.class}: #{e.message})", 'Run: bundle exec rake db:migrate') - + end def check_test_database From f949c1d5d0bda42f2e3c162d18877c8f0f577c6e Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 4 Jul 2026 20:31:57 +0200 Subject: [PATCH 8/8] chore: lint Layout/EmptyLinesAroundMethodBody --- lib/tasks/setup.rake | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/tasks/setup.rake b/lib/tasks/setup.rake index 2623aa082..e7addb83a 100644 --- a/lib/tasks/setup.rake +++ b/lib/tasks/setup.rake @@ -151,17 +151,14 @@ namespace :setup do end def check_database_connection - ActiveRecord::Base.connection.execute('SELECT 1') ok('Database connection', 'can connect to PostgreSQL') rescue StandardError => e error('Database connection', "cannot connect (#{e.class}: #{e.message})", 'Check PostgreSQL is running and credentials in config/database.yml are correct.') - end def check_database_exists - ActiveRecord::Base.connection.execute('SELECT 1') if ActiveRecord::Base.connection.execute("SELECT 1 FROM pg_database WHERE datname = 'planner_development'").any? ok('Development database', 'planner_development exists') @@ -172,11 +169,9 @@ namespace :setup do rescue StandardError => e error('Development database', "cannot check (#{e.class}: #{e.message})", 'Run: bundle exec rake db:create') - end def check_database_migrated - if ActiveRecord::Base.connection.execute('SELECT 1 FROM schema_migrations LIMIT 1') latest = ActiveRecord::Base.connection.execute( 'SELECT version FROM schema_migrations ORDER BY version DESC LIMIT 1' @@ -191,7 +186,6 @@ namespace :setup do rescue StandardError => e error('Database migrations', "cannot check (#{e.class}: #{e.message})", 'Run: bundle exec rake db:migrate') - end def check_test_database