Skip to content

Commit

Permalink
build: introduce 'make doclint' command and tooling
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ChALkeR committed Mar 7, 2017
1 parent efaab8f commit 3220cf6
Show file tree
Hide file tree
Showing 972 changed files with 98,550 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ test/fixtures
test/disabled
test/tmp*/
tools/eslint
tools/remark-cli
node_modules
benchmark/tmp/
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ test: all
$(MAKE) cctest
$(PYTHON) tools/test.py --mode=release -J \
addons doctool inspector known_issues message pseudo-tty parallel sequential
$(MAKE) doclint
$(MAKE) lint

test-parallel: all
Expand Down Expand Up @@ -816,6 +817,9 @@ jslint-ci:
$(NODE) tools/jslint.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \
benchmark lib test tools

doclint:
$(NODE) tools/remark-cli/cli.js -qf *.md doc src lib benchmark tools/doc/*.md tools/icu/*.md

CPPLINT_EXCLUDE ?=
CPPLINT_EXCLUDE += src/node_root_certs.h
CPPLINT_EXCLUDE += src/queue.h
Expand Down
34 changes: 34 additions & 0 deletions tools/remark-cli/cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env node
/**
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
* @module remark:cli
* @fileoverview CLI to process markdown.
*/

'use strict';

/* Dependencies. */
var start = require('unified-args');
var extensions = require('markdown-extensions');
var processor = require('remark');
var proc = require('remark/package.json');
var cli = require('./package.json');

/* Start. */
start({
processor: processor,
name: proc.name,
description: cli.description,
version: [
proc.name + ': ' + proc.version,
cli.name + ': ' + cli.version
].join(', '),
pluginPrefix: proc.name,
presetPrefix: proc.name + '-preset',
packageField: proc.name + 'Config',
rcName: '.' + proc.name + 'rc',
ignoreName: '.' + proc.name + 'ignore',
extensions: extensions
});
4 changes: 4 additions & 0 deletions tools/remark-cli/node_modules/ansi-regex/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions tools/remark-cli/node_modules/ansi-regex/license

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 122 additions & 0 deletions tools/remark-cli/node_modules/ansi-regex/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions tools/remark-cli/node_modules/ansi-regex/readme.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 65 additions & 0 deletions tools/remark-cli/node_modules/ansi-styles/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions tools/remark-cli/node_modules/ansi-styles/license

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3220cf6

Please sign in to comment.