jack-ullery / AppAnvil

Graphical user interface for the AppArmor security module (in-progress)
GNU General Public License v3.0
14 stars 12 forks source link

Improved automatic formatting #33

Closed jack-ullery closed 2 years ago

jack-ullery commented 2 years ago

Fixed issues related to automatic formatting (using clang-format) with Ubuntu 22.04.

This new version of Ubuntu contains version 14 of clang-format. I updated CMakeLists.txt and build.yml to reflect these updates.

I also considerably changed the style options for clang-format to leverage new capabilities, and push the codebase closer to Mozilla's Style Guide.

Finally, I created a new action which will auto-format code every time a PR is opened. I haven't tested this action yet, so fingers crossed it works perfectly for this PR.

jack-ullery commented 2 years ago

I was unable to correctly auto-format code on pull requests. This is achievable with pull_request_target, but the actions workflow would have to be crafted in a way to avoid this issue. However, this idea probably deserves further attention, as it could make PR reviews easier.

For now, I will just merge this request.