Merge pull request #1828 from profanity-im/newclang
Use GH action for code style check
This commit is contained in:
@@ -9,3 +9,4 @@ f21595597f4fa872b77d7f76ae04916f4aae732e
|
|||||||
0d8b62c9a29d539889939150ed4da4f33407fa0e
|
0d8b62c9a29d539889939150ed4da4f33407fa0e
|
||||||
9b55f2dec0ea27a9ce4856e303425e12f866cea2
|
9b55f2dec0ea27a9ce4856e303425e12f866cea2
|
||||||
a04031cec9e20f4a805a174d44bf8b682a69d7a7
|
a04031cec9e20f4a805a174d44bf8b682a69d7a7
|
||||||
|
d17bcf619c45bfbbf4d0e0bcf218fe6550c185f5
|
||||||
|
|||||||
23
.github/workflows/main.yml
vendored
23
.github/workflows/main.yml
vendored
@@ -36,24 +36,13 @@ jobs:
|
|||||||
run: ./ci-build.sh
|
run: ./ci-build.sh
|
||||||
|
|
||||||
code-style:
|
code-style:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
name: Check coding style
|
name: Check coding style
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: install dependencies
|
- name: Run clang-format
|
||||||
run: |
|
uses: jidicula/clang-format-action@v4.11.0
|
||||||
sudo apt update
|
with:
|
||||||
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
|
clang-format-version: '16'
|
||||||
- name: Install libstrophe
|
check-path: 'src'
|
||||||
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
|
|
||||||
|
|||||||
@@ -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,
|
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,
|
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;
|
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)(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,
|
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)(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,
|
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user