-
Notifications
You must be signed in to change notification settings - Fork 228
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
Integrate clang-format into checks, docs and tooling #1702
Comments
I'm adding my personal opinion as a comment:
@jamulussoftware/maindevelopers @passing What do you think? |
For me,
is really the best option. Any check written as a standard CI action can be overridden, as far as I understand. |
I'd prefer the "enforce style" option but only if we can clear out the disadvantages to a certain degree:
that should not be a problem as you can configure the action to be triggered has soon as a PR is created: I tested that here: https://github.com/passing/jamulus/pull/3/commits
In my test that did happen, so after the first commit has been linted, I had to either pull (and manually resolve locally) the linter changes or force-push consecutive changes But I am not sure how that works in the same way when the PR is coming from another (forked) repository. It would be good if you can test that by making a PR to https://github.com/passing/jamulus as the action may not make the change in the other repo. |
I'm still a bit unsure how we'd do certain things. History-wise, I'd really want to avoid "Fix clang-format style" commits for every PR/commit as it'd clutter the history. It would also be annoying for
Done. You would need to approve the check on Github though as I'm a first-time contributor in your fork. |
I agree on the concerns regarding the commit history. Another approach could be to just accept style violations in contributions and do a manual one-time lint/commit on every release. That would reduce lint commits and also reduce contributors efforts. I don't really favor that, but may be a compromise worth thinking of.
somehow the action had some issue, need to have a look at it.
|
Yes. The basis for that should be there now (
We should also consider the disadvantage in code reviews. The main reason for adopting a consistent coding style is keeping code readable. Code reviews require lots of code reading, so it would be really useful to have properly formatted code there, one way or the other.
Ok, let me know if I should do something on my side. |
setting up a workflow that lints the code in PRs from forked repositories, doesn't seem to be easy and then still would require a contributor to enable the action: So I'l try to setup an action that just reports wrong style |
@hoffie code checking is working on my own PR now: https://github.com/passing/jamulus/pull/3 |
This ensures that clang-format is run on all source files before building (jamulussoftware#1702). If clang-format is not available, a warning is output and the build continues. clang-format is also invoked on non-release builds only as that is what PRs will usually be based on.
This ensures that clang-format is run on all source files before building (jamulussoftware#1702). If clang-format is not available, a warning is output and the build continues. clang-format is also invoked on non-release builds only as that is what PRs will usually be based on.
This simplifies submission of properly formatted code for users with no editor/IDE integration of clang-format (jamulussoftware#1702).
This simplifies submission of properly formatted code for users with no editor/IDE integration of clang-format (jamulussoftware#1702).
This simplifies submission of properly formatted code for users with no editor/IDE integration of clang-format (jamulussoftware#1702).
This simplifies submission of properly formatted code for users with no editor/IDE integration of clang-format (jamulussoftware#1702).
This simplifies submission of properly formatted code for users with no editor/IDE integration of clang-format (jamulussoftware#1702).
This simplifies submission of properly formatted code for users with no editor/IDE integration of clang-format (jamulussoftware#1702).
This simplifies submission of properly formatted code for users with no editor/IDE integration of clang-format (jamulussoftware#1702).
This simplifies submission of properly formatted code for users with no editor/IDE integration of clang-format (jamulussoftware#1702).
@hoffie I think we can close this now? |
This simplifies submission of properly formatted code for users with no editor/IDE integration of clang-format (jamulussoftware#1702).
With the initial clang-format definition and initial run with the config having been merged (#1127), the related issue (#901) was auto-closed, although its scope was greater than what the (huge) PR did. Therefore, I'm opening this follow-up issue for tracking the remaining parts for the actual integration.
Has this feature been discussed and generally agreed?
Yes, here: #901 (comment)
Some details still to be decided upon.
Describe the solution you'd like
The text was updated successfully, but these errors were encountered: