Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Most importantly, pick a linter that can automatically fix it. I use pre-commit (https://pre-commit.com) for that. As a bonus, it supports other, language-specific linters.
One project you may be interested in is Black for python.
It's a code formatter that provides one style with very limited configuration. The idea being the rigidness removes bike shedding and forces consistency.
Of course you can use any code formatter and configure it to your liking, but there's something to be said about not giving the user levers to pull and argue about. Everyone just download Black, and you're good to go.
https://black.readthedocs.io/en/stable/
Yes. Just because a decision that's enforced allows the conversation to move on to other things.
And to enforce it? Try https://editorconfig.org/ which is supported natively by many editors (eg Visual Studio) and via plugins in others (eg VS Code).
Related posts
- How to setup Black and pre-commit in python for auto text-formatting on commit
- Packaging Python projects in 2023 from scratch
- Automate Python Linting and Code Style Enforcement with Ruff and GitHub Actions
- Serious question : What is your workflow for re-indenting a python py file?
- Securing CDK pipelines in an enterprise organization