Skip to content

Commit

Permalink
Modified some source control files
Browse files Browse the repository at this point in the history
  • Loading branch information
AKuHAK committed Jun 15, 2021
1 parent b2d8f5b commit bf188db
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 161 deletions.
71 changes: 54 additions & 17 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,70 @@ Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing : Both
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
IndentBraces: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: '^ (IWYU pragma:|NOLINT)'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineBeforeAccessModifier: LogicalBlock
FixNamespaceComments: true
ForEachMacros: []
IncludeBlocks: Preserve
IndentExternBlock: NoIndent
IndentCaseBlocks: false
IndentCaseLabels: true
IndentGotoLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
Expand All @@ -55,21 +77,36 @@ NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 80
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 80
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 80
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
# uncomment below when clang >13 will be out
# IndentPPDirectives: AfterHash
# PPIndentWidth: 1
ReflowComments: true
SortIncludes: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Expand Down
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# EditorConfig: http://EditorConfig.org

# Top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# 4 space indentation
[*.{c,h,js,css,html}]
indent_style = space
indent_size = 4

# 2 space indentation
[*.{json,xml,yaml,yml}]
indent_style = space
indent_size = 2

# Tab indentation
[Makefile*]
indent_style = tab
9 changes: 3 additions & 6 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ on:
jobs:
check-format:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- name: Install dependencies
shell: bash
run: |
apk add git make clang
sudo apt-get install git make clang-format
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow

- name: Check format -> make format-check
run: |
make format-check
run: make format-check
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#
# Normal rules
#
.*
*.a
*.diff
*.elf
Expand All @@ -23,9 +24,14 @@
DETAILED_CHANGELOG

#
# git files that we don't want to ignore even it they are dot-files
# files that we don't want to ignore
#
!.gitignore
!.gitattributes
!.github
!.editorconfig
!.clang-format
!modules/debug/*.irx

#
# Generated source files
Expand Down
135 changes: 0 additions & 135 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,10 @@ pc_tools_win32:
$(MAKE) _WIN32=1 -C pc

format:
find . -type f -not -path \*modules/network/SMSTCPIP\* -a \( -iname \*.h -o -iname \*.c \) | xargs clang-format -i
find . -type f -a \( -iname \*.h -o -iname \*.c \) | xargs clang-format -i

format-check:
@! find . -type f -not -path \*modules/network/SMSTCPIP\* -a \( -iname \*.h -o -iname \*.c \) | xargs clang-format -style=file -output-replacements-xml | grep "<replacement " >/dev/null
@! find . -type f -a \( -iname \*.h -o -iname \*.c \) | xargs clang-format -style=file -output-replacements-xml | grep "<replacement " >/dev/null

$(EE_ASM_DIR):
@mkdir -p $@
Expand Down

0 comments on commit bf188db

Please sign in to comment.