dte test coverage


Directory: ./
File: src/editorconfig/editorconfig.h
Date: 2024-12-21 16:03:22
Exec Total Coverage
Lines: 2 2 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 #ifndef EDITORCONFIG_EDITORCONFIG_H
2 #define EDITORCONFIG_EDITORCONFIG_H
3
4 #include <stdbool.h>
5 #include "util/macros.h"
6
7 typedef enum {
8 INDENT_STYLE_UNSPECIFIED,
9 INDENT_STYLE_TAB,
10 INDENT_STYLE_SPACE,
11 } EditorConfigIndentStyle;
12
13 typedef struct {
14 unsigned int indent_size;
15 unsigned int tab_width;
16 unsigned int max_line_length;
17 EditorConfigIndentStyle indent_style;
18 bool indent_size_is_tab;
19 } EditorConfigOptions;
20
21 5 static inline EditorConfigOptions editorconfig_options_init(void)
22 {
23 5 return (EditorConfigOptions){.indent_style = INDENT_STYLE_UNSPECIFIED};
24 }
25
26 NONNULL_ARG(1) WARN_UNUSED_RESULT
27 int get_editorconfig_options(const char *pathname, EditorConfigOptions *opts);
28
29 #endif
30