diff options
author | NRK <nrk@disroot.org> | 2022-06-16 13:39:03 +0600 |
---|---|---|
committer | Gitea <gitea@fake.local> | 2022-06-28 21:28:06 +0200 |
commit | b162aee497ef9be3730f59bb0c9d974171bfebee (patch) | |
tree | 9dd81766b59b6463cc23e698b3a8875a84e4e16c /main.c | |
parent | 6d5a04005dd1dff12ebfe2e3a56912ec26718f3f (diff) |
sort and group includes
* includes are sorted alphabetically
* their grouping and layout is the following:
- nsxiv.h will be the first include
- followed by any internal headers (e.g "commands.h" "config.h")
- followed by system headers (<stdlib.h> etc)
- followed by third party headers (X.h libwebp etc)
* also add `llvm-include-order` check to clang-tidy so that it can catch
unsorted includes during CI.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -22,22 +22,23 @@ #include "commands.h" #include "config.h" -#include <stdlib.h> -#include <stdarg.h> -#include <stdio.h> -#include <string.h> -#include <fcntl.h> -#include <unistd.h> #include <errno.h> +#include <fcntl.h> #include <locale.h> -#include <signal.h> #include <poll.h> +#include <signal.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <sys/stat.h> +#include <sys/time.h> #include <sys/wait.h> #include <time.h> -#include <sys/time.h> -#include <X11/keysym.h> +#include <unistd.h> + #include <X11/XF86keysym.h> +#include <X11/keysym.h> #define MODMASK(mask) ((mask) & USED_MODMASK) #define BAR_SEP " " |