Skip to content

Ensure code standards/rules using GitHub Actions #380

@MuhammadTahaNaveed

Description

@MuhammadTahaNaveed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions