It is SO STUPID that spaces are widely preferred for indentation in code.

For the past, I don’t know, two hours I’ve been trying to fix YAML formatting issues that could have been fixed without any human intervention if only tabs were used. (It’s a big file, hence the duration.) (I know YAML doesn’t support tabs. That’s kind of my point.)

I even reluctantly asked Gemini (forced upon me by work; I was hoping it would change my mind in this case) why anyone would prefer spaces. It said the same irrelevant thing most people say: because some tools don’t support tabs properly.

Know what that sounds like to me? A problem with the fucking tool.

I don’t know if this is the right place to post this, but I can’t think of a better option.

  • a_jeering_serpent@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    1
    ·
    14 days ago

    I heavily use githooks to let everyone have their cake and eat it too. Eg:

    Git post checkout hook converts something i don’t like to how i prefer it

    Do some things

    Git pre-commit hook converts my preferred thing back to the format as committed.

    Usually i can do these with a one-liner from some combination of jc, jq, yq, and yamlfmt and for everything else there’s sed. If there’s a linter or formatter in the repo I’ll run those in a pre commit hook after all my stuff. The best part is it just takes an executable so you can write it in anything you can shebang, compile, or interpret.

    JC is underrated and YQ i avoid for most cases but it’s quite good with comment handling and preservation

    • corsicanguppy@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      ·
      14 days ago

      Show me your hooks. I work with a psychopath and although he’s a great guy I need this argument to stop.