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
|
||||
|
||||
OBJ = ${SRC:.c=.o}
|
||||
|
||||
all: ${OBJ} ${OUT}
|
||||
OBJ := $(SRC:.c=.o)
|
||||
|
||||
all: $(OBJ) $(OUT)
|
||||
%.o: %.c
|
||||
${CC} -o $@ -c ${CFLAGS} $<
|
||||
|
||||
$(CC) -o $@ -c $(CFLAGS) $<
|
||||
clean:
|
||||
rm -f ${OBJ} ${OUT}
|
||||
rm -f $(OBJ) $(OUT)
|
||||
|
||||
ifneq (${OUT},)
|
||||
${OUT}: ${OBJ}
|
||||
${CC} -o "$@" ${LDFLAGS} $^
|
||||
ifneq ($(OUT),)
|
||||
$(OUT): $(OBJ)
|
||||
$(CC) -o "$@" $(LDFLAGS) $^
|
||||
endif
|
||||
|
||||
.PHONY: all clean
|
||||
|
|
30
c/config.mk
30
c/config.mk
|
@ -1,28 +1,28 @@
|
|||
# Defaults
|
||||
CC = clang
|
||||
DEBUG = 1
|
||||
STATIC = 0
|
||||
CC := clang
|
||||
DEBUG := 1
|
||||
STATIC := 0
|
||||
|
||||
LDFLAGS =
|
||||
CFLAGS =\
|
||||
-std=c99\
|
||||
-Weverything\
|
||||
-Wno-padded\
|
||||
-Wno-disabled-macro-expansion\
|
||||
LDFLAGS :=
|
||||
CFLAGS :=\
|
||||
-std=c99 \
|
||||
-Weverything \
|
||||
-Wno-padded \
|
||||
-Wno-disabled-macro-expansion \
|
||||
-pedantic
|
||||
|
||||
# Sources / Results
|
||||
SRC =\
|
||||
SRC :=\
|
||||
src/project/main.c
|
||||
|
||||
LIBDIR =
|
||||
LIB =\
|
||||
LIBDIR :=
|
||||
LIB :=\
|
||||
c
|
||||
|
||||
INCDIR =\
|
||||
src/project/
|
||||
INCDIR :=\
|
||||
src/
|
||||
|
||||
OUT = project
|
||||
OUT := project
|
||||
|
||||
# Conditionals / Appends
|
||||
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 =
|
||||
CXXFLAGS =\
|
||||
-Weverything\
|
||||
-Wno-padded\
|
||||
-Wno-disabled-macro-expansion\
|
||||
-Weverything \
|
||||
-Wno-padded \
|
||||
-Wno-disabled-macro-expansion \
|
||||
-pedantic
|
||||
|
||||
# Sources / Results
|
||||
|
|
Loading…
Reference in New Issue