Skip to content

Commit 4fb452d

Browse files
committed
chore: add config files
added .clang-format, .editorconfig and .gitignore entries
1 parent 05004bb commit 4fb452d

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed

.clang-format

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# .clang-format for LTFS (Linear Tape File System)
2+
# Derived from the LTFS C Language Coding Style Guide.
3+
#
4+
# NOTE: Several guide rules cannot be enforced by clang-format and must be
5+
# observed manually or via other tooling:
6+
# - Naming conventions (snake_case, capital enumerator entries, etc.)
7+
# - Positive logic naming for boolean parameters
8+
# - Doxygen comment content and placement
9+
# - sizeof(variable) preferred over sizeof(type)
10+
# - Include guard presence in headers
11+
# - File preamble / copyright block
12+
# - C++-style comments (//) restricted to logic comment-out only
13+
# - Magic editor lines (vim/emacs modelines)
14+
---
15+
Language: C
16+
ColumnLimit: 120
17+
IndentWidth: 2
18+
UseTab: Always
19+
TabWidth: 2
20+
ReflowComments: false
21+
BreakBeforeBraces: Custom
22+
BraceWrapping:
23+
AfterCaseLabel: false
24+
AfterClass: true
25+
AfterControlStatement: false
26+
AfterEnum: true
27+
AfterFunction: true
28+
AfterNamespace: true
29+
AfterStruct: true
30+
AfterUnion: true
31+
AfterExternBlock: true
32+
BeforeCatch: false
33+
BeforeElse: false
34+
BeforeLambdaBody: false
35+
BeforeWhile: false
36+
IndentBraces: false
37+
SplitEmptyFunction: false
38+
SplitEmptyRecord: false
39+
SplitEmptyNamespace: false
40+
AllowShortIfStatementsOnASingleLine: WithoutElse
41+
AllowShortLoopsOnASingleLine: false
42+
AllowShortBlocksOnASingleLine: Never
43+
AllowShortFunctionsOnASingleLine: None
44+
SpaceBeforeParens: ControlStatements
45+
SpaceInEmptyParentheses: false
46+
SpacesInParentheses: false
47+
SpacesInSquareBrackets: false
48+
SpaceAfterCStyleCast: false
49+
SpaceBeforeAssignmentOperators: true
50+
SpaceBeforeCpp11BracedList: false
51+
IndentCaseLabels: true
52+
IndentCaseBlocks: false
53+
AlwaysBreakAfterReturnType: None
54+
AlignAfterOpenBracket: Align
55+
BinPackParameters: false
56+
BinPackArguments: false
57+
PointerAlignment: Right
58+
ReferenceAlignment: Right
59+
IndentPPDirectives: AfterHash
60+
AlignConsecutiveAssignments:
61+
Enabled: false
62+
AlignConsecutiveDeclarations:
63+
Enabled: false
64+
AlignEscapedNewlines: Left
65+
AlignOperands: Align
66+
AlignTrailingComments:
67+
Kind: Always
68+
OverEmptyLines: 1
69+
CompactNamespaces: false
70+
IncludeBlocks: Preserve
71+
SortIncludes: CaseSensitive
72+
MaxEmptyLinesToKeep: 1
73+
KeepEmptyLinesAtTheStartOfBlocks: false
74+
SpacesBeforeTrailingComments: 2
75+
Cpp11BracedListStyle: false
76+
InsertTrailingCommas: None

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[{Makefile,*.mk,*.am}]
11+
indent_style = tab
12+
indent_size = 4

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build-aux/
66
m4/
77
config.h.in
88
configure
9+
910
# Files generated by ./configure
1011
config.h
1112
config.log
@@ -15,6 +16,7 @@ stamp-h1
1516
.deps/
1617
Makefile
1718
ltfs.pc
19+
1820
# Files generated by make
1921
*.o
2022
*.a
@@ -23,12 +25,22 @@ ltfs.pc
2325
.libs/
2426
messages/.lib
2527
.dirstamp
28+
2629
# Files created by OS
2730
.DS_Store
31+
2832
# Files for development
2933
GPATH
3034
GRTAGS
3135
GTAGS
3236
TAGS
3337
tags
3438
*~
39+
40+
# Files generated by user IDE/text editor
41+
.cache
42+
.zed
43+
.vscode
44+
.claude
45+
.idea
46+
compile_commands.json

0 commit comments

Comments
 (0)