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.
This commit is contained in:
NRK
2022-06-16 13:39:03 +06:00
committed by Gitea
parent 6d5a04005d
commit b162aee497
8 changed files with 26 additions and 22 deletions

View File

@ -23,8 +23,8 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/inotify.h>
#include <unistd.h>
static union {
char d[4096]; /* aligned buffer */