refactor(build): remove unused includes #17078

Remove unused includes in src/nvim/buffer.c|h using the IWYU library.
Yet another step towards #6371 and #549
This commit is contained in:
kylo252 2022-04-27 06:38:12 +02:00 committed by GitHub
parent 5f3018fa1a
commit 0d41c4dee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 19 additions and 17 deletions

View File

@ -36,8 +36,16 @@ BraceWrapping:
BeforeElse: false
IndentBraces: false
PointerAlignment: Right
SortIncludes: false
SortIncludes: true
Cpp11BracedListStyle: false
IncludeCategories:
- Regex: '<[/[:alnum:].]+>'
Priority: 0
- Regex: '^"(nvim|vim)/'
Priority: 1
SortPriority: 1
CaseSensitive: false
IndentPPDirectives: AfterHash
SpaceBeforeParens: ControlStatementsExceptControlMacros
ForEachMacros:
- FOR_ALL_AUEVENTS
@ -54,4 +62,4 @@ ForEachMacros:
- RBUFFER_EACH_REVERSE
- RBUFFER_UNTIL_EMPTY
- RBUFFER_UNTIL_FULL
- kl_iter
- kl_iter

View File

@ -4,7 +4,6 @@
// autocmd.c: Autocommand related functions
#include <signal.h>
#include "lauxlib.h"
#include "nvim/api/private/helpers.h"
#include "nvim/ascii.h"
#include "nvim/autocmd.h"
@ -27,6 +26,9 @@
#include "nvim/state.h"
#include "nvim/ui_compositor.h"
#include "nvim/vim.h"
#include "nvim/window.h"
#include "lauxlib.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "auevents_name_map.generated.h"

View File

@ -25,7 +25,6 @@
#include <string.h>
#include "nvim/api/private/helpers.h"
#include "nvim/api/vim.h"
#include "nvim/ascii.h"
#include "nvim/assert.h"
#include "nvim/buffer.h"
@ -50,7 +49,6 @@
#include "nvim/garray.h"
#include "nvim/getchar.h"
#include "nvim/hashtab.h"
#include "nvim/highlight.h"
#include "nvim/highlight_group.h"
#include "nvim/indent.h"
#include "nvim/indent_c.h"
@ -64,13 +62,11 @@
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"
#include "nvim/os_unix.h"
#include "nvim/path.h"
#include "nvim/plines.h"
#include "nvim/quickfix.h"
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/shada.h"
#include "nvim/sign.h"
#include "nvim/spell.h"
#include "nvim/strings.h"

View File

@ -2,14 +2,11 @@
#define NVIM_BUFFER_H
#include "nvim/eval.h"
#include "nvim/ex_cmds_defs.h" // for exarg_T
#include "nvim/func_attr.h"
#include "nvim/macros.h"
#include "nvim/memline.h"
#include "nvim/pos.h" // for linenr_T
#include "nvim/screen.h" // for StlClickRecord
#include "nvim/vim.h"
#include "nvim/window.h"
// Values for buflist_getfile()
enum getf_values {

View File

@ -102,8 +102,6 @@ typedef uint64_t disptick_T; // display tick type
// for struct memline (it needs memfile_T)
#include "nvim/memline_defs.h"
// for struct memfile, bhdr_T, blocknr_T... (it needs buf_T)
#include "nvim/memfile_defs.h"
// for regprog_T. Needs win_T and buf_T.
#include "nvim/regexp_defs.h"

View File

@ -1,8 +1,8 @@
#ifndef NVIM_BUFFER_UPDATES_H
#define NVIM_BUFFER_UPDATES_H
#include "nvim/buffer_defs.h"
#include "nvim/extmark.h"
#include "nvim/buffer_defs.h" // for buf_T
#include "nvim/extmark.h" // for bcount_t
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "buffer_updates.h.generated.h"

View File

@ -25,7 +25,6 @@
#include "nvim/eval/funcs.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/userfunc.h"
#include "nvim/ex_cmds2.h"
#include "nvim/ex_docmd.h"
#include "nvim/ex_getln.h"
#include "nvim/file_search.h"
@ -70,7 +69,7 @@
#include "nvim/undo.h"
#include "nvim/version.h"
#include "nvim/vim.h"
#include "nvim/window.h"
/// Describe data to return from find_some_match()
typedef enum {

View File

@ -32,6 +32,7 @@
#include "nvim/quickfix.h"
#include "nvim/strings.h"
#include "nvim/tag.h"
#include "nvim/window.h"
#if defined(UNIX)
# include <sys/wait.h>
#endif

View File

@ -5,6 +5,7 @@
// sign.c: functions for managing with signs
//
#include "nvim/sign.h"
#include "nvim/ascii.h"
#include "nvim/buffer.h"
@ -17,9 +18,9 @@
#include "nvim/move.h"
#include "nvim/option.h"
#include "nvim/screen.h"
#include "nvim/sign.h"
#include "nvim/syntax.h"
#include "nvim/vim.h"
#include "nvim/window.h"
/// Struct to hold the sign properties.
typedef struct sign sign_T;