You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hound inherits organization-wide Ruby style book in a different way than RuboCop.
Given organization-wide .rubocop.yml
Metrics/MethodLength:
Description: Avoid methods longer than 10 lines of code.
Max: 10
and project-specific .rubocop.yml:
# This is for locally installed RuboCop. Hound ignores it.
inherit_from:
- https://raw.githubusercontent.com/path/to/organization-wide/.rubocop.yml
Metrics:
Enabled: false
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: