Skip to content
Snippets Groups Projects
Commit af9131c4 authored by Marcel Huber's avatar Marcel Huber
Browse files

added tox targets for reformatting and code cleanup

Change-Id: Id656633070e3c4e1f80333c82ab6a4dcfbfce198
parent b395bde7
No related branches found
No related tags found
No related merge requests found
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
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
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 128
CommentPragmas: '^( IWYU pragma:|\\.+|/[^/].+)'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
#DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 4
# SortPriority: 0
- Regex: '^<.*\.h>'
Priority: 3
# SortPriority: 0
- Regex: '^<.*'
Priority: 2
# SortPriority: 0
- Regex: '.*'
Priority: 1
# SortPriority: 0
IncludeIsMainRegex: '([-_](test|unittest)i|Test)?$'
#IncludeIsMainSourceRegex: ''
IndentCaseLabels: true
#IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Right
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
BasedOnStyle: google
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
CanonicalDelimiter: ''
BasedOnStyle: google
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
#SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
#SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
#SpaceBeforeSquareBrackets: false
Standard: Cpp03
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
#UseCRLF: false
UseTab: Always
...
from setuptools import setup
setup(
name='dummy_for_tox',
)
tox.ini 0 → 100644
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = reformat,tidy,tidyprojects
skip_missing_interpreters = True
pip_pre=False
skip_install = True
skipsdists = True
[testenv]
install_command =
pip install --index https://pypi.org/simple \
--extra-index-url https://devpi.coast-project.org/coast/CoastSconsider/+simple \
--disable-pip-version-check {opts} {packages}
[testenv:reformat]
basepython =
python2.7
deps =
yapf
docformatter
clang-format==9.0.0
whitelist_externals =
find
bash
grep
git
commands =
- bash -c \
"for n in $(find cgCore coastGuard '(' -name '*.sconsider' -o -name '*.py' ')'); do \
yapf --in-place $n || echo reformat failed at $n; \
docformatter --in-place $n; \
done;"
- bash -c "clang-format --verbose -i $(git ls-files -- '*.h' '*.hpp' '*.cpp');"
[testenv:tidy]
basepython =
python2.7
whitelist_externals =
bash
clang-tidy
git
commands =
- bash -c \
"clang-tidy --fix --fix-errors --quiet $(git ls-files -- '*.h' '*.hpp' '*.cpp');"
[testenv:tidyprojects]
basepython =
python2.7
whitelist_externals =
bash
clang-tidy
sed
commands =
- bash -c "ls -l; clang-tidy --fix --fix-errors --quiet $(sed -rn 's|^.*file.:\s+.(.*).$|\1| p' compile_commands.json );"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment