Skip to content

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

Open
@issyl0

Description

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

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