Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #109 from m4gr3d/cleanup_project_indentation
Browse files Browse the repository at this point in the history
Cleanup project indentation and formatting
  • Loading branch information
Fredia Huya-Kouadio authored Sep 24, 2020
2 parents 1ebb548 + 62fda21 commit 03a561f
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 364 deletions.
118 changes: 21 additions & 97 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,126 +1,50 @@
# Commented out parameters are those with the same value as base LLVM style
# We can uncomment them if we want to change their value, or enforce the
# chosen value in case the base style changes (last sync: Clang 6.0.1).
# Clang format 8 - https://releases.llvm.org/8.0.1/tools/clang/docs/ClangFormatStyleOptions.html
---
### General config, applies to all languages ###
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
# AlignConsecutiveAssignments: false
# AlignConsecutiveDeclarations: false
# AlignEscapedNewlines: Right
# AlignOperands: true
AlignAfterOpenBracket: Align
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
# AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
# AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakAfterReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# AlwaysBreakTemplateDeclarations: false
# BinPackArguments: true
# BinPackParameters: true
# BraceWrapping:
# AfterClass: false
# AfterControlStatement: false
# AfterEnum: false
# AfterFunction: false
# AfterNamespace: false
# AfterObjCDeclaration: false
# AfterStruct: false
# AfterUnion: false
# AfterExternBlock: false
# BeforeCatch: false
# BeforeElse: false
# IndentBraces: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakBeforeBinaryOperators: None
# BreakBeforeBraces: Attach
# BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: false
# BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
# BreakStringLiterals: true
ColumnLimit: 0
# CommentPragmas: '^ IWYU pragma:'
# CompactNamespaces: false
ColumnLimit: 100
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
# DerivePointerAlignment: false
# DisableFormat: false
# ExperimentalAutoDetectBinPacking: false
# FixNamespaceComments: true
# ForEachMacros:
# - foreach
# - Q_FOREACH
# - BOOST_FOREACH
# IncludeBlocks: Preserve
DisableFormat: false
FixNamespaceComments: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '".*"'
Priority: 1
- Regex: '^<.*\.h>'
Priority: 2
- Regex: '^<.*'
Priority: 3
# IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
# IndentPPDirectives: None
IndentWidth: 4
# IndentWrappedFunctionNames: false
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
# KeepEmptyLinesAtTheStartOfBlocks: true
# MacroBlockBegin: ''
# MacroBlockEnd: ''
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# PenaltyBreakAssignment: 2
# PenaltyBreakBeforeFirstCallParameter: 19
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakString: 1000
# PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 60
# PointerAlignment: Right
# RawStringFormats:
# - Delimiter: pb
# Language: TextProto
# BasedOnStyle: google
# ReflowComments: true
# SortIncludes: true
# SortUsingDeclarations: true
# SpaceAfterCStyleCast: false
# SpaceAfterTemplateKeyword: true
# SpaceBeforeAssignmentOperators: true
# SpaceBeforeParens: ControlStatements
# SpaceInEmptyParentheses: false
# SpacesBeforeTrailingComments: 1
# SpacesInAngles: false
# SpacesInContainerLiterals: true
# SpacesInCStyleCastParentheses: false
# SpacesInParentheses: false
# SpacesInSquareBrackets: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PointerAlignment: Right
SortIncludes: true
SortUsingDeclarations: true
TabWidth: 4
UseTab: Always
UseTab: Never
---
### C++ specific config ###
Language: Cpp
Standard: Cpp03
---
### ObjC specific config ###
Language: ObjC
ObjCBlockIndentWidth: 4
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
Standard: Auto
AccessModifierOffset: -4
AllowShortFunctionsOnASingleLine: Inline
---
### Java specific config ###
Language: Java
# BreakAfterJavaFieldAnnotations: false
AllowShortFunctionsOnASingleLine: None
JavaImportGroups: ['org.godotengine', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax']
...
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 100
trim_trailing_whitespace = true

[*.{cpp,hpp,c,h,mm}]
indent_size = 4
ij_c_indent_namespace_members = 4
ij_c_indent_namespace_members = 0

[{*.gradle,AndroidManifest.xml}]
indent_size = 4
[*.gd]
indent_style = tab
44 changes: 44 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
language: cpp

# OS config, depends on actual 'os' in build matrix
dist: xenial

stages:
- check
# - build

matrix:
include:
- name: "Clang-format"
stage: check
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-format-8
script:
- sh ./travis/clang-format.sh
# - name: "Build windows"
# stage: build
# os: windows
# install:
# # we need to add python3 in for scons
# - choco install python
# # add our scripts folder to our path
# - export PATH=/c/users/travis/appdata/roaming/python/python38/Scripts/:/C/Python38/Scripts:$PATH
# # make sure we have the latest version of pip
# - py -m pip install --upgrade pip
# # scons we need
# - py -m pip install scons
# # just so we can verify they were installed
# - py -m pip list -v
# # and check if scons is up and running
# - scons --version
# script:
# # first compile godot-cpp
# - cd godot-cpp
# - scons platform=windows target=release bits=64 generate_bindings=yes
# - cd ..
# # now compile our plugin
# - scons platform=windows target=release
2 changes: 2 additions & 0 deletions demo/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DisableFormat: true
SortIncludes: false
18 changes: 0 additions & 18 deletions hooks/README.md

This file was deleted.

48 changes: 0 additions & 48 deletions hooks/canonicalize_filename.sh

This file was deleted.

50 changes: 0 additions & 50 deletions hooks/pre-commit

This file was deleted.

Loading

0 comments on commit 03a561f

Please sign in to comment.