Browse Source

Fix GitHub Actions Format Check

This change fixes the format check in GitHub actions ran by `clang-format`.

Dockerfile

```dockerfile
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive

RUN set -ex; \
apt-get update; \
apt-get install -y build-essential meson appstream clang clang-format clang-tools libdbus-1-dev libinih-dev libsystemd-dev git

RUN set -ex; \
yes | adduser ci-user

USER ci-user
```

Environment setup

```bash
sudo su -g docker $USER
docker build -t ci .
```

clang-format fix

```bash
docker run -e CI=true --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./scripts/format-check.sh
```
Sam Gleske 3 years ago
parent
commit
23493e5cc3
1 changed files with 1 additions and 2 deletions
  1. 1 2
      daemon/gamemode-tests.c

+ 1 - 2
daemon/gamemode-tests.c

@@ -268,8 +268,7 @@ static int run_gamemoderun_and_reaper_tests(struct GameModeConfig *config)
 		/* Close stdout, we don't care if sh prints anything */
 		fclose(stdout);
 		/* Preload into sh and then kill it */
-		if (execlp("gamemoderun", "gamemoderun", "sleep", "5", (char *)NULL) ==
-		    -1) {
+		if (execlp("gamemoderun", "gamemoderun", "sleep", "5", (char *)NULL) == -1) {
 			LOG_ERROR("failed to launch gamemoderun with execl: %s\n", strerror(errno));
 			return -1;
 		}