Skip to content

fix(ci): ruboCop excludes the whole test directory while the Gemfile - #117

Open
ronitkhokharr wants to merge 2 commits into
thoth-tech:11.0.xfrom
ontrack-features-t2-2026:fix/tci-03
Open

ronitkhokharr wants to merge 2 commits into
thoth-tech:11.0.xfrom
ontrack-features-t2-2026:fix/tci-03

Conversation

@ronitkhokharr

@ronitkhokharr ronitkhokharr commented Sep 17, 2026

Copy link
Copy Markdown

Description

This PR addresses TCI-03 by enabling RuboCop coverage for the test suite and loading the RuboCop extensions that are already included in the Gemfile.

Previously, .rubocop.yml excluded test/**/*, while rubocop-minitest and rubocop-factory_bot were installed but not loaded. As a result, test files were excluded from the normal RuboCop run and the Minitest/FactoryBot-specific cops were inactive.

Changes

  • Removed test/**/* from AllCops.Exclude.
  • Enabled rubocop-minitest.
  • Enabled rubocop-factory_bot.
  • Regenerated .rubocop_todo.yml using bundle exec rubocop --auto-gen-config against the current upstream 11.0.x base so existing offences are baselined while CI remains green.
  • Added test/config/rubocop_configuration_test.rb as a regression test for the required RuboCop configuration.

RuboCop Configuration

The updated configuration now ensures that:

  • The test directory is included in RuboCop analysis.
  • rubocop-minitest is loaded.
  • rubocop-factory_bot is loaded.
  • Existing offences are captured in .rubocop_todo.yml rather than excluding the entire test directory.

Auto-Generated Baseline

The RuboCop todo was regenerated against the current upstream 11.0.x codebase.

Phase 1:

456 files inspected
1047 offenses detected
771 offenses autocorrectable
Created .rubocop_todo.yml.

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.

1 participant