News for hackers. Stuff that matters.
Re:Facebook Open Sources flint, a C++ linter written in D by staunch on Monday February 24, 2014 @04:24PM (#7293492)
Once you get used to tools like `go fmt` or Perl::Tidy it feels barbaric not to be able to cleanly format all your code instantly. Read only linters are nice but something that can reformat code is much nicer.
Re:Facebook Open Sources flint, a C++ linter written in D by Scaevolus on Monday February 24, 2014 @04:55PM (#7293673)
Re:Facebook Open Sources flint, a C++ linter written in D by jbergstroem on Monday February 24, 2014 @05:03PM (#7293723)
While reading the article, I also thought why they didn't at least mention it (and why they abandoned the idea).

It's powerful, fast and will most likely be the base for a lot of {h,l}inting in editors/IDE's moving forward.

edit: Somehow missed that they mentioned Clang not being mature enough when starting this project.

Re:Facebook Open Sources flint, a C++ linter written in D by eliasmacpherson on Monday February 24, 2014 @05:04PM (#7293731)
http://astyle.sourceforge.net/ linters are more important that pretty formatting to my mind. c++ has had both linters and reformatters for a long time.

I suppose the distinction is that they are not built in.

Re:Facebook Open Sources flint, a C++ linter written in D by sliverstorm on Monday February 24, 2014 @04:37PM (#7293558)
Huh? You know that a linter is not a formatter, right?
Re:Facebook Open Sources flint, a C++ linter written in D by DanHulton on Monday February 24, 2014 @04:54PM (#7293669)
Pretty sure he does. His comment only makes sense in that context.
Re:Facebook Open Sources flint, a C++ linter written in D by sliverstorm on Monday February 24, 2014 @04:56PM (#7293689)
I guess I just don't see that. perltidy and lint(s) are completely nonoverlapping, to my knowledge. Something that can reformat your code doesn't even do the same job as a linter.
Re:Facebook Open Sources flint, a C++ linter written in D by mbell on Monday February 24, 2014 @05:03PM (#7293724)
I'm not really following you. It's very common for linters to flag stylistic and formatting issues.
Re:Facebook Open Sources flint, a C++ linter written in D by sliverstorm on Monday February 24, 2014 @05:05PM (#7293736)
Ah well, perhaps it's just a difference in experience. I've never used a linter (there are countless linters) that fixed indentation, arranged if statements, and inserted newlines to wrap long lines. Nor has a formatter ever helped me find the sort of issues I use a linter to find.
Re:Facebook Open Sources flint, a C++ linter written in D by maw on Monday February 24, 2014 @09:30PM (#7294928)
There is overlap. I once lost a fair amount of time because some dimwit predecessor thought putting anything other than a space after commas was acceptable. (It sounds ridiculous but it's true. I can explain if you care.)

So: a formatter will, for example, make sure your lines are indented to some standard amount of indentation, a linter will bitch if they are not, and both the formatter and the linter should DTRT when they identify certain indefensible coding practices.

Re:Facebook Open Sources flint, a C++ linter written in D by he_the_great on Tuesday February 25, 2014 @03:16PM (#7300157)
I wouldn't want to reach for lint to handle formatting, that is what indent is for. That is to say, lint should not complain that the if should contain a space before the (.
Re:Facebook Open Sources flint, a C++ linter written in D by maw on Thursday February 27, 2014 @05:41PM (#7315770)
I agree in that case, but when it comes to commas, using spaces in a certain way is objectively better.
Re:Facebook Open Sources flint, a C++ linter written in D by letzjuc on Monday February 24, 2014 @04:55PM (#7293676)
well there is clang-format and clang-tidy and they are really easy to set up in CMake (I use "make format").