Skip to content

Add a minimalistic linter action #30

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Davoodeh
Copy link

@Davoodeh Davoodeh commented Apr 25, 2025

This action, triggered on push or pull, fails if clang-format fails. This addresses the comment referenced by 1 on #28 (formatting all the sources following the minimal path examples on #23).

Note that the "sources" directory is hardcoded on the action file pushed. Assuming the change of source directory is a fundamental change with a lot of considerations, no documentations were added to mention that the value used in this file must be synchronized with the directory name on the tree. Suppose this comment suffices.

After a bit of thinking, I realized adding a hook (as I previously suggested in my comment) is not a fit solution since it is hard to enforce on the user because of Git policies and still it just helps the developers not the maintainers so after a long 2 page scroll on Google I decided on this piece of work.

There is this run on my workflow-lint-test-example as a failure example which may prove useful to study.

P.S: I also tested Super Linter which is really wholesome in every sense but it is also too bloated just like Pre-Commit and honestly, after second 30 of build I scraped everything so I have no idea, maybe that is good too! Regardless, I don't think "checking" should take more time than "building", if that makes any sense. Since we have only C parts formatted yet, we can settle for this and consider expanding on this later. Or alternatively, all the Python and shell files will be removed before that day.

This action, triggered on push or pull, fails if clang-format fails.
This addresses the comment referenced by [1] on persiancal#28 (formatting all the
sources following the minimal path examples on persiancal#23).

Note that the "sources" directory is hardcoded on the action file
pushed. Assuming the change of source directory is a fundamental change
with a lot of considerations, no documentations were added to mention
that the value used in this file must be synchronized with the directory
name on the tree. Suppose this comment suffices.

[1]: persiancal#28 (comment)
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 this pull request may close these issues.

1 participant