
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
node-cpplint
Advanced tools
Validates CPP files with Google's cpplint
This module has been built for usage with Node scripts, to run from the command line, and to be used as a Grunt task.
All methods of using this module allow for four specific configuration options:
build and whitespace will also be printed. If detailed is provided, then
a count is provided for each category like build/class.A list of files is also expected.
Using the spec reporter, disabling whitespace/braces errors and linting file1.
bin/cpplint --reporter spec --filter whitespace-braces file1
Setting verbosity to 3 and the counting-type to detailed while linting file1 and file2.
bin/cpplint --verbose 3 --counting detailed file2 file3
Using the plain-text reporter, ignoring build/deprecated errors and linting file1.
bin/cpplint --filter build-deprecated --reporter plain-text file1
Using the cc and hpp extensions and linting source1.cc and source1.hpp.
bin/cpplint --extensions cc,hpp source1.cc source1.hpp
Using the spec reporter
var cpplint = require('lib/index.js');
var reporter = require('lib/reporters').spec;
var options = {
files: [
'/path/to/some/files.cc'
]
};
cpplint(options, reporter);
Using a custom reporter, disabling whitespace/braces and enabling whitespace/include_alpha
var cpplint = require('lib/index');
var options = {
files: [
'/path/to/some/files.cc'
],
filters: {
'whitespace': {
'braces': false,
'include_alpha': true
}
},
// This could be an array of strings or a comma separated string
extensions: [
'cc',
'hpp'
]
};
cpplint(options, function (err, report) {
// your reporting logic
});
grunt.loadNpmTasks('node-cpplint');
grunt.initConfig({
cpplint: {
files: [
'src/**/*.cc',
'src/**/*.cpp'
],
reporter: 'spec',
verbosity: 1
},
filters: {
'whitespace': {
'braces': false,
'include_alpha': true
}
},
// This could be an array of strings or a comma separated string
extensions: [
'cc',
'hpp'
]
});
Future plans (in no particular order):
In lieu of a formal styleguide, take care to maintain the existing coding
style. Add unit tests (using vows) for
any new or changed functionality. Lint and test your code using grunt jslint
and verify that all unit tests are passing with grunt vows.
npm test supportFAQs
Validates C++ files with cpplint
The npm package node-cpplint receives a total of 269 weekly downloads. As such, node-cpplint popularity was classified as not popular.
We found that node-cpplint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.