Conversation
LinuxDevon
left a comment
There was a problem hiding this comment.
Thanks for pulling this together! I was wonder if we just use this action: https://github.com/marketplace/actions/clang-format-check#multiple-paths in the tests.yml.
| format: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Test format | ||
| run: | | ||
| ./scripts/cl-fmt.sh | ||
| git diff --exit-code | ||
|
|
There was a problem hiding this comment.
What if we used the clang format action? This would allow us to drop the script and pull the action.
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Test format | |
| run: | | |
| ./scripts/cl-fmt.sh | |
| git diff --exit-code | |
| format-check: | |
| name: Format checks | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| path: | |
| - 'src' | |
| - 'test' | |
| - 'include' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Test format | |
| uses: jidicula/clang-format-action@v4 | |
| with: | |
| clang-format-version: '15' |
There was a problem hiding this comment.
yes this is possible, the benefit of the script is that it can be run locally, so if you would like to format your code, just execute the script. But if you like we can also use the action.
I would first prefer to fix the codebase and then adding this.
There was a problem hiding this comment.
That makes sense. We can keep the script then. I was seeing your action file was using it and running the diff. Wasn't actually formatting then committing and a color diff would have been nice. I stumbled across this and figured it made more sense to do this and run the format on it one time locally like you said.
If you want I can run it and merge or you can do that within this one. Whatever works best for the work you are doing let me know.
There was a problem hiding this comment.
I would like to first merge the other two branches, because otherwise a merge gets really a mess. So this is on hold for now
There was a problem hiding this comment.
okay that is what I figured you wanted. Adding a TODO after that.
- Format code with clang format here
|
Closing this one since #15 replaces this one. |
No description provided.