From 68db926f9f75af80efa6187613b3f4e8ba6f2eb2 Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 23 Apr 2020 01:13:28 +0000 Subject: [PATCH] Check that files are formatted correctly. Fail the CI build if they are not. --- .travis.yml | 1 + src/toxic.c | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7fdc498..d2a15ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,4 +36,5 @@ install: script: - $HOME/cache/astyle/build/gcc/bin/astyle --options=astylerc $(find . -name "*.[ch]") + - git diff --exit-code - make ENABLE_PYTHON=1 -j2 diff --git a/src/toxic.c b/src/toxic.c index 23eb0f7..b95ea11 100644 --- a/src/toxic.c +++ b/src/toxic.c @@ -132,6 +132,7 @@ static void catch_SIGSEGV(int sig) if (!freopen("/dev/tty", "w", stderr)) { // make sure stderr is enabled since we may have disabled it fprintf(stderr, "Warning: Failed to enable stderr\n"); } + endwin(); fprintf(stderr, "Caught SIGSEGV: Aborting toxic session.\n"); exit(EXIT_FAILURE);