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

[BUG] Markdown Lint Configuration #1560

Closed
eduardomr opened this issue Jun 1, 2023 · 3 comments · Fixed by #1594
Closed

[BUG] Markdown Lint Configuration #1560

eduardomr opened this issue Jun 1, 2023 · 3 comments · Fixed by #1594
Labels
bug Something isn't working

Comments

@eduardomr
Copy link
Contributor

Description

There is a need to lint all of the markdown files in the repository and eliminate all of the exclusions currently in place. However, it is not clear where the markdown linting exclusions are set.

Expected Behavior

All markdown files in the repository should be linted, including those that are currently excluded from the linting process.

Actual Behavior

Markdown files in the repository are being linted, but there are exclusions in place that prevent some files from being checked. It is unclear where these exclusions are defined or how to modify them.

@eduardomr eduardomr added the bug Something isn't working label Jun 1, 2023
@BenSturmfels
Copy link
Contributor

Hi @eduardomr, is the problem that there an error in the Markdown somewhere you feel should have been detected? Can you provide an example?

In .github/workflows/pr.yml you'll see the configuration for the GitHub action that runs yarn markdownlint, which ultimately translates to:

npx markdownlint-cli **/*.md --ignore node_modules

There's also a config file .markdownlint.jsonc. Not sure that markdownlint would find a .jsonc file - I haven't tested whether this config is actually taking effect.

@eduardomr
Copy link
Contributor Author

Hi @BenSturmfels, we believe that the README is not being checked by the markdown lint, however we cannot find where this setting was made.

@BenSturmfels
Copy link
Contributor

@eduardomr @wwahammy it looks like the culprit is that **/*.md isn't quoted in the command and is being treated as a shell glob. I would recommend either:

npx markdownlint-cli '**/*.md' --ignore node_modules

or even better - you only ever want to check the files that are in the repository:

git ls-files '*.md' | xargs npx markdownlint-cli

Be aware that this second option will flag Markdown errors in the vendored gems directory, which is probably a good thing, but a little noisy to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants