Skip to content

Consolidate RuboCop configuration - #6162

Open
lloeki wants to merge 2 commits into
masterfrom
lloeki/rubocop-consolidate-configuration
Open

Consolidate RuboCop configuration#6162
lloeki wants to merge 2 commits into
masterfrom
lloeki/rubocop-consolidate-configuration

Conversation

@lloeki

@lloeki lloeki commented Aug 6, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Consolidates custom-cop configuration and Standard overrides into .rubocop.yml, making it the single RuboCop configuration. It replaces the rules-specific Rake implementation with RuboCop::RakeTask, preserves rubocop:fix, removes the obsolete config files, and removes the duplicate RuboCop invocation from the Standard CI job.

Motivation:

RuboCop configuration was split across .rubocop.yml, .customcops.yml, and rubocop/standard_overrides.rubocop.yml. Additionally, rake rubocop only ran the cops from the override file instead of the normal project configuration. A single configuration and the upstream Rake task remove that special casing.

Tracks APMLP-1586.

Change log entry

None.

Additional Notes:

The Rake task is registered only when RuboCop is present because alternate test-matrix Gemfiles intentionally omit the lint dependencies.

How to test the change?

  • nix develop --command bundle exec rake rubocop standard
  • nix develop --command bundle exec rake spec:custom_cop
  • nix develop --command bundle exec rake test:main
  • nix run nixpkgs#yamllint -- --strict .rubocop.yml .standard.yml .standard_todo.yml .github/workflows/check.yml
  • nix run nixpkgs#actionlint -- -ignore 'constant expression "false"' .github/workflows/check.yml

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 89.98% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6f01ad5 | Docs | Datadog PR Page | Give us feedback!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e974d91f89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .rubocop.yml
@lloeki
lloeki force-pushed the lloeki/rubocop-consolidate-configuration branch from e974d91 to 06bab91 Compare August 7, 2026 10:15
@lloeki
lloeki requested a review from a team as a code owner August 7, 2026 10:31
@dd-octo-sts dd-octo-sts Bot added the openfeature A new component that provider an ability to configure feature flags label Aug 7, 2026
@lloeki
lloeki force-pushed the lloeki/rubocop-consolidate-configuration branch from 2b7dc17 to 6f01ad5 Compare August 7, 2026 10:34
Comment thread AGENTS.md
- Using alternate gemfile: `BUNDLE_GEMFILE=$(pwd)/gemfiles/<name>.gemfile`. For running matrix-specific jobs.
- Smoke verification: `bundle exec rake test:main`. Baseline general testing (no native or integration testing).
- Lint and type check: `bundle exec rake standard typecheck`.
- Lint and type check: `bundle exec rake rubocop typecheck`. Prefer RuboCop because it checks a strict superset of the Standard rules; CI requires both, which can be run with `bundle exec rake standard rubocop typecheck`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO we should encapsulate this with our own rake task that is underneath using whatever. It will make instructions stable and hide implementation details. We still can point to some details somehow different, but I think 2 times adjustments already shows us - we might change it 3rd time

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could indeed have something like a task :check => [:standard, :rubocop, :typecheck] and be done with it but then we'd be discussing the exact namespace and scope of what it should run...

In this PR I tried to stay focused on bridging the gap and minimise the changes by not introducing anything new. Agents don't really care about whether it's a single task or multiple anyway.

So I think this is a task for another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

openfeature A new component that provider an ability to configure feature flags

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants