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

Feature Request: Add a linter for the docs #175

Closed
tushar5526 opened this issue Feb 25, 2022 · 8 comments
Closed

Feature Request: Add a linter for the docs #175

tushar5526 opened this issue Feb 25, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@tushar5526
Copy link
Contributor

tushar5526 commented Feb 25, 2022

Is your feature request related to a problem? Please describe.

I observed that we are merging a lot of faulty PRs(broken links, garbage data in README) due to manual reviews. Linting will help us in reviewing new PRs and there are other benefits.

Linters help in SEO optimisations, checking broken links and following industry standards that helps a lot in maintaining uniformity.

Describe the solution you'd like.

Add a GHA linter for docs repo, that runs on each Pull request and also add steps in contributing guide to locally test the code through linter.

Describe alternatives you've considered

No response

Additional context.

p5py/p5#268
I had implemented a linter once and it helped us a lot in identifying the errors beforehand.

@tushar5526 tushar5526 added the enhancement New feature or request label Feb 25, 2022
@tushar5526
Copy link
Contributor Author

@joewxboy I will do it if it's a ✅ from your end.

@joewxboy
Copy link
Member

You'd have to find a linter that either:

  • validated the Markdown files with inline Liquid templating
  • or -
  • waited until after GitHub Pages GHA ran, and then validated the generated output. We already have one that will do that for merged PRs. Maybe what you want is to run it on the PR's branch before it is merged to check the output?

@Abhijay007
Copy link
Contributor

Abhijay007 commented Apr 25, 2022

Hi, @Rene-Ch1 @johnwalicki I am working on this issue.
I am thinking about implementing linter using this GHA: https://github.com/marketplace/actions/my-markdown-linter
let me know your thoughts on this :)

@johnwalicki
Copy link
Member

This markdown linter GHA looks interesting. We would likely start off with a config file that is permissive and tweak the linter settings.

I'm going to run it against a local clone of the OH docs repo to see how many linter warnings it generates.

@Abhijay007
Copy link
Contributor

Abhijay007 commented Feb 6, 2023

@dipesh-rawat Can you please look into this issue? , you can take reference from this PR #268, and if needed you can cherry-pick some of my commits.

@johnwalicki
Copy link
Member

I propose we close this issue and PR #268 ? It's a great idea but implementation seems to be difficult because of all the preprocessor / front-matter directives. Over the past year I've crawled my way through most of the 135 markdown files in this repo. As I touched these docs, I've done a good amount of lint and formatting updates. VSCode gives you visual ques on common lint issues.

I would love to see an automated linter warning

I did a quick grep of a common lint issue and see just 7 files that need attention. I'll open an issue to review / fix those.

@joewxboy
Copy link
Member

I second the closing proposal. @Abhijay007 any objections?

@joewxboy
Copy link
Member

OK, hearing no objections, I'll close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants