AtomLinter / linter-cpplint

Linter plugin for c++, using cpplint
https://atom.io/packages/linter-cpplint
MIT License
6 stars 5 forks source link

When using C++14, linter doesn't pass the command line configured for C++ files #38

Closed ricardopieper closed 8 years ago

ricardopieper commented 8 years ago

Yo!

Great work in this package.

I have a package called language-cpp14 installed. I just installed because it sounds cool and seems to add some extra neat things, but I don't really know if I need it. I'm new to C++, so sorry if I'm not making any sense.

I have a perfectly valid C++ program using C++11 stuff. But since i've installed the language-cpp14 extension, the current language i'm using in Atom is also called C++14.

I know exactly where the problem lies: main.js, line 100:

 if(grammar_name === "C++") {
      flags = settings.gccDefaultCppFlags;
  } else if(grammar_name === "C") {
     flags = settings.gccDefaultCFlags;
  }

I figured that grammar_name is C++14 so it doesn't use the flags. And throws over 5000 errors when I save the file, because it seems that G++ will default to the old c++.

I'm OK with using the normal C++ though, and that's what I'll do, probably. I was just wondering if that's a problem. Would that be correct to check whether grammar_name contains the string c++14?

Edit: I'm aware that the README says that this plugin will lint files using the "C++" syntax, which looks somewhat specific, so I thought that was intentional... even though it does lint the file and its includes in the end of the day.

Arcanemagus commented 8 years ago

Looks like you meant to file this over on linter-gcc from your code block, this linter here has nothing like that.

ricardopieper commented 8 years ago

Oh god, that was embarassing lol.

Both linters are very different and they don't exclude each other. Using both of them seems to be working fine!

I'll post it on the right repo this time. Sorry :(

Arcanemagus commented 8 years ago

No problem :wink:.