-
Notifications
You must be signed in to change notification settings - Fork 67
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 linting for docs #11
Comments
Ping @silverstripe/core-team |
That sounds imminently sensible. If no one raises concern over the next week or so, I would just say go ahead and do it. |
Found this issue which points out some issues that might be detectable with this (and some which probably aren't as I assume we don't want to pay for grammarly): #37 |
Also relevant: #13 |
Don't think we need an RFC for maintenance tasks Was this only for markdown files in the developer-docs repo, or would it also apply to the userhelp docs, and maybe even module readmes (probably not required?) |
I was only thinking about developer docs specifically, but I guess it could apply to userhelp too - that's hosted by the same app so the linting rules should all be the same. |
I'm gonna go ahead and mark this accepted |
Note that while we could use something like https://github.com/greyscaled/markdownlint-rule-title-case-style to lint the heading style to ensure it's always using sentence style, we'd have to either:
That first option is feasible but out of scope for this first card. The other options are non-starters IMO. So for now we won't lint heading style. EDIT: The maintainer of that package has kindly implemented that for us. |
I've made a wrapper around php code sniffer which lets you lint code blocks inside markdown files |
Assigned back to @GuySartorelli for the other TODO items |
Merged up to 5. I looked at the line length changes and it was just waaaaaay too much to do in one go. If we really care about that rule we can do it in chunks, but that's basically an epic in itself. |
We don't currently have any automated checks to validate the quality of our documentation. This means we might potentially have now - or could easily introduce in the future - markdown formatting issues, incorrectly formatted links, etc. This is especially likely to happen with some of the custom markdown syntax such as API links.
Proposed automated checks:
text
for plain text blocks)api:Namespace\Class::someMethod()
syntax instead of a hardcoded links, links to other docs sections are relative)[info]
and similar are formatted correctly and are never left unclosed{#some-anchor}
in headings)yaml
oryml
but not both)namespace
declarations in php code examplesThis should be run on all PRs automatically via github actions.
NOTE: Linting should respect Silverstripe's writing style guide (only accessible to Silverstripe employees currently)
potentially useful tools
Related issues
Notes
Acceptance criteria
TODO
These will be done after the first lot of PRs are merged.
MD013
line-length rule, to limit lines to 120 characters.PRs
DO NOT CLOSE UNTIL ALL TODO ITEMS ARE COMPLETE
The text was updated successfully, but these errors were encountered: