🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

clang-format

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clang-format - npm Package Compare versions

Comparing version

to
1.7.0

19

bin/check-clang-format.js

@@ -16,2 +16,13 @@ #!/usr/bin/env node

function getPythonInterpreter() {
const interpreterOptions = ['python3', 'python', 'python2'];
for (const opt of interpreterOptions) {
const result = spawn(opt, ['--version'], {encoding: 'utf-8'});
if (result.status === 0) {
return opt;
}
}
return null;
}
function checkGitConfig() {

@@ -50,2 +61,8 @@ const spawn_opts = {encoding: 'utf-8', stdio: ['pipe', 'pipe', 'inherit']};

const interpreter = getPythonInterpreter();
if (interpreter === null) {
console.error('No python interpreter found');
return 2;
}
try {

@@ -65,3 +82,3 @@ clangFormatPath = path.dirname(require.resolve('clang-format'));

const gitClangFormatPath = path.join(clangFormatPath, 'bin/git-clang-format');
const result = spawn('python', [gitClangFormatPath, '--diff'], {encoding: 'utf-8'});
const result = spawn(interpreter, [gitClangFormatPath, '--diff'], {encoding: 'utf-8'});

@@ -68,0 +85,0 @@ if (result.error) {

4

package.json
{
"name": "clang-format",
"version": "1.6.0",
"version": "1.7.0",
"description": "node wrapper around clang-format",

@@ -26,3 +26,3 @@ "repository": {

"dependencies": {
"async": "^1.5.2",
"async": "^3.2.3",
"glob": "^7.0.0",

@@ -29,0 +29,0 @@ "resolve": "^1.1.6"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet