Skip to content

Docs Lint inspects zero files: the root .rubocop.yml's AllCops Exclude docs/**/* reaches the docs run #15

Description

@mhenrixon

cd docs && bundle exec rubocop, and the Docs Lint job in .github/workflows/main.yml that runs the same thing, print Inspecting 0 files … no offenses detected and exit 0. The root .rubocop.yml has AllCops: Exclude: - docs/**/* (line 11). RuboCop merges AllCops/Exclude from ancestor configs into a subdirectory's own .rubocop.yml, so the docs tree excludes itself. Reproduced on a clean checkout and with a minimal two-directory repro outside it.

Fix shape: scope the root exclusion so it does not reach the docs run (RuboCop's inherit_mode with override for Exclude in docs/.rubocop.yml, or drop docs/**/* from the root AllCops and rely on the root invocation being rubocop lib spec as CI already does), then confirm cd docs && bundle exec rubocop inspects a non-zero file count.

Found by the pre-PR gate while seeding the lode (see the chore: seed the lode PR); lode/workflow.md and lode/testing-and-ci/summary.md state the current behaviour and link here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions