-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 Markdown file linter #6895
base: main
Are you sure you want to change the base?
Add Markdown file linter #6895
Conversation
This adds `check/markdownlint` and a corresponding configuration file `.markdownlint.yaml`. Running `./check/markdownlint` will check all `.md` files recursively from the top of the source tree, ignoring subdirectories whose names start with a `.`. Arguments can be passed to the script so that, e.g., `./check/markdownlint somefilename` will lint just _somefilename_.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6895 +/- ##
=======================================
Coverage 97.86% 97.87%
=======================================
Files 1084 1084
Lines 94406 94406
=======================================
+ Hits 92395 92396 +1
+ Misses 2011 2010 -1 ☔ View full report in Codecov by Sentry. |
Many existing Cirq Markdown files use bare URLs for things like email addresses, because that's supported by GitHub-flavored Markdown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename the config file to .markdownlintrc
?
According to the docs that configuration file would be found by markdownlint from any subdirectory; we could then do without the check/markdownlint script.
Otherwise LGTM.
We can change the config file, but the reason there's a check/markdownlint script is to give it a default argument if the user invokes it simply as If this difference in behavior (compared to other check/ scripts) is okay, then we don't need check/markdownlint. |
This adds
check/markdownlint
and a corresponding configuration file.markdownlint.yaml
. Running./check/markdownlint
will check all.md
files recursively from the top of the source tree, ignoring subdirectories whose names start with a.
. Arguments can be passed to the script so that, e.g.,./check/markdownlint somefilename
will lint just somefilename.