Add formatters and new things
This commit is contained in:
parent
1a3764a5d0
commit
146e51bae3
|
@ -0,0 +1,61 @@
|
||||||
|
---
|
||||||
|
Standard: Auto
|
||||||
|
Language: Cpp
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
ColumnLimit: 0
|
||||||
|
IndentWidth: 8
|
||||||
|
TabWidth: 8
|
||||||
|
UseTab: ForIndentation
|
||||||
|
|
||||||
|
AlignConsecutiveAssignments: true
|
||||||
|
AlignConsecutiveBitFields: true
|
||||||
|
AlignConsecutiveDeclarations: true
|
||||||
|
AlignConsecutiveMacros: true
|
||||||
|
AlignEscapedNewlines: Left
|
||||||
|
AlignOperands: AlignAfterOperator
|
||||||
|
AlignTrailingComments: true
|
||||||
|
|
||||||
|
AllowShortBlocksOnASingleLine: Always
|
||||||
|
AllowShortCaseLabelsOnASingleLine: true
|
||||||
|
AllowShortEnumsOnASingleLine: true
|
||||||
|
AllowShortFunctionsOnASingleLine: All
|
||||||
|
AllowShortIfStatementsOnASingleLine: Always
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: TopLevel
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: true
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
|
||||||
|
BreakBeforeBinaryOperators: All
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
|
||||||
|
BreakStringLiterals: false
|
||||||
|
BreakConstructorInitializers: AfterColon
|
||||||
|
|
||||||
|
IndentCaseLabels: true
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentGotoLabels: true
|
||||||
|
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
|
ContinuationIndentWidth: 2
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
IncludeBlocks: Regroup
|
||||||
|
InsertTrailingCommas: Wrapped
|
||||||
|
PointerAlignment: Right
|
||||||
|
ReflowComments: true
|
||||||
|
SortIncludes: true
|
||||||
|
SpaceAfterCStyleCast: true
|
||||||
|
SpaceAfterLogicalNot: false
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCpp11BracedList: true
|
||||||
|
SpaceBeforeParens: Always
|
||||||
|
SpacesInConditionalStatement: false
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInParentheses: false
|
||||||
|
|
||||||
|
...
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
Checks: 'performance-*,portability-*,readability-*,bugprone-*,concurrency-*,llvm-*,clang-analyzer-core.*,clang-analyzer-nullability.*,clang-analyzer-optin.portability.UnixAPI,clang-analyzer-security.*,clang-analyzer-unix.*,clang-analyzer-valist.*,clang-analyzer-apiModeling.*,cert-*-c,-readability-isolate-declaration,-readability-braces-around-statements,-readability-named-parameter'
|
||||||
|
WarningsAsErrors: ''
|
||||||
|
HeaderFilterRegex: ''
|
||||||
|
AnalyzeTemporaryDtors: false
|
||||||
|
FormatStyle: file
|
17
c/Makefile
17
c/Makefile
|
@ -1,18 +1,17 @@
|
||||||
|
.SUFFIXES:
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
OBJ = ${SRC:.c=.o}
|
OBJ := $(SRC:.c=.o)
|
||||||
|
|
||||||
all: ${OBJ} ${OUT}
|
|
||||||
|
|
||||||
|
all: $(OBJ) $(OUT)
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
${CC} -o $@ -c ${CFLAGS} $<
|
$(CC) -o $@ -c $(CFLAGS) $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ${OBJ} ${OUT}
|
rm -f $(OBJ) $(OUT)
|
||||||
|
|
||||||
ifneq (${OUT},)
|
ifneq ($(OUT),)
|
||||||
${OUT}: ${OBJ}
|
$(OUT): $(OBJ)
|
||||||
${CC} -o "$@" ${LDFLAGS} $^
|
$(CC) -o "$@" $(LDFLAGS) $^
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
30
c/config.mk
30
c/config.mk
|
@ -1,28 +1,28 @@
|
||||||
# Defaults
|
# Defaults
|
||||||
CC = clang
|
CC := clang
|
||||||
DEBUG = 1
|
DEBUG := 1
|
||||||
STATIC = 0
|
STATIC := 0
|
||||||
|
|
||||||
LDFLAGS =
|
LDFLAGS :=
|
||||||
CFLAGS =\
|
CFLAGS :=\
|
||||||
-std=c99\
|
-std=c99 \
|
||||||
-Weverything\
|
-Weverything \
|
||||||
-Wno-padded\
|
-Wno-padded \
|
||||||
-Wno-disabled-macro-expansion\
|
-Wno-disabled-macro-expansion \
|
||||||
-pedantic
|
-pedantic
|
||||||
|
|
||||||
# Sources / Results
|
# Sources / Results
|
||||||
SRC =\
|
SRC :=\
|
||||||
src/project/main.c
|
src/project/main.c
|
||||||
|
|
||||||
LIBDIR =
|
LIBDIR :=
|
||||||
LIB =\
|
LIB :=\
|
||||||
c
|
c
|
||||||
|
|
||||||
INCDIR =\
|
INCDIR :=\
|
||||||
src/project/
|
src/
|
||||||
|
|
||||||
OUT = project
|
OUT := project
|
||||||
|
|
||||||
# Conditionals / Appends
|
# Conditionals / Appends
|
||||||
LDFLAGS +=\
|
LDFLAGS +=\
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
---
|
||||||
|
Standard: Auto
|
||||||
|
Language: Cpp
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
ColumnLimit: 0
|
||||||
|
IndentWidth: 8
|
||||||
|
TabWidth: 8
|
||||||
|
UseTab: ForIndentation
|
||||||
|
|
||||||
|
AlignConsecutiveAssignments: true
|
||||||
|
AlignConsecutiveBitFields: true
|
||||||
|
AlignConsecutiveDeclarations: true
|
||||||
|
AlignConsecutiveMacros: true
|
||||||
|
AlignEscapedNewlines: Left
|
||||||
|
AlignOperands: AlignAfterOperator
|
||||||
|
AlignTrailingComments: true
|
||||||
|
|
||||||
|
AllowShortBlocksOnASingleLine: Always
|
||||||
|
AllowShortCaseLabelsOnASingleLine: true
|
||||||
|
AllowShortEnumsOnASingleLine: true
|
||||||
|
AllowShortFunctionsOnASingleLine: All
|
||||||
|
AllowShortIfStatementsOnASingleLine: Always
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: TopLevel
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: true
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
|
||||||
|
BreakBeforeBinaryOperators: All
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
|
||||||
|
BreakStringLiterals: false
|
||||||
|
BreakConstructorInitializers: AfterColon
|
||||||
|
|
||||||
|
IndentCaseLabels: true
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentGotoLabels: true
|
||||||
|
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
|
ContinuationIndentWidth: 2
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
IncludeBlocks: Regroup
|
||||||
|
InsertTrailingCommas: Wrapped
|
||||||
|
PointerAlignment: Right
|
||||||
|
ReflowComments: true
|
||||||
|
SortIncludes: true
|
||||||
|
SpaceAfterCStyleCast: true
|
||||||
|
SpaceAfterLogicalNot: false
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCpp11BracedList: true
|
||||||
|
SpaceBeforeParens: Always
|
||||||
|
SpacesInConditionalStatement: false
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInParentheses: false
|
||||||
|
|
||||||
|
...
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
Checks: 'performance-*,portability-*,readability-*,bugprone-*,concurrency-*,llvm-*,clang-analyzer-core.*,clang-analyzer-nullability.*,clang-analyzer-optin.portability.UnixAPI,clang-analyzer-security.*,clang-analyzer-unix.*,clang-analyzer-valist.*,clang-analyzer-apiModeling.*,cert-*-c,-readability-isolate-declaration,-readability-braces-around-statements,-readability-named-parameter'
|
||||||
|
WarningsAsErrors: ''
|
||||||
|
HeaderFilterRegex: ''
|
||||||
|
AnalyzeTemporaryDtors: false
|
||||||
|
FormatStyle: file
|
|
@ -5,9 +5,9 @@ STATIC = 0
|
||||||
|
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
CXXFLAGS =\
|
CXXFLAGS =\
|
||||||
-Weverything\
|
-Weverything \
|
||||||
-Wno-padded\
|
-Wno-padded \
|
||||||
-Wno-disabled-macro-expansion\
|
-Wno-disabled-macro-expansion \
|
||||||
-pedantic
|
-pedantic
|
||||||
|
|
||||||
# Sources / Results
|
# Sources / Results
|
||||||
|
|
Loading…
Reference in New Issue