Live data from Hacker News

GitHub Super Linter: one linter to rule them all

github.blog

341–350 of 360 posts

Re: GitHub Super Linter: one linter to rule them all

#341
post #327

Earlier quoted context omitted.

There are two kind of painting. You can paint a wall/a building, or you can paint Mona Lisa. This is the same for programming. Each dev have their own taste in term of code style and code formatting preferences. I was an early employee in a startup, and at some point I was able to tell who wrote a chunk of code just from the code style, it was fun :) but as company grown, and team got bigger, it got more "professiona…

I like the point in general, but I will say there are times when idiosyncratic formatting can really help understanding "this particular bit of code". Often it has to do with aligning values so that they are easier to read; if a code formatter was smart enough to at least understand the signal the programmer is sending, and maintain (or even improve!) that kind of formatter, it would be the best of all worlds. One si…

Or key value lists where the keys have slightly different lengths.

Re: GitHub Super Linter: one linter to rule them all

#342

Earlier quoted context omitted.

I wonder why they went with Standard for JavaScript and TypeScript, instead of Prettier which is far more popular now.

As others have stated, prettier is a formatted not a linter. I do however agree that Standard is a weird choice and in my experience is far from an actual “standard”. IMO the Airbnb style is excellent and would have been a better choice here. It’s also available as an ESlint plugin. Hopefully something like this can be configured on the GH Action in the future, allowing for a choice between available presets.

Sounds like there is some consensus around switching out Standard. Feel free to open up an issue in the repo and we can discuss and move forward there if you like.

Re: GitHub Super Linter: one linter to rule them all

#343

I don't understand why there's any innovation around linters. To set them up as a PR hook, you literally just run a single linter command and check the status code. Why use something like this, or the absolutely horrible tool Codeclimate? Linting is a solved problem and easy to set up, and linting rules should be a per-TEAM decision to empower teams to solve their own problems.

Totally understand. I think the problem we are trying to solve here is integration with GitHub Actions as well being able to easily set up multiple linters for code ASR’s with many languages. Hope that makes sense.

Re: GitHub Super Linter: one linter to rule them all

#344

They should have explained what a "linter" is at the beginning of the post. [0] [0]: https://sourcelevel.io/blog/what-is-a-linter-and-why-your-te...

Considered that but thought the target audience might be familiar. I think your suggestion would have made it more accessible though to those who have not been around linters before.

Re: GitHub Super Linter: one linter to rule them all

#346

Earlier quoted context omitted.

I mean I would do the exact same thing. Consolidate dev mindshare around the organization. That doesn’t mean I have to like it!

Indeed and I wasn't criticizing you, this was a legit question: Is there a way in that situation to continue improving while not creeping out users. I guess the answer is to do it for long enough without screwing your users like MS did in the past.

I guess the extreme would be to spin off Github into a non profit like a Mozilla, but dedicated to improving software tools and keeping them open source.

Re: GitHub Super Linter: one linter to rule them all

#347

So, this looks interesting. Rather than a real new linter, Github is proposing a tool that runs against a number of common linting standards with a single shared standard library. Perhaps it would have been better pitched a Lint-runner for CI jobs rather than a real linter.

The primary feature is the integration with Actions. Surprisingly most linter actions don't give you inline annotations. For each linter you have to find a separate solution.

Css Eslint

Etc

I ended up using jest and the linter plugins for that, just so I would get readable inline reports. Otherwise it just fails and my devs have to search for the raw log in the checks panel.

I didn't do any others because it's too much work to set up and runs longer, burns more carbon.

Re: GitHub Super Linter: one linter to rule them all

#348

Earlier quoted context omitted.

> Consistent style is more important than each block of code being perfectly pretty "Pretty", yes, but we're literally talking about using language to communicate. Consistency taken to extremes is harmful to communication. I don't understand the worship that people have for consistency. STUPID inconsistencies are bad, yes, and yes, there are certainly arguments that about subjective matters that are a waste of time.…

I’d agree that 100% consistency is harmful to communication, but the primary communication happening in programming is with a computer. Even when it comes to other developers looking at your code, their internal process is “let me simulate what the computer understands”. Unless you are enforcing weird autoformat choices, everything should look pretty enough.

"Style" means things that the human sees. If it changes execution its not style any more. This is what tests are designed to enforce.

Re: GitHub Super Linter: one linter to rule them all

#350

Earlier quoted context omitted.

I can wholeheartedly recommend Black for Python, gofmt for Go, and terraform fmt for Terraform. What are some other great formatters out there?

I wish there was good C# one (and ideally a standard one like go). When switching between typescript with prettier and C# the first thing I notice is the lack of autoformating. edit: seems https://github.com/dotnet/format is the closest thing

https://github.com/StyleCop FWIW I'd just use the autoformat inside visual studio https://stackoverflow.com/questions/5755942/how-do-you-auto-...
Post reply on HN