Skip to content

fix(BlockTopology): Fixed call to checks on block surface boundaries#182

Open
MelchiorSchuh wants to merge 5 commits into
nextfrom
fix/checks_on_block_boundaries-not_called
Open

fix(BlockTopology): Fixed call to checks on block surface boundaries#182
MelchiorSchuh wants to merge 5 commits into
nextfrom
fix/checks_on_block_boundaries-not_called

Conversation

@MelchiorSchuh

Copy link
Copy Markdown
Member

No description provided.

@MelchiorSchuh MelchiorSchuh requested a review from BotellaA June 17, 2026 13:36
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 52 concern(s)
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:116:10: warning: [readability-function-cognitive-complexity]

    function 'create_graph' has cognitive complexity of 16 (threshold 10)

      116 |     void create_graph( const geode::BRep& brep,
          |          ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:124:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      124 |         for( const auto& line : brep.lines() )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:129:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      129 |         for( const auto& line : brep.lines() )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:133:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      133 |             for( const auto& incident_surface : brep.incidences( line ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:135:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      135 |                 for( const auto& boundary_line :
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:141:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      141 |                     if( const auto existing_edge = graph.edge_from_vertices(
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:144:25: note: +5, including nesting penalty of 4, nesting level increased to 5
      144 |                         if( surface_uuids_to_graph_edges
          |                         ^
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:116:10: warning: [readability-function-size]

    function 'create_graph' exceeds recommended size/complexity thresholds

      116 |     void create_graph( const geode::BRep& brep,
          |          ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:116:10: note: 5 parameters (threshold 4)
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:160:32: warning: [readability-function-cognitive-complexity]

    function 'find_not_boundary_surfaces' has cognitive complexity of 33 (threshold 10)

      160 |     std::vector< geode::uuid > find_not_boundary_surfaces(
          |                                ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:173:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      173 |         while( found_not_boundary_surface )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:176:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      176 |             for( const auto graph_vertex :
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:179:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      179 |                 if( graph->edges_around_vertex( graph_vertex ).empty() )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:190:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      190 |                 for( const auto& edge_around :
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:193:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      193 |                     if( surface_uuids_to_graph_edges
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:202:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      202 |                 if( !should_delete )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:206:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      206 |                 if( absl::c_contains( not_boundaries_surfaces, surface_id ) )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:210:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      210 |                 for( const auto& edge :
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:217:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      217 |             if( !absl::c_contains( to_delete, true ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:225:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      225 |             for( const auto& [surface_id, graph_edges] :
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:228:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      228 |                 for( const auto graph_edge : graph_edges )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:230:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      230 |                     if( old2new.at( graph_edge ) != geode::NO_ID )
          |                     ^
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:385:53: warning: [readability-function-cognitive-complexity]

    function 'string' has cognitive complexity of 11 (threshold 10)

      385 |     std::string BRepBlocksTopologyInspectionResult::string() const
          |                                                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:388:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      388 |         if( some_blocks_not_meshed.nb_issues() != 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:392:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      392 |         if( wrong_block_boundary_surface.nb_issues() != 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:396:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      396 |         if( blocks_not_linked_to_a_unique_vertex.nb_issues() != 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:401:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      401 |         if( blocks_with_not_closed_boundary_surfaces.nb_issues() != 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:406:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      406 |         if( model_boundaries_dont_form_a_closed_surface.nb_issues() != 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:411:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      411 |         if( unique_vertices_part_of_two_blocks_and_no_boundary_surface
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:420:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      420 |         if( unique_vertices_with_incorrect_block_cmvs_count.nb_issues() != 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:426:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      426 |         if( unique_vertices_linked_to_surface_with_wrong_relationship_to_blocks
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:435:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      435 |         if( unique_vertices_linked_to_a_single_and_invalid_surface.nb_issues()
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:442:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      442 |         if( unique_vertex_linked_to_multiple_invalid_surfaces.nb_issues() != 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:448:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      448 |         if( !message.empty() )
          |         ^
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:488:9: warning: [readability-function-cognitive-complexity]

    function 'unique_vertex_is_part_of_two_blocks_and_no_boundary_surface' has cognitive complexity of 20 (threshold 10)

      488 |         unique_vertex_is_part_of_two_blocks_and_no_boundary_surface(
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:493:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      493 |         if( block_uuids.size() != 2 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:497:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      497 |         for( const auto& block_uuid : block_uuids )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:499:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      499 |             if( !brep_.block( block_uuid ).is_active() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:504:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      504 |         for( const auto& surface_cmv :
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:507:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      507 |             if( surface_cmv.component_id.type()
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:512:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      512 |             if( brep_.Relationships::is_boundary(
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:514:17: note: +1
      514 |                 && brep_.Relationships::is_boundary(
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:519:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      519 |             for( const auto& line_cmv :
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:522:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      522 |                 if( line_cmv.component_id.type()
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:527:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      527 |                 if( brep_.Relationships::is_boundary(
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:530:21: note: +1
      530 |                     && ( brep_.Relationships::is_boundary(
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:532:26: note: +1
      532 |                          || brep_.Relationships::is_boundary(
          |                          ^
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:569:9: warning: [readability-function-cognitive-complexity]

    function 'vertex_is_part_of_surface_with_wrong_relationships_to_block' has cognitive complexity of 13 (threshold 10)

      569 |         vertex_is_part_of_surface_with_wrong_relationships_to_block(
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:574:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      574 |         for( const auto& cmv :
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:577:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      577 |             if( cmv.component_id.type() != Surface3D::component_type_static()
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:578:17: note: +1
      578 |                 || !brep_.surface( cmv.component_id.id() ).is_active() )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:582:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      582 |             if( brep_.nb_incidences( cmv.component_id.id() ) >= 1
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:583:17: note: +1
      583 |                 && absl::c_contains(
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:594:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      594 |             if( brep_.nb_embeddings( cmv.component_id.id() ) >= 1
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:598:17: note: +1
      598 |                 && absl::c_contains( dangling_surface, cmv.component_id.id() ) )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:608:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      608 |             if( brep_.nb_incidences( cmv.component_id.id() ) < 1
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:610:17: note: +1
      610 |                 && !absl::c_contains(
          |                 ^
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:627:29: warning: [readability-function-cognitive-complexity]

    function 'vertex_is_part_of_invalid_single_surface' has cognitive complexity of 17 (threshold 10)

      627 |         BRepBlocksTopology::vertex_is_part_of_invalid_single_surface(
          |                             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:633:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      633 |         if( surface_uuids.size() != 1
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:634:13: note: +1
      634 |             || !brep_.surface( surface_uuids[0] ).is_active() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:641:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      641 |         if( absl::c_contains( not_boundary_surfaces, surface_id ) )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:645:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      645 |         if( block_uuids.size() > 2 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:651:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      651 |         if( brep_.nb_embeddings( surface_id ) > 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:653:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      653 |             if( internal::brep_blocks_are_meshed( brep_ ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:655:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      655 |                 if( block_uuids.size() != 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:661:22: note: +1, nesting level increased to 3
      661 |                 else if( !brep_.Relationships::is_internal(
          |                      ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:671:9: note: +1, nesting level increased to 1
      671 |         else
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:673:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      673 |             for( const auto& block_id : block_uuids )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:675:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      675 |                 if( !brep_.Relationships::is_boundary( surface_id, block_id ) )
          |                 ^
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:661:17: warning: [llvm-else-after-return]

    do not use 'else' after 'return'

      661 |                 else if( !brep_.Relationships::is_internal(
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      662 |                              surface_id, block_uuids[0] ) )
          |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      663 |                 {
          |                 ~
      664 |                     return absl::StrCat( "unique vertex ", unique_vertex_index,
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      665 |                         " is part of only one Surface, which is "
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      666 |                         "embedded, and one Block, but the Surface is "
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      667 |                         "not internal to the Block." );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      668 |                 }
          |                 ~
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:696:29: warning: [readability-function-cognitive-complexity]

    function 'vertex_is_part_of_invalid_multiple_surfaces' has cognitive complexity of 17 (threshold 10)

      696 |         BRepBlocksTopology::vertex_is_part_of_invalid_multiple_surfaces(
          |                             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:701:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      701 |         if( line_uuids.size() < 2 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:707:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      707 |         if( surface_uuids.size() < 2 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:712:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      712 |         for( const auto& surface_uuid : surface_uuids )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:714:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      714 |             if( brep_.nb_incidences( surface_uuid ) < 1
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:715:17: note: +1
      715 |                 && brep_.nb_embeddings( surface_uuid ) < 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:721:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      721 |         if( not_dangling_surfaces.size() < 2 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:725:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      725 |         for( const auto& line_id : line_uuids )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:728:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      728 |             for( const auto& surface_id : not_dangling_surfaces )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:730:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      730 |                 if( !brep_.Relationships::is_internal( line_id, surface_id )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:731:21: note: +1
      731 |                     && !brep_.Relationships::is_boundary(
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:738:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      738 |             if( brep_.nb_embeddings( line_id ) < 1
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:741:17: note: +1
      741 |                 && line_has_relations_with_all_surfaces )
          |                 ^
  • src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:759:29: warning: [readability-function-cognitive-complexity]

    function 'inspect_blocks' has cognitive complexity of 36 (threshold 10)

      759 |         BRepBlocksTopology::inspect_blocks() const
          |                             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:762:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      762 |         if( brep_.nb_active_blocks() == 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:771:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      771 |         for( const auto& block : brep_.active_blocks() )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:773:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      773 |             if( !block_is_meshed( brep_.block( block.id() ) ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:780:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      780 |         if( !blocks_not_meshed.empty() && !meshed_blocks.empty() )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:780:40: note: +1
      780 |         if( !blocks_not_meshed.empty() && !meshed_blocks.empty() )
          |                                        ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:782:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      782 |             for( const auto& block_id : blocks_not_meshed )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:792:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      792 |         for( const auto& meshed_block_id : meshed_blocks )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:798:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      798 |             if( block_result.nb_issues() != 0 )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:809:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      809 |         if( brep_.nb_model_boundaries() != 0 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:811:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      811 |             if( !brep_boundaries_are_closed( brep_ ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:817:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      817 |         for( const auto unique_vertex_id : Range{ brep_.nb_unique_vertices() } )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:819:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      819 |             if( const auto problem_message =
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:827:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      827 |             if( const auto problem_message =
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:834:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      834 |             if( const auto problem_message =
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:841:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      841 |             if( const auto problem_message =
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:850:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      850 |             if( const auto problem_message =
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:858:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      858 |         for( const auto& block : brep_.active_blocks() )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:860:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      860 |             if( !block_boundaries_are_closed( brep_, block ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:870:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      870 |             for( const auto& surface : brep_.boundaries( block ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:872:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      872 |                 if( !surface.is_active() )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp:876:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      876 |                 if( surface_boundaries_are_not_linked_to_another_block_boundary(
          |                 ^
  • src/geode/inspector/inspection/topology/brep_lines_topology.cpp:164:28: warning: [readability-function-cognitive-complexity]

    function 'vertex_is_part_of_invalid_embedded_line' has cognitive complexity of 17 (threshold 10)

      164 |         BRepLinesTopology::vertex_is_part_of_invalid_embedded_line(
          |                            ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:167:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      167 |         for( const auto& line_cmv :
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:170:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      170 |             if( line_cmv.component_id.type()
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:177:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      177 |             if( !line.is_active() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:181:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      181 |             for( const auto& embedding : brep_.embeddings( line_id ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:183:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      183 |                 if( brep_.Relationships::is_boundary(
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:197:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      197 |                 if( embedding.type() == Block3D::component_type_static()
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:198:21: note: +1
      198 |                     && !internal::brep_blocks_are_meshed( brep_ ) )
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:202:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      202 |                 if( !absl::c_any_of(
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:204:25: note: nesting level increased to 3
      204 |                         [&embedding]( const ComponentMeshVertex& cmv ) {
          |                         ^
  • src/geode/inspector/inspection/topology/brep_lines_topology.cpp:225:28: warning: [readability-function-cognitive-complexity]

    function 'vertex_is_part_of_invalid_single_line' has cognitive complexity of 23 (threshold 10)

      225 |         BRepLinesTopology::vertex_is_part_of_invalid_single_line(
          |                            ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:230:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      230 |         if( line_uuids.size() != 1 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:236:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      236 |         if( !line.is_active() )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:244:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      244 |         if( brep_.nb_embedding_surfaces( line ) < 1
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:245:13: note: +1
      245 |             && brep_.nb_incidences( line_id ) < 1 )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:249:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      249 |         if( surface_uuids.size() == 1 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:251:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      251 |             if( !brep_.Relationships::is_internal( line_id, surface_uuids[0] )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:252:17: note: +1
      252 |                 && !( brep_.Relationships::nb_embeddings( surface_uuids[0] ) > 0
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:253:23: note: +1
      253 |                       || brep_.Relationships::is_boundary(
          |                       ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:269:14: note: +1, nesting level increased to 1
      269 |         else if( surface_uuids.empty() )
          |              ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:271:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      271 |             if( !internal::brep_blocks_are_meshed( brep_ ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:275:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      275 |             if( block_uuids.size() != 1 )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:283:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      283 |             if( !brep_.Relationships::is_internal( line_id, block_uuids[0] ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:293:9: note: +1, nesting level increased to 1
      293 |         else
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:295:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      295 |             for( const auto& surface_id : surface_uuids )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:298:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      298 |                 if( !brep_.is_boundary( line, surface )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:299:21: note: +1
      299 |                     && !brep_.is_internal( line, surface ) )
          |                     ^
  • src/geode/inspector/inspection/topology/brep_lines_topology.cpp:252:20: warning: [readability-simplify-boolean-expr]

    boolean expression can be simplified by DeMorgan's theorem

      252 |                 && !( brep_.Relationships::nb_embeddings( surface_uuids[0] ) > 0
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                                                              <=
      253 |                       || brep_.Relationships::is_boundary(
          |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                       && !
      254 |                           line_id, surface_uuids[0] ) ) )
          |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/inspector/inspection/topology/brep_lines_topology.cpp:316:9: warning: [readability-function-cognitive-complexity]

    function 'vertex_is_part_of_line_with_wrong_relationships_to_surface' has cognitive complexity of 38 (threshold 10)

      316 |         vertex_is_part_of_line_with_wrong_relationships_to_surface(
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:319:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      319 |         for( const auto& cmv :
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:322:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      322 |             if( cmv.component_id.type() != Line3D::component_type_static() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:327:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      327 |             if( !line.is_active() || line.mesh().nb_edges() == 0 )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:327:35: note: +1
      327 |             if( !line.is_active() || line.mesh().nb_edges() == 0 )
          |                                   ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:332:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      332 |             for( const auto& incident_surface : brep_.incidences( line ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:334:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      334 |                 if( !incident_surface.is_active() )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:338:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      338 |                 if( !cme.surface_edges.contains( incident_surface.id() ) )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:349:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      349 |                 if( cme.surface_edges.at( incident_surface.id() ).size() != 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:363:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      363 |             for( const auto& embedding_surface :
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:366:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      366 |                 if( !embedding_surface.is_active() )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:370:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      370 |                 if( !cme.surface_edges.contains( embedding_surface.id() ) )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:382:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      382 |                 if( cme.surface_edges.at( embedding_surface.id() ).size() <= 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:396:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      396 |             if( brep_.nb_incidences( cmv.component_id.id() ) == 0
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:397:17: note: +1
      397 |                 && brep_.nb_embedding_surfaces( line ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:399:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      399 |                 for( const auto& [surface_id, _] : cme.surface_edges )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:401:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      401 |                     if( brep_.surface( surface_id ).is_active() )
          |                     ^
  • src/geode/inspector/inspection/topology/brep_lines_topology.cpp:448:28: warning: [readability-function-cognitive-complexity]

    function 'line_edge_has_wrong_component_edges_around' has cognitive complexity of 36 (threshold 10)

      448 |         BRepLinesTopology::line_edge_has_wrong_component_edges_around(
          |                            ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:452:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      452 |         for( const auto& [surface_id, surface_edges] : cme.surface_edges )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:455:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      455 |             if( !surface.is_active() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:459:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      459 |             if( brep_.is_boundary( line, surface ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:461:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      461 |                 if( surface_edges.size() != 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:473:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      473 |             if( brep_.is_internal( line, surface ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:475:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      475 |                 if( surface_edges.size() != 2 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:492:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      492 |         for( const auto& embedding_surface : brep_.embedding_surfaces( line ) )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:494:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      494 |             if( !embedding_surface.is_active() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:498:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      498 |             if( !cme.surface_edges.contains( embedding_surface.id() ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:509:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      509 |         for( const auto& incident_surface : brep_.incidences( line ) )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:511:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      511 |             if( !incident_surface.is_active() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:515:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      515 |             if( !cme.surface_edges.contains( incident_surface.id() ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:526:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      526 |         for( const auto& [block_id, block_edges] : cme.block_edges )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:529:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      529 |             if( block.is_active() && brep_.is_internal( line, block ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:529:35: note: +1
      529 |             if( block.is_active() && brep_.is_internal( line, block ) )
          |                                   ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:531:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      531 |                 if( block_edges.size() != 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:543:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      543 |         for( const auto& embedding_block : brep_.embedding_blocks( line ) )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:545:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      545 |             if( !embedding_block.is_active()
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:546:17: note: +1
      546 |                 || embedding_block.mesh().nb_polyhedra() == 0 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:550:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      550 |             if( !cme.block_edges.contains( embedding_block.id() ) )
          |             ^
  • src/geode/inspector/inspection/topology/brep_lines_topology.cpp:565:28: warning: [readability-function-cognitive-complexity]

    function 'inspect_lines_topology' has cognitive complexity of 21 (threshold 10)

      565 |         BRepLinesTopology::inspect_lines_topology() const
          |                            ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:568:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      568 |         for( const auto& line : brep_.active_lines() )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:570:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      570 |             if( !line_is_meshed( brep_.line( line.id() ) ) )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:580:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      580 |             if( line_result.nb_issues() != 0 )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:594:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      594 |             for( const auto edge_id : Range{ line.mesh().nb_edges() } )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:596:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      596 |                 if( const auto problem_message =
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:604:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      604 |             if( line_edges_with_wrong_cme.nb_issues() != 0 )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:611:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      611 |         for( const auto unique_vertex_id : Range{ brep_.nb_unique_vertices() } )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:613:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      613 |             if( const auto invalid_internal_topology =
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:621:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      621 |             if( const auto problem_message =
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:629:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      629 |             if( const auto problem_message =
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/topology/brep_lines_topology.cpp:635:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      635 |             if( const auto lines_but_is_not_corner =
          |             ^
  • tests/inspection/test-brep.cpp:34:16: warning: [misc-use-internal-linkage]

    function 'corners_topological_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

       34 | geode::index_t corners_topological_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:62:16: warning: [misc-use-internal-linkage]

    function 'lines_topological_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

       62 | geode::index_t lines_topological_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:93:16: warning: [misc-use-internal-linkage]

    function 'surfaces_topological_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

       93 | geode::index_t surfaces_topological_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:122:16: warning: [misc-use-internal-linkage]

    function 'blocks_topological_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

      122 | geode::index_t blocks_topological_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:157:16: warning: [misc-use-internal-linkage]

    function 'launch_topological_validity_checks' can be made static or moved into an anonymous namespace to enforce internal linkage

      157 | geode::index_t launch_topological_validity_checks(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:167:16: warning: [misc-use-internal-linkage]

    function 'meshes_adjacencies_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

      167 | geode::index_t meshes_adjacencies_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:190:16: warning: [misc-use-internal-linkage]

    function 'meshes_degenerations_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

      190 | geode::index_t meshes_degenerations_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:218:16: warning: [misc-use-internal-linkage]

    function 'meshes_intersections_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

      218 | geode::index_t meshes_intersections_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:219:56: warning: [performance-unnecessary-value-param]

    the const qualified parameter 'result' is copied for each invocation; consider making it a reference

      219 |     const geode::ElementsIntersectionsInspectionResult result, bool string )
          |                                                        ^
          |                                                       &
  • tests/inspection/test-brep.cpp:233:16: warning: [misc-use-internal-linkage]

    function 'meshes_manifolds_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

      233 | geode::index_t meshes_manifolds_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:262:16: warning: [misc-use-internal-linkage]

    function 'meshes_colocations_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

      262 | geode::index_t meshes_colocations_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:279:16: warning: [misc-use-internal-linkage]

    function 'meshes_unique_vertices_validity' can be made static or moved into an anonymous namespace to enforce internal linkage

      279 | geode::index_t meshes_unique_vertices_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:298:16: warning: [misc-use-internal-linkage]

    function 'launch_component_meshes_validity_checks' can be made static or moved into an anonymous namespace to enforce internal linkage

      298 | geode::index_t launch_component_meshes_validity_checks(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:301:10: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'nb_issues' during its initialization is never read

      301 |     auto nb_issues =
          |          ^~~~~~~~~
      302 |         meshes_adjacencies_validity( result.meshes_adjacencies, string );
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-brep.cpp:301:10: note: Value stored to 'nb_issues' during its initialization is never read
      301 |     auto nb_issues =
          |          ^~~~~~~~~
      302 |         meshes_adjacencies_validity( result.meshes_adjacencies, string );
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • tests/inspection/test-brep.cpp:316:6: warning: [misc-use-internal-linkage]

    function 'check_model_a1' can be made static or moved into an anonymous namespace to enforce internal linkage

      316 | void check_model_a1( bool string )
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:329:34: warning: [cppcoreguidelines-avoid-magic-numbers]

    5191 is a magic number; consider replacing it with a named constant

      329 |         nb_topological_issues == 5191, "model_A1 has ", nb_topological_issues,
          |                                  ^
  • tests/inspection/test-brep.cpp:335:39: warning: [cppcoreguidelines-avoid-magic-numbers]

    13494 is a magic number; consider replacing it with a named constant

      335 |         nb_component_meshes_issues == 13494, "model_A1 has ",
          |                                       ^
  • tests/inspection/test-brep.cpp:339:6: warning: [misc-use-internal-linkage]

    function 'check_model_a1_valid' can be made static or moved into an anonymous namespace to enforce internal linkage

      339 | void check_model_a1_valid( bool string )
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:352:34: warning: [cppcoreguidelines-avoid-magic-numbers]

    5191 is a magic number; consider replacing it with a named constant

      352 |         nb_topological_issues == 5191, "model_A1_valid has ",
          |                                  ^
  • tests/inspection/test-brep.cpp:358:39: warning: [cppcoreguidelines-avoid-magic-numbers]

    13494 is a magic number; consider replacing it with a named constant

      358 |         nb_component_meshes_issues == 13494, "model_A1_valid has ",
          |                                       ^
  • tests/inspection/test-brep.cpp:362:6: warning: [misc-use-internal-linkage]

    function 'check_model_mss' can be made static or moved into an anonymous namespace to enforce internal linkage

      362 | void check_model_mss( bool string )
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:375:34: warning: [cppcoreguidelines-avoid-magic-numbers]

    50 is a magic number; consider replacing it with a named constant

      375 |         nb_topological_issues == 50, "mss has ", nb_topological_issues,
          |                                  ^
  • tests/inspection/test-brep.cpp:385:6: warning: [misc-use-internal-linkage]

    function 'check_model_D' can be made static or moved into an anonymous namespace to enforce internal linkage

      385 | void check_model_D( bool string )
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:385:6: warning: [readability-identifier-naming]

    invalid case style for global function 'check_model_D'

      385 | void check_model_D( bool string )
          |      ^~~~~~~~~~~~~
          |      check_model_d

Have any feedback or feature suggestions? Share it here.

…m:Geode-solutions/OpenGeode-Inspector into fix/checks_on_block_boundaries-not_called
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants