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
Full disclosure: I might be missing something here. Trust but verify.
So #7295 enabled setting the StyleGuideBaseURL config at the department level, which is great because I have 200 cops in a few different departments and I want to push users to our docs when they encounter those cops. It's not really something I want to include in the config 200 times. Per department is 😘.
The problem is I have nested departments like Chef/Style/UsePlatformHelpers
and then later define the cop with a StyleGuide config like this:
Chef/Style/UsePlatformHelpers:
Description: Use platform? and platform_family? helpers to check node platform in resources and recipesStyleGuide: '#chefstyleuseplatformhelpers'Enabled: trueVersionAdded: '5.6.0'Exclude:
- '**/metadata.rb'
- '**/libraries/*'
- '**/Berksfile'
You would think I'd end up with:
R: [Correctable] Chef/Style/UsePlatformHelpers: Use platform? and platform_family? helpers to check a node's platform (https://docs.chef.io/whatever#chefstyleuseplatformhelpers)
version << rhel_append_version if node['platform_family'] == 'rhel' &&
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Actual behavior
You get the BaseURL defined in AllCops in the rubocop project config:
R: [Correctable] Chef/Style/UsePlatformHelpers: Use platform? and platform_family? helpers to check a node's platform (https://rubystyle.guide#chefstyleuseplatformhelpers)
version << rhel_append_version if node['platform_family'] == 'rhel' &&
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If I change it at the AllCops level in my config it works fine, but not at the department level.
Expected behavior
Full disclosure: I might be missing something here. Trust but verify.
So #7295 enabled setting the
StyleGuideBaseURL
config at the department level, which is great because I have 200 cops in a few different departments and I want to push users to our docs when they encounter those cops. It's not really something I want to include in the config 200 times. Per department is 😘.The problem is I have nested departments like
Chef/Style/UsePlatformHelpers
In the config if I set
and then later define the cop with a
StyleGuide
config like this:You would think I'd end up with:
Actual behavior
You get the BaseURL defined in AllCops in the rubocop project config:
If I change it at the AllCops level in my config it works fine, but not at the department level.
RuboCop version
This is in within Cookstyle in a RuboCop 1.9 branch here: https://github.com/chef/cookstyle/tree/1.9
As always to everyone here. RuboCop is amazing. Thanks for everything you do.
The text was updated successfully, but these errors were encountered: