1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

Merge pull request #1828 from profanity-im/newclang

Use GH action for code style check
This commit is contained in:
Michael Vetter 2023-04-14 22:01:28 +02:00 committed by GitHub
commit 6eacfcb96e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 128 additions and 135 deletions

View File

@ -9,3 +9,4 @@ f21595597f4fa872b77d7f76ae04916f4aae732e
0d8b62c9a29d539889939150ed4da4f33407fa0e
9b55f2dec0ea27a9ce4856e303425e12f866cea2
a04031cec9e20f4a805a174d44bf8b682a69d7a7
d17bcf619c45bfbbf4d0e0bcf218fe6550c185f5

View File

@ -36,24 +36,13 @@ jobs:
run: ./ci-build.sh
code-style:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Check coding style
continue-on-error: true
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends autoconf autoconf-archive automake expect gcc git libcmocka-dev libcurl3-dev libgcrypt-dev libglib2.0-dev libgpgme11-dev libgtk2.0-dev libmicrohttpd-dev libncursesw5-dev libnotify-dev libotr5-dev libreadline-dev libsignal-protocol-c-dev libssl-dev libtool libxss-dev make pkg-config python3-dev python-dev-is-python3 libsqlite3-dev
- name: Install libstrophe
run: |
git clone https://github.com/strophe/libstrophe ../libstrophe
cd ../libstrophe && ./bootstrap.sh && ./configure && make -j$(nproc) && sudo make install
- name: Configure
run: |
./bootstrap.sh
./configure
- name: Check style
run: |
make format
git diff --exit-code
- name: Run clang-format
uses: jidicula/clang-format-action@v4.11.0
with:
clang-format-version: '16'
check-path: 'src'

View File

@ -47,7 +47,8 @@ int (*prof_cons_bad_cmd_usage)(const char *const cmd) = NULL;
void (*_prof_register_command)(const char* filename, const char* command_name, int min_args, int max_args,
char** synopsis, const char* description, char* arguments[][2], char** examples,
CMD_CB callback) = NULL;
CMD_CB callback)
= NULL;
void (*_prof_register_timed)(const char* filename, TIMED_CB callback, int interval_seconds) = NULL;
@ -113,8 +114,10 @@ int (*prof_room_unset_message_char)(const char *roomjid) = NULL;
int (*prof_chat_show)(const char* const barejid, const char* const message) = NULL;
int (*prof_chat_show_themed)(const char* const barejid, const char* const group, const char* const item, const char* const def,
const char *const ch, const char *const message) = NULL;
const char* const ch, const char* const message)
= NULL;
int (*prof_room_show)(const char* const roomjid, const char* const message) = NULL;
int (*prof_room_show_themed)(const char* const roomjid, const char* const group, const char* const item, const char* const def,
const char *const ch, const char *const message) = NULL;
const char* const ch, const char* const message)
= NULL;