litmuschaos / litmusctl

Command-Line tool to manage Litmuschaos's agent plane
Apache License 2.0
24 stars 42 forks source link

Pre commit Hook added. #203

Closed aryan-bhokare closed 6 months ago

aryan-bhokare commented 7 months ago

closes #196

Changes Introduced:

Details:

Prerequisite:

use ln -s ../../.pre-commit .git/hooks/pre-commit to create a symbolic link named pre-commit in the .git/hooks directory that points to the .pre-commit .

shivam-Purohit commented 7 months ago

@aryan-bhokare have you tested the code in the local? if you have would you share ss or some example (otherwise i have to check it myself) Other than that i think we should follow this approach and add more checks. @SarthakJain26 @neelanjan00 what more checks we should add before committing other than linting and fmt?

shivam-Purohit commented 7 months ago

I tried it in your code in a codespace but it is still letting me commit some empty lines.

can you try and tell after linking it with pre-commit hook in git like this? ln -s ../../.pre-commit .git/hooks/pre-commit

i think this should work if you have already forked it, can you check it if its working?

kartikaysaxena commented 7 months ago

I tried it in your code in a codespace but it is still letting me commit some empty lines.

can you try and tell after linking it with pre-commit hook in git like this?

ln -s ../../.pre-commit .git/hooks/pre-commit

i think this should work if you have already forked it, can you check it if its working?

Yeah I didn't try this step as it wasn't listed as a prerequisite in the description

aryan-bhokare commented 7 months ago

Making Formatting Error

Screenshot from 2024-02-22 10-21-44

Result Screenshot from 2024-02-22 10-20-51