Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub actions to enforce code style #18

Closed
lacabra opened this issue Apr 23, 2021 · 3 comments · Fixed by #21
Closed

Add GitHub actions to enforce code style #18

lacabra opened this issue Apr 23, 2021 · 3 comments · Fixed by #21
Assignees

Comments

@lacabra
Copy link
Collaborator

lacabra commented Apr 23, 2021

As a continuation of the work started in #14, configure the CI through GitHub Actions to enforce the code style upon committing files to the repo.

@DivyanshiSingh
Copy link
Contributor

Hey @lacabra please assign this issue to me.

@DivyanshiSingh
Copy link
Contributor

Can you describe more about this issue @lacabra. It would be a great help for me to resolve this issue.

@lacabra
Copy link
Collaborator Author

lacabra commented Apr 24, 2021

@DivyanshiSingh: Absolutely. Right now there is a precommit hook that checks that all the code files follow a coding standard to ensure consistency (especially important when multiple people contribute to a code repository and may use different coding styles), for background, read more about git hooks.

Still it could be that some developer did not configure the git hook properly, or intentionally bypassed it, and pushed some changes that did not match the agreed code style. To address this possibility, I am hereby looking to run this check as part of the CI, which will succeed if the linter passes, or will fail otherwise. For a reference implementation see this line on this other repo (where you worked recently 😉) which does what I am requesting here. The catch is that the CI is not yet set up on this repo, so you need to add the file (please name it .github/workflows/main.yml) that contains the requested check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants