Skip to main content


I dummyed a variable for integration testing of our pipelines
And it turns out it silently failed *lint* in the *build stage*, not a prelinter

Pipielines were a mistake
i went absolutely apeshit on a linter two months ago:

it barfed up a message like "you are adding elements to this array in a fixed-size loop, preallocate space for it first" for some test setup code that was like,

for (int i = 0; i < 1000; i++) { vector.emplace(blah blah); }

so the guy fixing all this linter garbage typoed

vector.resize(1000);

instead of

vector.reserve(1000);

so a bunch of unit tests were now using a homogeneous pile of default-constructed elements

…
…

does the linter warn you about "hey, you have a big vector of identical default-constructed elements and then you added 1000 actual randomized test objects to it that none of your code will ever touch?" — no, of course not, that's too complicated for it

¯\_(ツ)_/¯
Yeah - computers can't read code - and the people writing linters suck - it's hard - I think they're a net good - but seriously - they get in the way so often
yeah, a net benefit but certainly less useful — and, ime, less trustworthy — than "-Wall -Werror"
I mean - a compiler warning and a linter is definitely similar.

But yeah - the compiler will usually say "you're an idiot, but I'll allow it' instead of "fuck off and rewrite it"
I get why the linter said it - but - horrible - these are both *good* uses for a linter - but fuck - that shouldn't have passed review.
But - seriously - make the linter not dumb, and make it make suggestions if it has some.

Also - why the fuck are they populating a vector with a loop?!
the actual code is more like

for (blah blah) {
// do some rng shit to make a funny object and maybe connect it to some other objects
vector.emplace(blah blah);
}
Seriously need a feature like:
featureFlag new_ui = false; #fuck-off-linter-I-mean-this
⇧