Node: doc, tools: doc linting does not work in CI

Created on 25 Apr 2017  路  7Comments  路  Source: nodejs/node

  • Subsystem: doc, tools

It seems https://github.com/nodejs/node/pull/12563 has not made all needed changes in build scripts to run doc linting on CI.

I've tried to skim PRs from this search: is:pr is:open label:doc -label:stalled and run linter CI on them.

See this inconsistency: https://github.com/nodejs/node/pull/12549#issuecomment-296860563

It seems, CI uses commands not addressed in the https://github.com/nodejs/node/pull/12563 (see https://ci.nodejs.org/job/node-test-linter/8536/console).

What should be added?

doc tools

All 7 comments

It seems these blocks also need to be edited, but I don't know how exactly:

https://github.com/nodejs/node/blob/b4fea2a3d62da5e2e3f90d7f2109f02f927f7174/Makefile#L861-L864

https://github.com/nodejs/node/blob/b4fea2a3d62da5e2e3f90d7f2109f02f927f7174/vcbuild.bat#L427-L430

Maybe some other files are also concerned (tools/jslint.js ?).

褋褋 @not-an-aardvark, @silverwind, @trott

@vsemozhetbyt I think all you need to do is add doc to the list of directories being linted. They're in alphabetical order, so it would go between benchmark and lib. Basically, compare line 864 of the Makefile (the version you have linked above) with line 859. Similar change in vcbuild.bat.

@vsemozhetbyt Oh, wait, yeah, you'll also need to add the --ext=.js,.md stuff. And that will involve editing tools/jslint.js (which was originally authored by @mscdex, who I'll @-mention just in case there's already a provision for adding arbitrary CLI flags or something).

Oh, I never realized that jslint.js was a runner for ESLint. I always thought it was running JSLint.

@not-an-aardvark With make jslint, we run eslint with caching because people are likely to run that multiple times. On my machine, the first run takes about 23 seconds, but subsequent runs (once the cache is populated) are less than 2 seconds. Sweet!

But on CI, there is no second run. There is only the first run. So jslint.js is used to parallelize the linting a bit to make it faster. On my machine, it takes about 15 seconds to run. It might be slightly longer once docs are added to its lint load the way they are for make jslint.

Given that the linter is the fastest CI job we have, this is literally marginal value, but it used to run everywhere before ESLint had caching (or maybe before we knew to turn caching on).

@Trott @not-an-aardvark It seems we need to update cliOptions for CLIEngine with extensions property. I shall try a PR.

Was this page helpful?
0 / 5 - 0 ratings