0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
Commit Graph

19 Commits

Author SHA1 Message Date
Roman Reiss
ecf6a46d98
src,lib,test,doc: correct misspellings
PR-URL: https://github.com/nodejs/node/pull/13719
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-17 19:17:46 +02:00
liusi
379eec357d build: add cpp linting to windows build
This PR adds cpp linting to windows build script. After this change,
running command `vcbuild lint` will run both cpp linting and javascript
linting on a windows machine.

PR-URL: https://github.com/nodejs/node/pull/11856
Fixes: https://github.com/nodejs/node/issues/11816
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-17 09:22:46 -07:00
Ben Noordhuis
fadf66a02b tools: allow cpplint to run outside git repo
This reapplies commit a493dab ("cpplint: make it possible to run
outside git repo") from September 2015, this time with a proper
status line.

PR-URL: https://github.com/nodejs/node/pull/7462
Refs: https://github.com/nodejs/node/issues/2693
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-28 21:21:21 +02:00
Ben Noordhuis
bb81d69a13 tools: add back --mode=tap to cpplint
This commit reimplements commit 7b45163 ("tools: add tap output to
cpplint") on top of the upgraded copy of cpplint.

PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-28 21:21:21 +02:00
Ben Noordhuis
fc106245da tools: disable unwanted cpplint rules again
This commit disables the build/include, build/include_alpha,
build/include_order and legal/copyright warnings again.

PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-28 21:21:21 +02:00
Ben Noordhuis
04c723d27c tools: update cpplint to r456
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-28 21:21:21 +02:00
Ben Noordhuis
bb33c28e21 tools: disable readability/function cpplint rule
cpplint gets too easily confused by C++ constructs that look like
function declarations but aren't.  Furthermore, it's arguably a
bad rule that conflicts with gcc's -Wunused-parameter flag.

PR-URL: https://github.com/nodejs/node/pull/7334
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-21 10:28:10 +02:00
Sakthipriyan Vairamani
3eff42bbca tools: reduce verbosity of cpplint
Every time `make test` is run, the cpplint prints the file it
successfully linted. None of the other linters in the project does
that. This patch simply removes the "Done processing" message from the
cpplint.

PR-URL: https://github.com/nodejs/node/pull/5578
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-07 11:16:14 -08:00
Ben Noordhuis
813e73e1f5 tools: list missing whitespace/if-one-line cpplint
Writing `// NOLINT(whitespace/if-one-line)` was not possible because the
directive was not listed in the list of known lint rules.  You can now.

PR-URL: https://github.com/nodejs/node/pull/4099
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-08 22:01:41 +01:00
Johan Bergström
7b4516356a tools: add tap output to cpplint
Implement a crude TAP13 writer for cpplint. Does its job and
not much else. Only supports writing TAP output to file,
not vs7 or emacs formats.

PR-URL: https://github.com/nodejs/node/pull/3448
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-11-12 12:13:27 +11:00
Ben Noordhuis
a493dab2e7 cpplint: make it possible to run outside git repo
cpplint uses the top-level .git directory to determine what the root is
for #include guards.  If it doesn't find a .git directory, it walks up
all the way to the system root and subsequently complains that guards
must be written as HOME_USER_SRC_NODE_SRC_FILENAME_H_.

This commit replaces the .git-based path munging with a fixed root path
relative to the location of the cpplint script, making it possible to
successfully run `make test` from an extracted tarball.

Fixes: https://github.com/nodejs/node/issues/2693
PR-URL: https://github.com/nodejs/node/pull/2710
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-09-06 09:28:42 +02:00
Ben Noordhuis
7861ff4728 test: create test-ci, modify test-all, fix cpplint
test: add test/addons to default test list

`make test-all` and `python tools/test.py` will now also run the addon
tests in test/addons.

test: remove test-npm from test-all make target

The test-npm target builds documentation, changes versioned files,
clutters the current working directory with artifacts, etc.  In short,
it doesn't seem quite ready for inclusion in `make test-all`.

test: add test-ci target, reduced test-all

Add a test-ci target that is like test-all minus the (slow) pummel and
gc test suites.

This is primarily intended for the continuous integration, where we want
decent coverage but don't want to wait for ages for tests to complete.

cpplint: add -license/copyright to default filters

Commit 3e1b1dd ("Remove excessive copyright/license boilerplate") trips
up the copyright boilerplate style check.  Disable it.

PR-URL: https://github.com/iojs/io.js/pull/314
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-13 13:46:52 +11:00
Fedor Indutny
2bc30f239b cpplint: disallow if one-liners 2013-10-17 00:34:19 +04:00
Fedor Indutny
7063c59b97 cpplint: disallow comma-first in C++ 2013-10-17 00:34:18 +04:00
Ben Noordhuis
98c54246c2 tools: cpplint: fix NOLINT(build/include_order)
And build/include, build/include_alpha and readability/streams
probably too, though those are currently unused and therefore untested.
2013-08-15 14:21:41 +02:00
Ben Noordhuis
847c6d980c tools: cpplint: fix up build/include_order rule
Change the build/include_order rule to match our preference:
project headers before system headers.

The rationale is that system headers before project headers makes it
easy to slip in bugs where a project header that requires a definition
from a system header, forgets to include the system header but still
compiles because the source files that include the project header
coincidentally include the system header too.

A good example is the size_t type. A project header file that needs the
definition of size_t should include stddef.h but forgetting to do so
will probably go unnoticed for a long time because almost every other
system header includes stddef.h (either directly or indirectly) and
almost every source file includes one or more system headers.

Ergo, project headers before system headers. It's a good thing.
2013-07-31 22:34:35 +02:00
Fedor Indutny
3c6b5d5df1 cpplint: make lint rules closer to node's source
* Support C-style header guards (/* comments */)
* Support `class NODE_EXTERN something`
* Support `}  // extern "C"` closures
* Ignore header order
* Ignore `long/short` usage (because of OpenSSL's API)
2013-07-31 22:12:06 +04:00
isaacs
3058f08e64 tools: remove unnecessary cpplint rules
We don't actually care about header order much, and since we never use
stl classes, 'string' isn't an issue for node ever.
2013-05-14 11:36:05 -07:00
Ryan Dahl
ac58d3a665 Import cpplint.py
make cpplint
make jslint
make lint
2010-12-01 17:01:25 -08:00