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

Lint all markdown files in CI #4402

Merged
merged 10 commits into from May 20, 2020
Merged

Conversation

kleimkuhler
Copy link
Contributor

Motivation

linkerd/rfc#22

Solution

Use the markdown-lint-action to lint all .md files for all pull requests
and pushes to master.

This action uses the default rules outlined in markdownlint
package
.

The additional rules are added are explained below:

  • Ignore line length lints for code blocks
  • Ignore line length lints for tables
  • Allow duplicate sub-headers in sibling headers (e.g. allowing multiple ##
    Significant headers in CHANGES.md as long as they are part of separate
    release headers)

Signed-off-by: Kevin Leimkuhler kevin@kleimkuhler.com

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler
Copy link
Contributor Author

This depends on #4403 which applies all the lints that this will error on.

Copy link
Contributor

@grampelberg grampelberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, should we have a .prettierrc in here to do the formatting by default for folks?

Copy link
Member

@adleong adleong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to run markdown linting locally? How do I know if I've violated a lint rule before running through CI?

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler
Copy link
Contributor Author

@adleong I answered this here.

I added a bin/markdownlint script here that will use npm to install the CLI command locally--not globally. I tried downloading the GH release and using node to run the JS file, but it's missing a few things that prevent it from being run out of the box.

Using npm install markdownlint@version makes the most sense.

bin/markdownlint Outdated Show resolved Hide resolved
.github/workflows/static_checks.yml Outdated Show resolved Hide resolved
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler kleimkuhler requested a review from adleong May 18, 2020 16:51
Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

…n-lints-ci

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
kleimkuhler added a commit that referenced this pull request May 19, 2020
## Motivation

Necessary lints for #4402

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
…n-lints-ci

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler kleimkuhler merged commit d99c148 into master May 20, 2020
@kleimkuhler kleimkuhler deleted the kleimkuhler/markdown-lints-ci branch May 20, 2020 06:03
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

Successfully merging this pull request may close these issues.

None yet

4 participants