Open skalee opened 3 years ago
This is because Hound simply merges organization-wide configuration into project-specific one, instead of relying on RuboCop's inheritance rules:
To clarify: It isn't a problem when overriding specific cop, but it is a problem when overriding the whole department. Due to incorrect merging, more specific Metrics/MethodLength
takes precedence over Metrics
. That would be correct if they were set in the same file. But they are not, hence Metrics
should take precedence over Metrics/MethodLength
, as the latter is defined in the inherited style book.
Hound inherits organization-wide Ruby style book in a different way than RuboCop.
Given organization-wide .rubocop.yml
and project-specific .rubocop.yml:
Hound reports violations of
Metrics/MethodLength
, whereas local RuboCop does not (cop is disabled as expected). IMO Hound's behaviour is incorrect.RuboCop 1.5.2 in both cases.