lovell / cc

Code style linter for C++ source files used in Node.js native addons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CC is the name of a compiler...

Qix- opened this issue · comments

{
  "bin": { "cc": "..." }
}

You realize that cc is the standard link name for the system's C compiler, right? You're going to cause a ton of conflicts when installing this package.

Hello, if you didn't see it there's logic to spawn the underlying cc directly when invoked with arguments:

cc/bin/cc.js

Lines 10 to 13 in 07c15ef

if (process.argv.length > 2) {
process.env.PATH = process.env.PATH.split(':').slice(2).join(':');
process.exit(childProcess.spawnSync('cc', process.argv.slice(2), { stdio: 'inherit' }).status);
}

Was this question about a real problem you've experienced? If so, are you able to provide steps to reproduce?

No, but this paradigm of masking the real CC is bad practice. You'll break a ton of tooling.

I'm not aware of any tooling that is broken by this approach.

I do agree that the naming could cause confusion so let's go with something like cclint for the .bin entry instead, perhaps initially as an additional entry, then we can remove cc in a v2 major increment.

The bin entry is renamed cpplint in v2 to avoid confusion - thanks for reporting this.