13
top 7 comments
sorted by: hot top new old
[-] BeefPiano@lemmy.world 16 points 2 years ago
[-] BatmanAoD@programming.dev 11 points 2 years ago

...why not both? An auto-formatter for personal use, a linter for CI checks on PRs.

[-] Bogasse@lemmy.ml 8 points 2 years ago

I agree : CI is required as a safety belt and then contributers can choose the workflow they prefer : format on save, manual invoke, precommit, ...

[-] mvirts@lemmy.world 2 points 2 years ago

Agreed, just run it all through a formatter and save everyone some time. Those who break the formatter will learn to conform ๐Ÿ™ƒ

[-] xmunk@sh.itjust.works 12 points 2 years ago

You'd be surprised what you can accomplish purely through a robust PR review process and a clear standards document.

That said, tools to enforce and autocorrect basic syntax stuff can be quite helpful.

[-] Lmaydev@programming.dev 2 points 2 years ago

Absolutely but it can reduce a lot of work if as many things as possible are enforced before you get to that stage.

[-] Lmaydev@programming.dev 1 points 2 years ago

I recently enforced coding standards in our c# code bases.

Basically used an editor config and project properties to enable all analysers and set all rules to warnings. Also set warnings as errors for release builds.

I've then been adjusting rules by hand if they're irritating or wrong.

It's having great results and has already caught a load of bugs.

But my god do the juniors hate it haha

this post was submitted on 17 Jan 2024
13 points (78.3% liked)

Programming

26559 readers
332 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS