Alt
Indiana Jones swapping out an artifact for a fake one meme template with the text “existing code” on the real artifact, “new commit” on the fake one, and “linter” on the pedestal / trap
Trial:
and error:
I used to have my vim set up to trim excess whitespace on write.
I had no idea how many errant diff’s that would generate, I had to turn it off.
Yeah, you generally just want the same auto-stuff done as would be enforced in CI anyway.
… all the other stuff you could fix but wind up just ignoring because your team ignores it will just glare at you until you sneak it in somehow
The right balance on this is to set it up to only trim whitespace on lines that you have edited, and only on-save.
Emacs has ws-butler for that behavior: https://github.com/lewang/ws-butler
That History section is exactly what happened to me
I’ll have to see if there’s a nvim equivalent, or if I can make my own
i have prettier auto formatting on save (but also use vim auto format)
I’ve been trying to pair down my extensions, so I’ve been using ale’s fixers to do formatting.
I’m not a huge fan though, I’ll probably go back to vim auto format.
Why linter? I hope your CI has more than just linting turned on
The idea for the meme came to me regarding contributing to a project for the first time. It’s not like I will push trash code, but if I accidentally didn’t add exactly two newlines between something and it starts complaining…
If there’s a linter with such opinionated rules there should also be a pre-commit hook that auto-formats accordingly.
Or on save even. Slow pre commit hooks suckkkk
That’s up to each individual developer’s own setup. But hooks are a way to ensure uniformity since they apply to all commits.
for me, it’s rather the tests in the pipelines rather than linting, which happens while I’m writing code
The linter runs automatically on every commit and blocks merges if it fails. Try again