2021-02-27 15:37:51 +01:00
|
|
|
---
|
2019-11-02 11:59:34 +01:00
|
|
|
name: Check formatting
|
|
|
|
|
2020-07-18 14:27:06 +02:00
|
|
|
on:
|
|
|
|
push:
|
2021-02-27 15:37:51 +01:00
|
|
|
branches:
|
|
|
|
- master
|
2020-07-18 14:27:06 +02:00
|
|
|
pull_request:
|
2023-07-29 13:02:43 +02:00
|
|
|
merge_group:
|
2019-11-02 11:59:34 +01:00
|
|
|
|
2023-01-15 17:27:41 +01:00
|
|
|
concurrency:
|
2022-05-21 11:33:21 +02:00
|
|
|
group: check-formatting-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2019-11-02 11:59:34 +01:00
|
|
|
jobs:
|
2020-10-18 15:54:48 +02:00
|
|
|
check:
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2019-11-02 11:59:34 +01:00
|
|
|
|
|
|
|
steps:
|
2023-09-09 15:31:12 +02:00
|
|
|
- uses: actions/checkout@v4
|
2021-02-27 15:37:51 +01:00
|
|
|
|
|
|
|
- name: apt-get update
|
|
|
|
run: sudo apt-get update
|
2019-11-02 12:13:41 +01:00
|
|
|
|
2021-02-27 15:37:51 +01:00
|
|
|
- name: Install clang-format
|
2023-10-31 18:24:47 +01:00
|
|
|
run: sudo apt-get -y install dos2unix
|
2019-11-02 11:59:34 +01:00
|
|
|
|
2021-02-27 15:37:51 +01:00
|
|
|
- name: Check formatting
|
2024-04-12 09:31:48 +02:00
|
|
|
uses: DoozyX/clang-format-lint-action@v0.17
|
2023-10-31 18:24:47 +01:00
|
|
|
with:
|
|
|
|
source: "./src ./tests/src ./benchmarks/src ./mocks/include"
|
|
|
|
extensions: "hpp,cpp"
|
|
|
|
clangFormatVersion: 16
|
2020-10-18 15:54:48 +02:00
|
|
|
|
2021-02-27 15:37:51 +01:00
|
|
|
- name: Check line-endings
|
2023-12-17 13:37:30 +01:00
|
|
|
run: ./scripts/check-line-endings.sh
|