Node: Move CPP_STYLE_GUIDE.md to /doc

Created on 21 Feb 2018  路  5Comments  路  Source: nodejs/node


I think CPP_STYLE_GUIDE.md should be in the same folder as the more general STYLE_GUIDE.md, which is located in the /doc directory.

Perhaps they can both be moved into /doc/guides directory.

C++ doc

Most helpful comment

Is it worthwhile to submit a PR with the style guide moved to src/ as README.md?

Probably not, in my opinion anyway.

Also, is there a corresponding Javascript style guide for Node?

No. The style guide for JavaScript is (more or less) the ESLint rules. I suspect the C++ linter is not as powerful/robust as ESLint, necessitating a separate style guide. (Or maybe I just have no idea what I'm talking about. That's entirely possible, TBH.)

All 5 comments

cc/ @addaleax

At first glance I think putting it in doc/ would make sense, but I assume there's a reason it didn't go there in the first place.

I'm not sure it makes sense to put it into doc/guides/, it's not really a guide in that sense.

I think doc/STYLE_GUIDE.md is in doc/ because it鈥檚 the style guide for that very directory?

I don鈥檛 really care that much as long as it stays discoverable. We might even make it the README.md of src/, I鈥檇 be fine with that.

Okay, that makes sense. Is it worthwhile to submit a PR with the style guide moved to src/ as README.md?

Also, is there a corresponding Javascript style guide for Node?

Is it worthwhile to submit a PR with the style guide moved to src/ as README.md?

Probably not, in my opinion anyway.

Also, is there a corresponding Javascript style guide for Node?

No. The style guide for JavaScript is (more or less) the ESLint rules. I suspect the C++ linter is not as powerful/robust as ESLint, necessitating a separate style guide. (Or maybe I just have no idea what I'm talking about. That's entirely possible, TBH.)

I suspect the C++ linter is not as powerful/robust as ESLint, necessitating a separate style guide.

I believe that's why we have a C++ style guide. I have looked into clang-tidy before but it's not as easy to set up and extend like eslint, at least I don't think it should be required in the normal build & test step (you'll need a compilation database at the very least, that can be generated if people use ninja, but that introduces a new dependency. Also it's like, super slow even compared to cpplint.py)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Icemic picture Icemic  路  3Comments

fanjunzhi picture fanjunzhi  路  3Comments

srl295 picture srl295  路  3Comments

sandeepks1 picture sandeepks1  路  3Comments

filipesilvaa picture filipesilvaa  路  3Comments