Skip to content

Don't exclude config and DB files #47

Description

@topalovic

Hey @swiknaba 👋🏼

I'd like to wire up a custom cop that checks DB migration files only. Since our project inherits from rubocop-dbl:

inherit_gem:
  rubocop-dbl:
    - config/dbl.yml

we're excluding db/**/* by default:

https://github.com/dbl-works/rubocop-dbl/blob/v1.2.0/config/dbl.yml#L37-L38

Unfortunately, RuboCop doesn't "cascade" inclusion/exclusion rules, so I cannot override this by saying Include: 'db/**/*' later in our config. There is a --ignore-parent-exclusion switch that can be passed to the command, but it: 1) has no counterpart in YAML, 2) ignores all exclusions.

So I would kindly ask you to consider removing the two lines from the default config, allowing cops to operate in db and config folders. If a project wants to ignore them, it's as easy as re-adding these 1-2 lines to the downstream config. The opposite, however, is impossible at the moment.

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