Compare commits
7 Commits
ci/separat
...
playground
| Author | SHA1 | Date | |
|---|---|---|---|
|
56dcb54ffc
|
|||
|
34501d913c
|
|||
|
b772bd8c86
|
|||
|
58dd89be40
|
|||
|
b2ce06923e
|
|||
|
9b292a6100
|
|||
|
a9c21ce487
|
14
.github/workflows/ci-code.yml
vendored
14
.github/workflows/ci-code.yml
vendored
@@ -29,10 +29,10 @@ jobs:
|
|||||||
name: Linux
|
name: Linux
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
|
||||||
run: docker build -f Dockerfile.${{ matrix.flavor }} -t profanity .
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: docker run profanity ./ci-build.sh
|
run: |
|
||||||
|
docker build -f Dockerfile.${{ matrix.flavor }} -t profanity .
|
||||||
|
docker run profanity ./ci-build.sh
|
||||||
|
|
||||||
code-style:
|
code-style:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -107,7 +107,7 @@ jobs:
|
|||||||
name: Code Coverage
|
name: Code Coverage
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build and run coverage
|
||||||
run: docker build -f Dockerfile.arch -t profanity-cov .
|
run: |
|
||||||
- name: Run coverage
|
docker build -f Dockerfile.arch -t profanity-cov .
|
||||||
run: docker run profanity-cov ./ci-build.sh --coverage-only
|
docker run profanity-cov ./ci-build.sh --coverage-only
|
||||||
@@ -152,7 +152,7 @@ We have a static analyzer `check-cwe134.sh` that detects CWE-134 format string v
|
|||||||
./check-cwe134.sh
|
./check-cwe134.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
This checks for unsafe patterns where data could be passed directly as a format string to functions like `printf`, `cons_show`, etc. Never pass a raw string for formatting; use `"%s"` format specifier instead.
|
This checks for unsafe patterns where user-controlled data could be passed directly as a format string to functions like `cons_show`, `log_error`, `win_println`, etc. Always use `"%s"` format specifier when printing user data.
|
||||||
|
|
||||||
### Finding typos
|
### Finding typos
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
FROM archlinux:latest
|
FROM archlinux
|
||||||
|
|
||||||
ENV TERM=xterm
|
ENV TERM=xterm
|
||||||
ENV CC="ccache gcc"
|
ENV CC="ccache gcc"
|
||||||
|
|
||||||
RUN pacman -Syyu --noconfirm
|
RUN pacman -Syu --noconfirm
|
||||||
|
|
||||||
# reflector is optional - if it fails due to network issues, continue with default mirrorlist
|
# reflector is optional - if it fails due to network issues, continue with default mirrorlist
|
||||||
RUN pacman -S --needed --noconfirm reflector && \
|
RUN pacman -S --needed --noconfirm reflector && \
|
||||||
(reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist || true)
|
(reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist || true)
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ extract_test_count() {
|
|||||||
# and checks that the test framework reports the failure correctly
|
# and checks that the test framework reports the failure correctly
|
||||||
verify_test_failure_detection()
|
verify_test_failure_detection()
|
||||||
{
|
{
|
||||||
|
echo
|
||||||
echo "==> Verifying test failure detection..."
|
echo "==> Verifying test failure detection..."
|
||||||
|
|
||||||
# Create a simple failing test
|
# Create a simple failing test
|
||||||
|
|||||||
@@ -2532,6 +2532,9 @@ _disco_items_result_handler(xmpp_stanza_t* const stanza)
|
|||||||
}
|
}
|
||||||
|
|
||||||
xmpp_stanza_t* child = xmpp_stanza_get_children(query);
|
xmpp_stanza_t* child = xmpp_stanza_get_children(query);
|
||||||
|
if (child == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while (child) {
|
while (child) {
|
||||||
const char* stanza_name = xmpp_stanza_get_name(child);
|
const char* stanza_name = xmpp_stanza_get_name(child);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ responds_to_last_activity_request(void **state)
|
|||||||
"</iq>"
|
"</iq>"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Verify that CProof responds with last activity info
|
// Verify profanity responds with last activity info
|
||||||
// The 'seconds' attribute indicates idle time
|
// The 'seconds' attribute indicates idle time
|
||||||
assert_true(stbbr_received(
|
assert_true(stbbr_received(
|
||||||
"<iq id='last1' type='result' to='buddy1@localhost/mobile'>"
|
"<iq id='last1' type='result' to='buddy1@localhost/mobile'>"
|
||||||
|
|||||||
Reference in New Issue
Block a user