Skip to content

Fix lint and test failures in PR #3 - #6

Merged
sansari merged 4 commits into
claude/review-production-access-raAQqfrom
copilot/sub-pr-3-another-one
Feb 17, 2026
Merged

sansari merged 4 commits into
claude/review-production-access-raAQqfrom
copilot/sub-pr-3-another-one

Conversation

Copilot AI commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor

PR #3 failed CI due to RuboCop violations and test errors caused by missing credentials in the test environment.

Changes

  • Test failures: Changed Rails.application.credentials.vapid[:public_key] to credentials.dig(:vapid, :public_key) in application.html.erb to handle missing VAPID credentials gracefully in tests

  • Lint violations:

    • Disabled Layout/SpaceInsideArrayLiteralBrackets rule in .rubocop.yml to allow flexible array bracket spacing
    • Fixed Layout/EmptyLinesAroundClassBody error by removing extra empty line before class end in test/models/maintenance_task_test.rb

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Fix RuboCop Layout/SpaceInsideArrayLiteralBrackets errors by removing spaces inside array brackets
- Fix test failures by using dig() to safely access VAPID credentials that may not be set in test environment

Co-authored-by: sansari <105090+sansari@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Mark Done button to tasks on dashboard and detail page Fix lint and test failures in PR #3 Feb 17, 2026
Copilot AI requested a review from sansari February 17, 2026 03:24
@sansari

sansari commented Feb 17, 2026

Copy link
Copy Markdown
Owner

@copilot lint still failing

- Add spaces inside array brackets per rubocop-rails-omakase style guide
- Changed [:foo] to [ :foo ] in 4 controller files

Co-authored-by: sansari <105090+sansari@users.noreply.github.com>

Copilot AI commented Feb 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot lint still failing

I've fixed the lint errors in commit b436197. My initial fix was incorrect - I removed spaces when I should have added them. The rubocop-rails-omakase style guide requires spaces INSIDE array brackets: [ :foo, :bar ] not [:foo, :bar].

Fixed in:

  • app/controllers/equipment_controller.rb
  • app/controllers/maintenance_tasks_controller.rb (2 arrays)
  • app/controllers/push_subscriptions_controller.rb

The CI workflow is waiting for approval to run. Once approved, the lint job should pass.

@sansari

sansari commented Feb 17, 2026

Copy link
Copy Markdown
Owner

@copilot its still failing... just disable that rule and fix the end of file line

…ty line

- Disable Layout/SpaceInsideArrayLiteralBrackets in .rubocop.yml
- Remove extra empty line before class end in maintenance_task_test.rb

Co-authored-by: sansari <105090+sansari@users.noreply.github.com>

Copilot AI commented Feb 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot its still failing... just disable that rule and fix the end of file line

Fixed in commit 3ccdc67:

  • Disabled Layout/SpaceInsideArrayLiteralBrackets rule in .rubocop.yml
  • Removed extra empty line before class end in test/models/maintenance_task_test.rb

The lint job should now pass.

@sansari
sansari marked this pull request as ready for review February 17, 2026 04:06
@sansari
sansari merged commit 727b10b into claude/review-production-access-raAQq Feb 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants