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

Ensure code standards/rules using GitHub Actions #380

Open
MuhammadTahaNaveed opened this issue Dec 9, 2022 · 3 comments · May be fixed by #465
Open

Ensure code standards/rules using GitHub Actions #380

MuhammadTahaNaveed opened this issue Dec 9, 2022 · 3 comments · May be fixed by #465
Labels
enhancement New request

Comments

@MuhammadTahaNaveed
Copy link
Member

Is your feature request related to a problem? Please describe.
There are some code formatting rules defined inclang-fomat.5file in age repo, but as far as I see, there is no workflow for ensuring that any new PR or commit is actually meeting that standard.

Describe the solution you'd like
A Github Action to ensure that any files touched or created by PR or commit is meeting the code formatting standard/rules defined in clang-format.5. We can use pre-commit to scan the code and generate automatic warnings on code style violations allowing the reviewer to focus on architecture of a change while not wasting time with trivial style nitpicks.

Describe alternatives you've considered
An alternative to having a CI tool such as pre-commit would be to manually review code for style violations which is a tedious and unnecessary time-consuming task.

Additional context
This GitHub Action will also run in the forked copies of the repository, so contributors can verify their code before creating a pull request.
Suppose a PR is created that only touches age_graph.c and the modified code does not meet the age repo code standards. The CI Action will detect the violation(see img 1) and point the exact line of code where violation occurs(see img 2).
image
image

@MuhammadTahaNaveed MuhammadTahaNaveed added the enhancement New request label Dec 9, 2022
@MuhammadTahaNaveed MuhammadTahaNaveed linked a pull request Dec 29, 2022 that will close this issue
@jrgemignani
Copy link
Contributor

@MuhammadTahaNaveed Why was this closed? It sounds like a good idea.

@MuhammadTahaNaveed
Copy link
Member Author

@MuhammadTahaNaveed Why was this closed? It sounds like a good idea.

There was some issue due to which checks were failing. I have fixed it. It's ready to be reviewed now.

@jrgemignani
Copy link
Contributor

@MuhammadTahaNaveed I've added some questions to the PR.

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

Successfully merging a pull request may close this issue.

2 participants