Hacker News new | ask | show | jobs
by shepherdjerred 641 days ago
Shellcheck, and really any linter (and arguably also any other form of programming language safety, like static typing or compile-time memory safety), is not there for the very experienced author (which it sounds like you are).

Those mechanisms exist for the inexperienced author (especially in a team setting) where you want some minimum quality and consistency.

An example where Shellcheck might be useful for you is when working with a team of junior programmers. You don't necessarily have the time to teach them the ins and outs of bash, but you can quickly setup Shellcheck to make sure they don't make certain types of errors.

I think your position is totally valid and nobody can or should force you to use a linter, but I think that even for you there _can_ be situations where they might be useful.

2 comments

Personally I disagree, but can understand your point.

I think I'm fairly experienced in shell and Python (~20 and ~8 YOE, respectively), and still find value in linters, type checkers, etc. Maybe moreso in Python, but that's probably a function of me writing larger programs in Python than in shell, and usually changing my mind on something as I'm writing it.

I agree that there is value even for very experienced users. A good example of this is how expert C/C++ programmers still make mistakes with memory management -- memory safe languages benefits beginners and experts equally in this case.

I personally setup linters/formatters/other static analysis for solo projects, even for languages I know very well.

I just didn't want to write a comment large enough to capture all of the nuance :)

This is one of the worst takes I've ever heard. People like you are the reason code breaks and kills people (or destroys property, etc.). Do you also refuse to use calculators, under the pretense of being too experienced, and as such calculating the square roots of four-digit numbers by hand?
I think you're misunderstanding my position. Either way, this is not a constructive comment. It contributes nothing to the discussion.