-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9320eb
commit 7306ca4
Showing
5 changed files
with
572 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#for no cmake installed. | ||
|
||
RED=$(tput setaf 1) | ||
GREEN=$(tput setaf 2) | ||
NCOLOR=$(tput sgr0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
Language: Cpp | ||
# BasedOnStyle: LLVM | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveDeclarations: false | ||
AlignEscapedNewlines: DontAlign | ||
AlignOperands: true | ||
AlignTrailingComments: false | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortBlocksOnASingleLine: true | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortFunctionsOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: true | ||
AllowShortLoopsOnASingleLine: true | ||
AlwaysBreakAfterDefinitionReturnType: None | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: true | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BraceWrapping: | ||
AfterClass: true | ||
AfterControlStatement: true | ||
AfterEnum: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterObjCDeclaration: true | ||
AfterStruct: true | ||
AfterUnion: true | ||
AfterExternBlock: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
IndentBraces: true | ||
SplitEmptyFunction: true | ||
SplitEmptyRecord: true | ||
SplitEmptyNamespace: true | ||
BreakBeforeBinaryOperators: All | ||
BreakBeforeBraces: Attach | ||
BreakBeforeInheritanceComma: true | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: true | ||
BreakConstructorInitializers: BeforeComma | ||
BreakAfterJavaFieldAnnotations: false | ||
BreakStringLiterals: true | ||
ColumnLimit: 120 | ||
CommentPragmas: '^ IWYU pragma:' | ||
CompactNamespaces: false | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 4 | ||
Cpp11BracedListStyle: true | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
ExperimentalAutoDetectBinPacking: false | ||
FixNamespaceComments: true | ||
ForEachMacros: | ||
- Q_FOREACH | ||
- BOOST_FOREACH | ||
|
||
# Include grouping/sorting | ||
SortIncludes: false | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
- Regex: '"V3Pch.*\.h"' | ||
Priority: -2 # Precompiled headers | ||
- Regex: '"(config_build|verilated_config|verilatedos)\.h"' | ||
Priority: -1 # Sepecials before main header | ||
- Regex: '(<|")verilated.*' | ||
Priority: 1 # Runtime headers | ||
- Regex: '"V3.*__gen.*\.h"' | ||
Priority: 3 # Generated internal headers separately | ||
- Regex: '"V3.*"' | ||
Priority: 2 # Internal header | ||
- Regex: '".*"' | ||
Priority: 4 # Other non-system headers | ||
- Regex: '<[[:alnum:]_.]+>' | ||
Priority: 5 # Simple system headers next | ||
- Regex: '<.*>' | ||
Priority: 6 # Other system headers next | ||
IncludeIsMainRegex: '$' | ||
|
||
IndentCaseLabels: false | ||
IndentPPDirectives: None | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
JavaScriptQuotes: Leave | ||
JavaScriptWrapImports: true | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
MacroBlockBegin: '' | ||
MacroBlockEnd: '' | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
ObjCBlockIndentWidth: 4 | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: true | ||
PenaltyBreakAssignment: 4 | ||
PenaltyBreakBeforeFirstCallParameter: 19 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakString: 1000 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 60 | ||
PointerAlignment: Right | ||
ReflowComments: true | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterTemplateKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 4 | ||
SpacesInAngles: false | ||
SpacesInContainerLiterals: true | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInLineCommentPrefix: | ||
Minimum: 0 | ||
Maximum: -1 | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Standard: Cpp11 | ||
TabWidth: 8 | ||
UseTab: Never | ||
BitFieldColonSpacing: None | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
|
||
REPO_DIR=$(cd "$(dirname $0)";pwd)/.. | ||
CURR_DIR=${REPO_DIR} | ||
LIB_DIR=${REPO_DIR} | ||
TESTS_DIR=${REPO_DIR}/tests | ||
|
||
clang-format --version | ||
if [ $# -lt 1 ]; then | ||
# just print the list of files | ||
echo "Lint test: C++ Lint (clang-format) check for check start" | ||
python3 "${CURR_DIR}"/ci/run_clang_format.py --clang-format-executable clang-format -r "${LIB_DIR}" --exclude "${REPO_DIR}/build" | ||
python3 "${CURR_DIR}"/ci/run_clang_format.py --clang-format-executable clang-format -r "${TESTS_DIR}" --exclude "${REPO_DIR}/build" | ||
echo "Lint test: C++ Lint (clang-format) check for check passed" | ||
elif [ $1 == "fix" ]; then | ||
# format file instead of printing differences | ||
echo "Lint test: C++ Lint check for (clang-format) auto fix start" | ||
python3 "${CURR_DIR}"/ci/run_clang_format.py --clang-format-executable clang-format -r -i "${LIB_DIR}" --exclude "${REPO_DIR}/build" | ||
python3 "${CURR_DIR}"/ci/run_clang_format.py --clang-format-executable clang-format -r -i "${TESTS_DIR}" --exclude "${REPO_DIR}/build" | ||
echo "Lint test: C++ Lint check for (clang-format) auto fix passed" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
|
||
REPO_DIR=$(cd "$(dirname $0)";pwd)/.. | ||
CURR_DIR=${REPO_DIR}/tests | ||
|
||
pushd ${REPO_DIR} | ||
|
||
echo "******* Unit Tests Start *******" | ||
echo "******* All Unit Tests Passed *******" | ||
|
||
popd |
Oops, something went wrong.