4 ms·
What's the point of putting linters into CI? Is the point to fail the build if the code wasn't pre-formatted with i.e. Black? Or is the point to autoformat and
by umvi 5y ago
What's the point of putting linters into CI? Is the point to fail the build if the code wasn't pre-formatted with i.e. Black? Or is the point to autoformat and autocommit the formatted code?
- selestify 5y ago> Is the point to fail the build if the code wasn't pre-formatted with i.e. Black? It's this. Ensures that anything merged to master keeps the formatting conventions established in the project.
- seattle_spring 5y agoThe former, in my case. Last thing I want is someone merging their own "creative interpretation" of proper formatting.
- bckr 5y ago> Is the point to fail the build if the code wasn't pre-formatted with i.e. Black? It's this one > Or is the point to autoformat This one is done with pre-commit (which should probably be named pre-push?) hooks > and autocommit the formatted code? I don't think this one is done, and I think it's undesirable
- mkesper 5y agoPre-commit hooks really happen when you type 'git commit'. If you have failing checks in them, your commit will be aborted.