-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Introduce 'make doclint' command and tooling #8551
Conversation
Should there be a |
Rebased. @Trott, I don't think I would be able to test |
@ChALkeR I don't have direct access to Windows either, but in the past, if it's just one or two lines, I've updated /cc @nodejs/platform-windows |
This should probably get all the Also, did you check whether the dependencies here end up in the distribution tarballs? |
@addaleax Thanks, I didn't think of that. I will split this into two separate PRs — the actual rules update that would allow me to file more pull requests with fixes without conflicts in the config file, and the |
Awesome! I won't sign off on this just yet as I haven't had a chance to review but I'm very happy to see this. |
Is it possible to get a |
Thanks for using remark, folks! 🎉 |
I'm OK with this landing without a Rubber-stamp LGTM if CI is fine (which I imagine is really just going to make sure that the .eslintignore stuff is working and that this doesn't accidentally break the Makefile). |
This adds remark-lint tooling and introduces a 'make doclint' command, which is also executed on 'make test' runs. tools/remark-cli dir was created by installing `remark-cli` and `remark-lint`, the following files and directories are being excluded: * `./node_modules/concat-stream/node_modules/readable-stream/` a duplicate copy of `readable-stream` of 2.0, there already is 2.1. * `./**/doc/`, `./**/test/` -- docs and tests for deps are not needed. * `./**/history.md` and `./**/changelog.md` (case-insensitive). * `./**/.travis.yml`, `./**/.istanbul.yml`, `./**/.zuul.yml`. * `./**/.eslintrc`, `./**/.jscs.json`, `./**/.jshintrc`. * `./**/.npmignore`, `./**/component.json`, `./**/.gitattributes`. * `./**/dist/` (affects `sprintf-js` and `js-yaml`), not `require()`-d. PR-URL: nodejs#8551
Renamed to Todo:
|
c133999
to
83c7a88
Compare
This got stalled because of the CI support, I'm planning to:
|
@@ -123,6 +123,7 @@ test: all | |||
$(MAKE) cctest | |||
$(PYTHON) tools/test.py --mode=release -J \ | |||
addons doctool inspector known_issues message pseudo-tty parallel sequential | |||
$(MAKE) doclint |
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.
Maybe rename to mdlint
? I assume we want to lint every md, including non-doc files.
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.
The thing is, there is a project named mdlint
, and that's not the one we are using.
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.
I don't see that as an issue. There is a project called jslint
and we happily use that name for js lint task 😉.
I'd suggest you split this in 2 commits, one for the module, one for config changes, so it's easier to review. |
I'd suggest running
|
I find this to be unnecessary to be included into the tree. it's a lot of files and only adds value for linting. Would a |
I'm not sure we can require a working |
well it is possible if we don't run then through |
Since we include If we want to change it for both, then that's a pretty big change with a lot to consider. (For example: Do we want our CI and release stuff to fail if the npm registry is down? I don't know the answer and this is not the only thing we'd need to consider.) It may be a great idea--I have no opinion, at least not at this time--but I would prefer that such a change should be a separate PR so that just that practice (bundling the tools with our repository vs. installing them over the network with tools) is up for discussion. It would be a shame for a meta-issue like that (no matter how important) to stall this. |
Well I think There are more than checking in and installing as possibilities for CI. E.g. imaginable would be global dependencies on the node that get provisioned with the Node or a static Docker container. I wouldn't merge this until the meta issue is resolved. It's also a little funny that there is no meta issue yet, since we are seeing |
edit: also writing an external tool that could also include remark as dependency would be thinkable. |
@ChALkeR ... next steps on this? |
Closing this in favor of #11610 |
This adds remark-lint tooling and introduces a 'make doclint' command, which is also executed on 'make test' runs. tools/remark-cli dir was created by installing `remark-cli` and `remark-lint`, the following files and directories are being excluded: * `./node_modules/concat-stream/node_modules/readable-stream/` a duplicate copy of `readable-stream` of 2.0, there already is 2.1. * `./**/doc/`, `./**/test/` -- docs and tests for deps are not needed. * `./**/history.md` and `./**/changelog.md` (case-insensitive). * `./**/.travis.yml`, `./**/.istanbul.yml`, `./**/.zuul.yml`. * `./**/.eslintrc`, `./**/.jscs.json`, `./**/.jshintrc`. * `./**/.npmignore`, `./**/component.json`, `./**/.gitattributes`. * `./**/dist/` (affects `sprintf-js` and `js-yaml`), not `require()`-d. PR-URL: nodejs#8551
@jasnell, I still think that this should be done through using an already existing tool and rules, possibly extending the rules, if needed, and not writing and supporting our own markdown linter ruleset and toolset from the scratch. I will probably file another remark-based PR from the same branch (can't reopen this one) after the Buffer issues get sorted out. Alternatively, anyone else is free to take off based on https://github.com/ChALkeR/io.js/tree/remark, the main issue there was the missing TAP test results for the CI. 😉 Perhaps the |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
tools
Description of change
Note: there were some more changes in this PR, those were extracted to #8660, #8553, #8666, and were merged already.
Add
remark-cli
andremark-lint
totools/remark-cli
, introducing newmake mdlint
command.make mdlint
now lints all docs,make test
now executesmake mdlint
.A complete
make mdlint
check takes 8-9 seconds on my notebook.Previous work in #7729.
/cc @Trott, @jasnell, @addaleax.