Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deep links into the styleguide for each cop in config/default.yml #133

Open
issyl0 opened this issue Oct 26, 2022 · 0 comments
Open

Comments

@issyl0
Copy link
Member

issyl0 commented Oct 26, 2022

In #132 we linked each styleguide rule to its corresponding RuboCop rule(s).

RuboCop has functionality where a StyleGuide: <link> config for each cop will show the link to the styleguide when there's a violation or a user just wants to know what cops are enabled. We haven't added all of these cross-references yet, and we should finish off.

For each of the rules in the styleguide, add StyleGuide: under its cop name in config/default.yml. If it doesn't have a config, add the full stanza. For example:

# This rule is specifically disabled, but we still want it to have a styleguide link.
Layout/LineLength:
  Enabled: false
  StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#line-length

# Pretend this rule didn't exist in the config file before, as an example. Since it's a RuboCop default cop and doesn't need any special configuration. But, we still want a styleguide link, so add the whole rule name.
Layout/EmptyLineBetweenDefs:
  StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#empty-lines-def
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant