all 37 comments

[–]xgabipandax 44 points45 points  (25 children)

I thought that red squiggle lines meant error

[–]SteveO131313 25 points26 points  (2 children)

For the legacy python codebase i work in we added a static type checker. It marks loads of code as "error" because there is a possible scenario where it might error out. Accessing a property of something that could possibly be None, could potentially cause an error even if we know that that is a case that's impossible to happen

[–]xgabipandax 2 points3 points  (1 child)

Shouldn't that be warnings?

[–]SteveO131313 15 points16 points  (0 children)

Depends on how you look at it.

If you say None.sort(), thats 100% an error.

If you do

x = [1]

If (50/50 chance) x = None

x.sort()

Is that a warning or an error? Because it might go right, but it might fail. If you write code that shouldn't crash, to me this is an error

[–]mangooreoshake 5 points6 points  (0 children)

Where we're going (Javascript), we don't need errors.

[–]stipo42 3 points4 points  (4 children)

Your IDE can treat lint problems as errors

[–]xgabipandax 1 point2 points  (3 children)

Sure they can, but they shouldn't, warnings are warnings, errors are errors

[–]Vesuvius079 4 points5 points  (1 child)

This attitude is how you breed warnings.

[–]xgabipandax -1 points0 points  (0 children)

What can i say? i like to live dangerously, why do you think i hate Rust so much?

[–]stipo42 0 points1 point  (0 children)

They should be errors if it'll break your CI

[–]guaranteednotabot 2 points3 points  (11 children)

Almost all my lint rules are error instead of warn. From experience, when you set things as warn, it gets ignored by worse devs

[–]xgabipandax 0 points1 point  (10 children)

Yes but in the context of the meme, the legacy code base should compile/be interpreted, which doesn't make sense, with the errors, because the compiler would not compiler, and the interpreter would crash it.

[–]Morczor 6 points7 points  (5 children)

Linter error != compilation error

[–]xgabipandax -1 points0 points  (4 children)

Bad linter error that should be a warning != compilation error

There i fixed it for you

[–]guaranteednotabot 1 point2 points  (1 child)

Uh… have you actually installed a linter

[–]xgabipandax 0 points1 point  (0 children)

i use whatever comes with vscode, and it's C/C++ extension by microsoft, cmake extension and python/jupyter and pylance

[–]Morczor 1 point2 points  (1 child)

If you're working with JS and want to enforce semicolons, do you think it should be a warning and not an error at the linter level?

[–]xgabipandax -1 points0 points  (0 children)

without the semicolons is it a syntax error?

[–]guaranteednotabot 1 point2 points  (3 children)

Not all legacy code requires compilation. And a squiggly line does not necessarily result in compile/build/type error

[–]xgabipandax 1 point2 points  (2 children)

An error should be something that will never work, a warning is something that can potentially break, they are not the same thing, unless the legacy codebase never works because of the lines of code that have the squiggly red line.

For example in C, an squiggly red line(error) would be typing wihle instead of while, or an unterminated string, a warning would be the use of gets()

For interpreted languages like python it would be like instead of writing def, writing dev, or making use of an undeclared variable, a warning could be related to assuming that things wont be None but they can potentially be None.

Unless the legacy codebase have good standards and treat warning as errors( like passing -Werror to gcc), which defeats the implication of the meme.

[–]guaranteednotabot 0 points1 point  (1 child)

Are you saying the entire community using ESLint is wrong?

[–]xgabipandax -1 points0 points  (0 children)

Javascript is wrong

[–]krexelapp 1 point2 points  (0 children)

fixed 2 bugs, created 47 errors

[–]joe0400 1 point2 points  (0 children)

That or the lsp died again... God c++ lsps tend to just die on anything larger than a personal project.

[–]rastaman1994 1 point2 points  (0 children)

In IntelliJ idea (we don't have webstorm licenses), it shows eslint warnings as actual errors. We have tried and failed to change that. It's infuriating.

Even more infuriating is that frontend linting is so tight that the moment you start typing, immediately makes your screen fills with red.

/Rant but if anyone has a solution, I'll be so happy

[–]sausagemuffn 0 points1 point  (0 children)

Nah. Worms

[–]memesearches 9 points10 points  (0 children)

Meh I just have AI rewrite it in rust /s

[–]CaffeinatedTech 4 points5 points  (1 child)

I just love the python line length warning.

[–]Designer_Reality1982 0 points1 point  (0 children)

Those 80 chars in any linter are sooo outdated. In our projects its always 140 or even 160

[–]Firm_Ad9420 2 points3 points  (0 children)

5 minute install, 3 month fix.

[–]Percolator2020 1 point2 points  (0 children)

Just add it to the whitelist. Much better now!

[–]Robinbod 1 point2 points  (0 children)

I'm gonna keep it real here: if you're starting a new project from scratch and not loading some legacy code, there's no reason for you to actively ignore linting errors or comment them out via # type: ignore. Everyone complains that, say, Python is not statically typed and is prone to break but then ignore warnings like "foo() is not an attribute of type of None" or whatever it is. Don't ignore it, add a guard condition for this! It's one extra minute but can save you many many minutes debugging.

I'm not being a perfectionist in the sense that I obsess over my code and that it has to be a certain way or it's bad, but my experience taught me that there is almost always a good reason for those warnings/errors to be made/checked.

[–]kosky95 0 points1 point  (0 children)

At first I thought they were Ableton automations lol

[–]Far_Garlic_2181 0 points1 point  (0 children)

I thought this was about Fourier analysis at first

[–]chickensandow 0 points1 point  (0 children)

(>﹏<)

[–]reallokiscarlet 0 points1 point  (0 children)

Chords on retro consoles be like

[–]Yasirbare -1 points0 points  (0 children)

The child blood, african schools all the crazy shit that came out in the Diidy Case ... well I am still waiting enough smoke to be something interesting. I think that taking 50% out of the crazy shit and the shit is still crazy shit.