Skip to content

tools: yaml lint command in vcbuild script

Hello everyone, I'm opening this PR hoping it could be an enhancement for Windows contributors.

To give this a little context, when I was working on #48184 , I noticed that lint-yaml was run by a Github Action, but it was not present in the vcbuild.bat script that I used for building and linting files.

Following things were changed:

  • lint-yaml was added as a command in vcbuild script and it is executed through the Makefile corresponding command.
  • lint-yaml step was also added and enabled for execution on test and lint commands.
  • Made wsl make preferred for executing Makefile command on lint-cpp and lint-yaml because of Square brackets not being recognizable by Windows as a command.
  • Added lint-yaml reference to the help command.
  • Deleted an eslint text file in order to make lint-js command work again. lint-js execution would look at that file, throw a Syntax Error that onFatalError in eslint.js would catch and make the linter execution stop.
  • Disabled new-lines type checking from .yamllint.yaml in order to make linter work on Windows even though the execution was started on a Unix system (such as WSL). I think this could be re-enabled if we are able to use GNU Make instead of WSL to lint those files.

I also have two questions:

  • I noticed that lint command would skip the build process if it's already built, is this a behaviour that could be replicated for each lint-X command?
  • Regarding change no. 3, what's the best path to follow here? Makefile command accounting for Windows systems that can call it or just stick with WSL make and get rid of the GNU Make option?

Thanks for your attention!

@nodejs/build

Merge request reports

Loading