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>
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>
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>
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>
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>
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>
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>
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>
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.