JohnVonNeumann / opensorcery

Gamified open source contributions.
7 stars 0 forks source link

Create local/development environment githooks so that all linting/testing can be performed locally in the same way as the build pipeline #30

Open JohnVonNeumann opened 6 years ago

JohnVonNeumann commented 6 years ago

Is your feature request related to a problem? Please describe. It's great having a build pipeline, but it can occasionally be pretty slow to get shit into the pipeline only to get knocked back by a README linting error that could have been picked up on 3 minutes earlier without the need for a build.

Describe the solution you'd like The perfect solution I believe would be to utilise pre-commit/pre-push git hooks that utilise the same commands from Travis CI, in a local way, the main reason I believe this to be the best way, is that I am against installing dependencies on your local host directly, as containers enable us to be able to keep clean environments. Basically, the git hooks should run then same docker run opensorcery/yamllint commands, with docker being the only local dependency.

Describe alternatives you've considered Installing these tools locally, but this would not satisfy the requirements of the ticket.

Additional context Refer to the travis.yml file for examples of commands run within the pipeline. Given 2 points because I've never written githooks before, so I can't reasonably give it 1 point.