mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-30 00:34:56 +00:00
Implemented professional documentation and code quality tools: **Docstrings (Doxygen-style):** - Comprehensive file-level documentation - Class and struct documentation with examples - Function documentation (params, returns, throws) - Member variable inline documentation - Example code blocks - Cross-references **Linting Configuration:** - .clang-tidy - Industry-standard static analysis - bugprone, cert, cppcoreguidelines checks - Google C++ Style Guide compliance - Modern C++ suggestions - Performance optimizations - .clang-format - Automatic code formatting - Based on Google style with customizations - 4-space indentation, 100-char line limit - Consistent pointer/reference alignment **Lint Script (lint.sh):** - Automated quality checks - clang-tidy static analysis - clang-format formatting verification - cppcheck additional analysis - Long function detection - TODO/FIXME tracking - --fix flag for auto-formatting **Documentation:** - README.Linting.md - Complete linting guide - Tool installation - Usage examples - Pre-commit hooks - IDE integration (VSCode, CLion) - Common issues and fixes - CI/CD integration **Standards:** - Naming conventions enforced - C++ Core Guidelines compliance - Secure coding (CERT guidelines) - Readability and maintainability - Performance best practices Production-grade code quality infrastructure. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
# clang-format configuration for DBAL C++ project
|
|
# Based on Google C++ Style Guide with minor modifications
|
|
|
|
# Base style
|
|
BasedOnStyle: Google
|
|
|
|
# Language
|
|
Language: Cpp
|
|
Standard: c++17
|
|
|
|
# Indentation
|
|
IndentWidth: 4
|
|
TabWidth: 4
|
|
UseTab: Never
|
|
NamespaceIndentation: None
|
|
|
|
# Line length
|
|
ColumnLimit: 100
|
|
|
|
# Braces
|
|
BreakBeforeBraces: Attach
|
|
|
|
# Pointers and references
|
|
DerivePointerAlignment: false
|
|
PointerAlignment: Left
|
|
|
|
# Include sorting
|
|
SortIncludes: CaseInsensitive
|
|
IncludeBlocks: Regroup
|
|
|
|
# Comments
|
|
ReflowComments: true
|
|
SpacesBeforeTrailingComments: 2
|
|
|
|
# Alignment
|
|
AlignConsecutiveAssignments: false
|
|
AlignConsecutiveDeclarations: false
|
|
AlignOperands: true
|
|
AlignTrailingComments: true
|
|
|
|
# Function parameters
|
|
AllowAllParametersOfDeclarationOnNextLine: true
|
|
BinPackParameters: false
|
|
|
|
# Penalties (for line breaking decisions)
|
|
PenaltyBreakBeforeFirstCallParameter: 19
|
|
PenaltyBreakComment: 300
|
|
PenaltyBreakFirstLessLess: 120
|
|
PenaltyBreakString: 1000
|
|
PenaltyExcessCharacter: 1000000
|
|
PenaltyReturnTypeOnItsOwnLine: 60
|
|
|
|
# Other
|
|
AllowShortFunctionsOnASingleLine: Inline
|
|
AllowShortIfStatementsOnASingleLine: Never
|
|
AllowShortLoopsOnASingleLine: false
|
|
AlwaysBreakAfterReturnType: None
|
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
|
ConstructorInitializerIndentWidth: 4
|
|
ContinuationIndentWidth: 4
|