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:
|
2022-03-04 14:49:51 +01:00
|
|
|
- uses: actions/checkout@v3
|
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
|
|
|
|
run: sudo apt-get -y install clang-format dos2unix
|
2019-11-02 11:59:34 +01:00
|
|
|
|
2021-02-27 15:37:51 +01:00
|
|
|
- name: Check formatting
|
|
|
|
run: ./tools/check-format.sh
|
2020-10-18 15:54:48 +02:00
|
|
|
|
2021-02-27 15:37:51 +01:00
|
|
|
- name: Check line-endings
|
|
|
|
run: ./tools/check-line-endings.sh
|