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 automated linter; make PRs pass "mkdocs serve --strict" #69

Open
felker opened this issue Sep 1, 2022 · 5 comments
Open

Add automated linter; make PRs pass "mkdocs serve --strict" #69

felker opened this issue Sep 1, 2022 · 5 comments
Assignees

Comments

@felker
Copy link
Member

felker commented Sep 1, 2022

As mentioned in #64, we should consider adding a basic, automated linting step (perhaps in a pre-commit hook) to minimize commit noise and promote uniformity of style:

  • deletes trailing whitespace
  • converts DOS-style line endings to Unix-style
  • check for broken links
  • spelling and grammar, TensorFlow not tensorflow, etc. (although would take some time to build up a list of exceptions)

Some tools here: https://earthly.dev/blog/markdown-lint/, https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md

Would be simple to add Python-based linters to the venv already required to run mkdocs, then install a pre-commit hook with one line.

@bethcerny
Copy link
Collaborator

@felker who should this be assigned to?

@bethcerny
Copy link
Collaborator

I should say who is the TensorFlow SME? Taylor?

@felker
Copy link
Member Author

felker commented Oct 27, 2022

I will fix TensorFlow stylization, but will table the automated linter discussion until there is more interest.

@felker felker closed this as completed Oct 27, 2022
@felker felker changed the title Add automated linter? Add automated linter; make PRs pass "mkdocs serve --strict" Mar 3, 2023
@felker
Copy link
Member Author

felker commented Mar 3, 2023

mkdocs serve --strict GitHub Action would return an error code of 1 and print out:

...
WARNING  -  Documentation file 'ai-testbed/sambanova/running-bert-large-on-sn10-8r.md' contains a link to
            'ai-testbed/sambanova/bert/transformers_hook.py' which is not found in the documentation files.

Aborted with 10 warnings in strict mode!
make: *** [serve] Error 1

with the broken links warnings described in #162

@felker felker reopened this Mar 3, 2023
@felker
Copy link
Member Author

felker commented Jul 31, 2023

partially addressed by #246

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

2 participants