apache / apache/age

Ensure code standards/rules using GitHub Actions

Open
#380 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C
Stars
4.8k
Forks
523
Avg merge
1d 2h
Merged PRs (30d)
9

Description

**Is your feature request related to a problem? Please describe.**
There are some code formatting rules defined in` clang-fomat.5 `file 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](https://user-images.githubusercontent.com/85064039/206626525-f2e1f613-9db1-483c-90c5-3f76654b43fb.png)
![image](https://user-images.githubusercontent.com/85064039/206626232-9035e04c-3c27-46d7-a56a-09ce63de71d4.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.