APIDevTools / swagger-cli

Swagger 2.0 and OpenAPI 3.0 command-line tool
https://apitools.dev/swagger-cli
MIT License
515 stars 69 forks source link

[chore]: configure pre-commit hook #38

Closed jamesgeorge007 closed 4 years ago

jamesgeorge007 commented 4 years ago

pre-commit hooks can come in handy while in the Dev workflow. The lint script can be made to execute automatically before making a commit (and staging updated files).

jamesgeorge007 commented 4 years ago

@JamesMessinger I would be happy to shoot a PR :+1:

JamesMessinger commented 4 years ago

I appreciate your willingness to contribute and improve this project. Thank you for that. 🙏

However, I'm not personally a fan of doing stuff like that in pre-commit hooks because it makes each commit take several seconds, which is frustrating. It ends up encouraging people (myself included) to just do a single large commit rather than smaller commits to avoid waiting for the linter to run each time.

The lint script is automatically run as part of CI/CD as well as part of the test and release scripts, which I feel is sufficient to ensure that all code passes linter checks before being merged/released.

jamesgeorge007 commented 4 years ago

Should I go ahead and close this one or are we gonna wait to hear out from other guys :thinking:

JamesMessinger commented 4 years ago

I'll go ahead and close it. But if anyone wants to chime-in on it, I'm totally willing to listen and maybe re-open it