Your code formatting is TRWTF
-
-
a lot bigger on the inside
-
-
Go requires braces around the bodies of
if
,for
,switch
, andselect
. It does not require parentheses around the condition, however.
-
-
Funner? I barely knew 'er
-
if (condition) { statements; } else if (condition) { statements; } else { statements; }
Fixed by
#define IF(x) if (x) { #define ELSEIF(x) } else if (x) { #define ENDIF }
-
-
@boomzilla said:
But I agree with you in spirit.
you agree in spirit? are you a ghost then?Or drunk.
Unrelated:
Thanks Discourse
-
that's called "else with ears" and people who write it that way should be shoot on sight
-
Searching the project I'm working on for
} else {
:Matching lines: 548 Matching files: 47 Total files searched: 1101
-
-
shooted
What the hell us it with English fails in this thread? First @Luhmann, now you.
LEARN THE LANGUAGE OR GET OUT OF MY COUNTRY!
wait...
-
hrvatski?
-
I'm not that cruel.
-
-
@xaade said:
Fixed by
The C preprocessor never "fixed" anything.
Sure it has - in the veterinary sense.
-
-
-
@dkf said:
Too many spaces…
Yes, best replace them with newlines (
:s/ /\r/g
).E_NEWLINES_NOT_FOUND, E_CARRIAGE_RETURN_NOT_NEW_LINE
-
-
E_CARRIAGE_RETURN_NOT_NEW_LINE
Ah, that's a peculiarity of vim.
\r
ina regexthe replacement part of a regex becomes a normal newline.
-
I'm not sure that makes me happier either.
-
It beats
:s/ /\n/g
, which replaces spaces with NUL-characters, though.
-
That definitely doesn't make me happier!
-
Back when the whole OpenSSL thing blew up and I was following updates for the guys doing fixes on the BSD version, I became aware that this type of formatting existed:
static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) {
They apparently do that on purpose because they do it for all function definitions.
Also they use like 8 spaces per tab indent.