Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
#BreakStringLiterals
ColumnLimit: 80
CommentPragmas: ''
CommentPragmas: ""
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
Expand Down
32 changes: 20 additions & 12 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,37 @@
Checks: >
*,
-altera*,
-boost*,
-fuchsia*,
-llvmlibc*,
-llvm-header-guard,
-llvm-prefer-static-over-anonymous-namespace,
-google-readability-todo,
-misc-no-recursion,
-misc-include-cleaner,
-misc-const-correctness,
-modernize-use-trailing-return-type,
-portability-avoid-pragma-once,
-readability-use-anyofallof,
-readability-redundant-access-specifiers,
-readability-convert-member-functions-to-static,
-cppcoreguidelines-avoid-const-or-ref-data-members
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-pro-bounds-constant-array-index

CheckOptions:
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: '1'
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: "1"
- key: readability-identifier-length.MinimumLoopCounterNameLength
value: 1
- key: readability-identifier-length.IgnoredVariableNames
value: '^[defijkptuvw]$'
value: "^[_defijkptuvwxyz]$"
# More options here: https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ClassCase
value: CamelCase
value: CamelCase
- key: readability-identifier-naming.StructCase
value: CamelCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.VariableCase
Expand All @@ -51,14 +59,14 @@ CheckOptions:
- key: readability-identifier-naming.GlobalFunctionCase
value: lower_case
- key: readability-identifier-naming.MemberConstantCase
value: CamelCase
value: CamelCase
- key: readability-identifier-naming.StaticConstantCase
value: lower_case
value: lower_case
- key: readability-function-cognitive-complexity.Threshold
value: 10
- key: readability-function-cognitive-complexity.IgnoreMacros
value: true
- key: readability-function-size.ParameterThreshold
value: 4
- key: misc-include-cleaner.IgnoreHeaders
value: utility;cstddef;geode/.*_export\.h;geode/.*/common\.h;geode/basic/types\.h;geode/basic/assert\.h;


- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
value: true
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@
class SolidMeshEdgeManifold< dimension >::Impl
{
public:
Impl( const SolidMesh< dimension >& mesh )

Check warning on line 89 in src/geode/inspector/criterion/manifold/solid_edge_manifold.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/criterion/manifold/solid_edge_manifold.cpp:89:9 [google-explicit-constructor]

single-argument constructors must be marked explicit to avoid unintentional implicit conversions
: mesh_( mesh ),
polyhedra_around_edges_( edges_to_polyhedra_around( mesh ) )
{
}

bool mesh_edges_are_manifold() const

Check warning on line 95 in src/geode/inspector/criterion/manifold/solid_edge_manifold.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/criterion/manifold/solid_edge_manifold.cpp:95:9 [modernize-use-nodiscard]

function 'mesh_edges_are_manifold' should be marked [[nodiscard]]
{
absl::flat_hash_set< Edge > checked_edges;
for( const auto polyhedron_id : Range{ mesh_.nb_polyhedra() } )
Expand All @@ -107,9 +107,7 @@
}
const auto polyhedra_around = mesh_.polyhedra_around_edge(
polyhedron_edge_vertices, polyhedron_id );
if( !polyhedra_around_edge_are_the_same(
mesh_.polyhedra_around_edge(
polyhedron_edge_vertices, polyhedron_id ),
if( !polyhedra_around_edge_are_the_same( polyhedra_around,
polyhedra_around_edges_.at( polyhedron_edge ) ) )
{
return false;
Expand All @@ -119,7 +117,7 @@
return true;
}

InspectionIssues< std::array< index_t, 2 > > non_manifold_edges() const

Check warning on line 120 in src/geode/inspector/criterion/manifold/solid_edge_manifold.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/criterion/manifold/solid_edge_manifold.cpp:120:54 [readability-function-cognitive-complexity]

function 'non_manifold_edges' has cognitive complexity of 12 (threshold 10)

Check warning on line 120 in src/geode/inspector/criterion/manifold/solid_edge_manifold.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/criterion/manifold/solid_edge_manifold.cpp:120:9 [modernize-use-nodiscard]

function 'non_manifold_edges' should be marked [[nodiscard]]
{
InspectionIssues< std::array< index_t, 2 > > non_manifold_edges{
"Non manifold edges"
Expand Down
Loading