Skip to content

fix(ComponentsStorage): name the component type and check deletion of unknown ids - #1376

Merged
BenPinet merged 1 commit into
nextfrom
fix/component-access-robustness
Oct 21, 2026
Merged

BenPinet merged 1 commit into
nextfrom
fix/component-access-robustness

Conversation

@francoisbonneau

@francoisbonneau francoisbonneau commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Follow-up of #1371 (56952bf, single lookup and explicit error for unknown component). This branch was rebased on next and only keeps what #1371 does not cover:

  • Component type in the message: [ComponentsStorage] Fault with id <uuid> does not exist instead of Component with id <uuid> does not exist. Useful when the same uuid is looked up in several component collections, and in Python where the exception is the only hint.
  • delete_component checks the id: it erased components_.find(id) without checking it, which is undefined behavior for an unknown id. It now throws the same exception.

Tests

  • test-brep: test_remove_unknown_component, which checks that remove_surfaces with an unknown id throws an exception naming the type and the id, and leaves the model unchanged.
  • test-py-brep: test_unknown_component_access, which checks the message seen from Python.

Full suite passes locally.

Related: Geode-solutions/OpenGeode-Geosciences#204 (same branch name), which removes the uuid overloads of the geological setters.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 206 concern(s)
  • include/geode/model/mixin/core/detail/components_storage.hpp:165:24: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      165 |             const auto it = components_.find( component_id );
          |                        ^
  • include/geode/model/mixin/core/detail/components_storage.hpp:216:39: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      216 |                 if( filename.size() > 36 )
          |                                       ^
  • include/geode/model/mixin/core/detail/components_storage.hpp:218:68: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      218 |                     auto uuid = filename.substr( filename.size() - 36 );
          |                                                                    ^
  • include/geode/model/mixin/core/detail/components_storage.hpp:246:14: warning: [readability-function-cognitive-complexity]

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

      246 |         void repair_loaded_components( std::string_view filename )
          |              ^
    /__w/OpenGeode/OpenGeode/include/geode/model/mixin/core/detail/components_storage.hpp:249:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      249 |             for( const auto& [component_id, component] : components_ )
          |             ^
    /__w/OpenGeode/OpenGeode/include/geode/model/mixin/core/detail/components_storage.hpp:251:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      251 |                 if( !component || component->id() != component_id )
          |                 ^
    /__w/OpenGeode/OpenGeode/include/geode/model/mixin/core/detail/components_storage.hpp:251:32: note: +1
      251 |                 if( !component || component->id() != component_id )
          |                                ^
    /__w/OpenGeode/OpenGeode/include/geode/model/mixin/core/detail/components_storage.hpp:257:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      257 |             if( !has_wrong_component )
          |             ^
    /__w/OpenGeode/OpenGeode/include/geode/model/mixin/core/detail/components_storage.hpp:263:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      263 |             for( auto& [component_id, component] : components_ )
          |             ^
    /__w/OpenGeode/OpenGeode/include/geode/model/mixin/core/detail/components_storage.hpp:265:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      265 |                 if( !component )
          |                 ^
    /__w/OpenGeode/OpenGeode/include/geode/model/mixin/core/detail/components_storage.hpp:273:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      273 |                 if( id != component_id )
          |                 ^
    /__w/OpenGeode/OpenGeode/include/geode/model/mixin/core/detail/components_storage.hpp:282:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      282 |                 if( !inserted )
          |                 ^
  • include/geode/model/mixin/core/detail/components_storage.hpp:272:22: warning: [readability-identifier-length]

    variable name 'id' is too short, expected at least 3 characters

      272 |                 auto id = component->id();
          |                      ^
  • include/geode/model/mixin/core/detail/components_storage.hpp:293:54: warning: [readability-identifier-length]

    parameter name 'it' is too short, expected at least 3 characters

      293 |             typename ComponentsStore::const_iterator it,
          |                                                      ^
  • include/geode/model/mixin/core/detail/components_storage.hpp:306:24: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      306 |             const auto it = components_.find( component_id );
          |                        ^
  • tests/model/test-brep.cpp:69:30: warning: [misc-use-internal-linkage]

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

       69 | std::array< geode::uuid, 6 > add_corners(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:72:30: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       72 |     std::array< geode::uuid, 6 > uuids;
          |                              ^
  • tests/model/test-brep.cpp:73:21: warning: [readability-identifier-length]

    variable name 'c' is too short, expected at least 3 characters

       73 |     for( const auto c : geode::Range{ 6 } )
          |                     ^
  • tests/model/test-brep.cpp:83:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       83 |     geode::OpenGeodeModelException::test( model.nb_corners() == 6, message );
          |                                                                 ^
  • tests/model/test-brep.cpp:85:67: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       85 |         geode::detail::count_range_elements( model.corners() ) == 6, message );
          |                                                                   ^
  • tests/model/test-brep.cpp:89:38: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       89 |         model.nb_active_corners() == 6, message );
          |                                      ^
  • tests/model/test-brep.cpp:95:31: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       95 |         model.nb_corners() == 6, "BRep should still have 6 corners" );
          |                               ^
  • tests/model/test-brep.cpp:109:62: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      109 |     geode::OpenGeodeModelException::test( nb_active_pairs == 16,
          |                                                              ^
  • tests/model/test-brep.cpp:116:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      116 |         geode::detail::count_range_elements( corners_range ) == 6
          |                                                                 ^
  • tests/model/test-brep.cpp:117:71: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      117 |             && geode::detail::count_range_elements( corners_copy ) == 5,
          |                                                                       ^
  • tests/model/test-brep.cpp:122:30: warning: [misc-use-internal-linkage]

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

      122 | std::array< geode::uuid, 9 > add_lines(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:125:30: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      125 |     std::array< geode::uuid, 9 > uuids;
          |                              ^
  • tests/model/test-brep.cpp:126:21: warning: [readability-identifier-length]

    variable name 'l' is too short, expected at least 3 characters

      126 |     for( const auto l : geode::Range{ 9 } )
          |                     ^
  • tests/model/test-brep.cpp:136:63: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      136 |     geode::OpenGeodeModelException::test( model.nb_lines() == 9, message );
          |                                                               ^
  • tests/model/test-brep.cpp:138:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      138 |         geode::detail::count_range_elements( model.lines() ) == 9, message );
          |                                                                 ^
  • tests/model/test-brep.cpp:142:36: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      142 |         model.nb_active_lines() == 9, message );
          |                                    ^
  • tests/model/test-brep.cpp:146:36: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      146 |         model.nb_active_lines() == 7, "BRep should have 7 active lines" );
          |                                    ^
  • tests/model/test-brep.cpp:148:29: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      148 |         model.nb_lines() == 9, "BRep should still have 9 lines" );
          |                             ^
  • tests/model/test-brep.cpp:152:30: warning: [misc-use-internal-linkage]

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

      152 | std::array< geode::uuid, 5 > add_surfaces(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:155:30: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      155 |     std::array< geode::uuid, 5 > uuids;
          |                              ^
  • tests/model/test-brep.cpp:156:21: warning: [readability-identifier-length]

    variable name 's' is too short, expected at least 3 characters

      156 |     for( const auto s : geode::Range{ 2 } )
          |                     ^
  • tests/model/test-brep.cpp:163:21: warning: [readability-identifier-length]

    variable name 's' is too short, expected at least 3 characters

      163 |     for( const auto s : geode::Range{ 2, 5 } )
          |                     ^
  • tests/model/test-brep.cpp:171:66: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      171 |     geode::OpenGeodeModelException::test( model.nb_surfaces() == 5, message );
          |                                                                  ^
  • tests/model/test-brep.cpp:173:68: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      173 |         geode::detail::count_range_elements( model.surfaces() ) == 5, message );
          |                                                                    ^
  • tests/model/test-brep.cpp:177:39: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      177 |         model.nb_active_surfaces() == 5, message );
          |                                       ^
  • tests/model/test-brep.cpp:183:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      183 |         model.nb_surfaces() == 5, "BRep should still have 5 surfaces" );
          |                                ^
  • tests/model/test-brep.cpp:187:13: warning: [misc-use-internal-linkage]

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

      187 | geode::uuid add_block( const geode::BRep& model, geode::BRepBuilder& builder )
          |             ^
          | static 
  • tests/model/test-brep.cpp:210:30: warning: [misc-use-internal-linkage]

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

      210 | std::array< geode::uuid, 3 > add_model_boundaries(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:214:21: warning: [readability-identifier-length]

    variable name 'mb' is too short, expected at least 3 characters

      214 |     for( const auto mb : geode::Range{ 3 } )
          |                     ^
  • tests/model/test-brep.cpp:247:30: warning: [misc-use-internal-linkage]

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

      247 | std::array< geode::uuid, 2 > add_corner_collections(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:251:21: warning: [readability-identifier-length]

    variable name 'mb' is too short, expected at least 3 characters

      251 |     for( const auto mb : geode::Indices{ uuids } )
          |                     ^
  • tests/model/test-brep.cpp:285:30: warning: [misc-use-internal-linkage]

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

      285 | std::array< geode::uuid, 2 > add_line_collections(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:289:21: warning: [readability-identifier-length]

    variable name 'mb' is too short, expected at least 3 characters

      289 |     for( const auto mb : geode::Indices{ uuids } )
          |                     ^
  • tests/model/test-brep.cpp:321:30: warning: [misc-use-internal-linkage]

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

      321 | std::array< geode::uuid, 2 > add_surface_collections(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:325:21: warning: [readability-identifier-length]

    variable name 'mb' is too short, expected at least 3 characters

      325 |     for( const auto mb : geode::Indices{ uuids } )
          |                     ^
  • tests/model/test-brep.cpp:358:13: warning: [misc-use-internal-linkage]

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

      358 | geode::uuid add_block_collection(
          |             ^
          | static 
  • tests/model/test-brep.cpp:389:6: warning: [misc-use-internal-linkage]

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

      389 | void add_corner_line_boundary_relation( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:397:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      397 |         model.corner( corner_uuids[0] ), model.line( line_uuids[5] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:413:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      413 |         model.corner( corner_uuids[3] ), model.line( line_uuids[5] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:415:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      415 |         model.corner( corner_uuids[3] ), model.line( line_uuids[6] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:417:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      417 |         model.corner( corner_uuids[3] ), model.line( line_uuids[7] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:421:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      421 |         model.corner( corner_uuids[4] ), model.line( line_uuids[6] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:423:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      423 |         model.corner( corner_uuids[4] ), model.line( line_uuids[7] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:425:36: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      425 |         model.corner( corner_uuids[5] ), model.line( line_uuids[4] ) );
          |                                    ^
  • tests/model/test-brep.cpp:427:36: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      427 |         model.corner( corner_uuids[5] ), model.line( line_uuids[7] ) );
          |                                    ^
  • tests/model/test-brep.cpp:427:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      427 |         model.corner( corner_uuids[5] ), model.line( line_uuids[7] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:429:36: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      429 |         model.corner( corner_uuids[5] ), model.line( line_uuids[6] ) );
          |                                    ^
  • tests/model/test-brep.cpp:429:65: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      429 |         model.corner( corner_uuids[5] ), model.line( line_uuids[6] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:456:23: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      456 |         if( line_id < 6 )
          |                       ^
  • tests/model/test-brep.cpp:469:6: warning: [misc-use-internal-linkage]

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

      469 | void add_line_surface_boundary_relation( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:495:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      495 |         model.line( line_uuids[5] ), model.surface( surface_uuids[1] ) );
          |                                ^
  • tests/model/test-brep.cpp:497:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      497 |         model.line( line_uuids[5] ), model.surface( surface_uuids[3] ) );
          |                                ^
  • tests/model/test-brep.cpp:499:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      499 |         model.line( line_uuids[6] ), model.surface( surface_uuids[1] ) );
          |                                ^
  • tests/model/test-brep.cpp:501:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      501 |         model.line( line_uuids[6] ), model.surface( surface_uuids[4] ) );
          |                                ^
  • tests/model/test-brep.cpp:503:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      503 |         model.line( line_uuids[7] ), model.surface( surface_uuids[2] ) );
          |                                ^
  • tests/model/test-brep.cpp:505:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      505 |         model.line( line_uuids[7] ), model.surface( surface_uuids[4] ) );
          |                                ^
  • tests/model/test-brep.cpp:507:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      507 |         model.line( line_uuids[8] ), model.surface( surface_uuids[3] ) );
          |                                ^
  • tests/model/test-brep.cpp:509:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      509 |         model.line( line_uuids[8] ), model.surface( surface_uuids[4] ) );
          |                                ^
  • tests/model/test-brep.cpp:526:6: warning: [misc-use-internal-linkage]

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

      526 | void add_surface_block_boundary_relation( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:556:6: warning: [misc-use-internal-linkage]

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

      556 | void add_surfaces_in_model_boundaries( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:581:6: warning: [misc-use-internal-linkage]

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

      581 | void add_corners_in_corner_collections( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:608:6: warning: [misc-use-internal-linkage]

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

      608 | void add_lines_in_line_collections( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:633:6: warning: [misc-use-internal-linkage]

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

      633 | void add_surfaces_in_surface_collections( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:660:6: warning: [misc-use-internal-linkage]

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

      660 | void add_block_in_block_collection( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:674:6: warning: [misc-use-internal-linkage]

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

      674 | void add_internal_corner_relations( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:674:6: warning: [readability-function-size]

    function 'add_internal_corner_relations' exceeds recommended size/complexity thresholds

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:674:6: note: 6 parameters (threshold 4)
  • tests/model/test-brep.cpp:676:5: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of 'add_internal_corner_relations' of similar type ('absl::Span') are easily swapped by mistake

      676 |     absl::Span< const geode::uuid > corner_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      677 |     absl::Span< const geode::uuid > line_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      678 |     absl::Span< const geode::uuid > surface_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:676:37: note: the first parameter in the range is 'corner_uuids'
      676 |     absl::Span< const geode::uuid > corner_uuids,
          |                                     ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:678:37: note: the last parameter in the range is 'surface_uuids'
      678 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:737:6: warning: [misc-use-internal-linkage]

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

      737 | void add_internal_line_relations( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:737:6: warning: [readability-function-cognitive-complexity]

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

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:744:5: note: +1, including nesting penalty of 0, nesting level increased to 1
      744 |     for( const auto& line_id : line_uuids )
          |     ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:746:9: note: +2, including nesting penalty of 1, nesting level increased to 2
      746 |         if( !model.is_boundary( model.line( line_id ),
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:752:9: note: +1, nesting level increased to 2
      752 |         else
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:760:5: note: +1, including nesting penalty of 0, nesting level increased to 1
      760 |     for( const auto& line_id : line_uuids )
          |     ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:762:9: note: +2, including nesting penalty of 1, nesting level increased to 2
      762 |         for( const auto& embedding :
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:774:9: note: +2, including nesting penalty of 1, nesting level increased to 2
      774 |         for( const auto& embedding :
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:783:9: note: +2, including nesting penalty of 1, nesting level increased to 2
      783 |         if( model.is_boundary( model.line( line_id ),
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:793:9: note: +1, nesting level increased to 2
      793 |         else
          |         ^
  • tests/model/test-brep.cpp:737:6: warning: [readability-function-size]

    function 'add_internal_line_relations' exceeds recommended size/complexity thresholds

      737 | void add_internal_line_relations( const geode::BRep& model,
          |      ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:737:6: note: 5 parameters (threshold 4)
  • tests/model/test-brep.cpp:739:5: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'add_internal_line_relations' of similar type ('absl::Span') are easily swapped by mistake

      739 |     absl::Span< const geode::uuid > line_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      740 |     absl::Span< const geode::uuid > surface_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:739:37: note: the first parameter in the range is 'line_uuids'
      739 |     absl::Span< const geode::uuid > line_uuids,
          |                                     ^~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:740:37: note: the last parameter in the range is 'surface_uuids'
      740 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:809:6: warning: [misc-use-internal-linkage]

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

      809 | void add_internal_surface_block_relations( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:844:6: warning: [misc-use-internal-linkage]

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

      844 | void set_geometry( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:844:6: warning: [readability-function-size]

    function 'set_geometry' exceeds recommended size/complexity thresholds

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:844:6: note: 5 parameters (threshold 4)
  • tests/model/test-brep.cpp:846:5: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of 'set_geometry' of similar type ('absl::Span') are easily swapped by mistake

      846 |     absl::Span< const geode::uuid > corner_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      847 |     absl::Span< const geode::uuid > line_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      848 |     absl::Span< const geode::uuid > surface_uuids )
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:846:37: note: the first parameter in the range is 'corner_uuids'
      846 |     absl::Span< const geode::uuid > corner_uuids,
          |                                     ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:848:37: note: the last parameter in the range is 'surface_uuids'
      848 |     absl::Span< const geode::uuid > surface_uuids )
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:850:33: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      850 |     std::array< geode::Point3D, 6 > points;
          |                                 ^
  • tests/model/test-brep.cpp:854:43: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      854 |     points[3] = geode::Point3D{ { 1., 1., 2. } };
          |                                           ^
  • tests/model/test-brep.cpp:855:39: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      855 |     points[4] = geode::Point3D{ { 1., 2., 2. } };
          |                                       ^
  • tests/model/test-brep.cpp:855:43: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      855 |     points[4] = geode::Point3D{ { 1., 2., 2. } };
          |                                           ^
  • tests/model/test-brep.cpp:856:12: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      856 |     points[5] = geode::Point3D{ { 2., 2., 2. } };
          |            ^
  • tests/model/test-brep.cpp:856:35: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      856 |     points[5] = geode::Point3D{ { 2., 2., 2. } };
          |                                   ^
  • tests/model/test-brep.cpp:856:39: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      856 |     points[5] = geode::Point3D{ { 2., 2., 2. } };
          |                                       ^
  • tests/model/test-brep.cpp:856:43: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      856 |     points[5] = geode::Point3D{ { 2., 2., 2. } };
          |                                           ^
  • tests/model/test-brep.cpp:881:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      881 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:882:55: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      882 |     builder.line_mesh_builder( model.line( line_uuids[5] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:884:55: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      884 |     builder.line_mesh_builder( model.line( line_uuids[5] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:886:55: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      886 |     builder.line_mesh_builder( model.line( line_uuids[6] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:888:55: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      888 |     builder.line_mesh_builder( model.line( line_uuids[6] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:890:55: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      890 |     builder.line_mesh_builder( model.line( line_uuids[7] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:892:55: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      892 |     builder.line_mesh_builder( model.line( line_uuids[7] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:893:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      893 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:894:55: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      894 |     builder.line_mesh_builder( model.line( line_uuids[8] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:896:55: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      896 |     builder.line_mesh_builder( model.line( line_uuids[8] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:897:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      897 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:941:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      941 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:954:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      954 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:965:32: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      965 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:970:6: warning: [misc-use-internal-linkage]

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

      970 | void test_boundary_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:970:6: warning: [readability-function-size]

    function 'test_boundary_ranges' exceeds recommended size/complexity thresholds

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:970:6: note: 5 parameters (threshold 4)
  • tests/model/test-brep.cpp:971:5: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of 'test_boundary_ranges' of similar type ('absl::Span') are easily swapped by mistake

      971 |     absl::Span< const geode::uuid > corner_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      972 |     absl::Span< const geode::uuid > line_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      973 |     absl::Span< const geode::uuid > surface_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:971:37: note: the first parameter in the range is 'corner_uuids'
      971 |     absl::Span< const geode::uuid > corner_uuids,
          |                                     ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:973:37: note: the last parameter in the range is 'surface_uuids'
      973 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:1028:6: warning: [misc-use-internal-linkage]

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

     1028 | void test_incidence_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1028:6: warning: [readability-function-size]

    function 'test_incidence_ranges' exceeds recommended size/complexity thresholds

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1028:6: note: 5 parameters (threshold 4)
  • tests/model/test-brep.cpp:1029:5: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of 'test_incidence_ranges' of similar type ('absl::Span') are easily swapped by mistake

     1029 |     absl::Span< const geode::uuid > corner_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1030 |     absl::Span< const geode::uuid > line_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1031 |     absl::Span< const geode::uuid > surface_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1029:37: note: the first parameter in the range is 'corner_uuids'
     1029 |     absl::Span< const geode::uuid > corner_uuids,
          |                                     ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1031:37: note: the last parameter in the range is 'surface_uuids'
     1031 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:1042:56: warning: [cppcoreguidelines-avoid-magic-numbers]

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

     1042 |                 || corner_incidence.id() == line_uuids[5],
          |                                                        ^
  • tests/model/test-brep.cpp:1075:6: warning: [misc-use-internal-linkage]

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

     1075 | void test_item_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1076:5: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'test_item_ranges' of similar type ('absl::Span') are easily swapped by mistake

     1076 |     absl::Span< const geode::uuid > surface_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1077 |     absl::Span< const geode::uuid > boundary_uuids )
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1076:37: note: the first parameter in the range is 'surface_uuids'
     1076 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1077:37: note: the last parameter in the range is 'boundary_uuids'
     1077 |     absl::Span< const geode::uuid > boundary_uuids )
          |                                     ^~~~~~~~~~~~~~
  • tests/model/test-brep.cpp:1100:6: warning: [misc-use-internal-linkage]

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

     1100 | void test_corner_collection_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1101:5: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'test_corner_collection_ranges' of similar type ('absl::Span') are easily swapped by mistake

     1101 |     absl::Span< const geode::uuid > corner_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1102 |     absl::Span< const geode::uuid > collection_uuids )
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1101:37: note: the first parameter in the range is 'corner_uuids'
     1101 |     absl::Span< const geode::uuid > corner_uuids,
          |                                     ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1102:37: note: the last parameter in the range is 'collection_uuids'
     1102 |     absl::Span< const geode::uuid > collection_uuids )
          |                                     ^~~~~~~~~~~~~~~~
  • tests/model/test-brep.cpp:1112:57: warning: [cppcoreguidelines-avoid-magic-numbers]

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

     1112 |                 || collection_item.id() == corner_uuids[5],
          |                                                         ^
  • tests/model/test-brep.cpp:1123:6: warning: [misc-use-internal-linkage]

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

     1123 | void test_line_collection_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1124:5: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'test_line_collection_ranges' of similar type ('absl::Span') are easily swapped by mistake

     1124 |     absl::Span< const geode::uuid > line_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1125 |     absl::Span< const geode::uuid > collection_uuids )
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1124:37: note: the first parameter in the range is 'line_uuids'
     1124 |     absl::Span< const geode::uuid > line_uuids,
          |                                     ^~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1125:37: note: the last parameter in the range is 'collection_uuids'
     1125 |     absl::Span< const geode::uuid > collection_uuids )
          |                                     ^~~~~~~~~~~~~~~~
  • tests/model/test-brep.cpp:1148:6: warning: [misc-use-internal-linkage]

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

     1148 | void test_surface_collection_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1149:5: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'test_surface_collection_ranges' of similar type ('absl::Span') are easily swapped by mistake

     1149 |     absl::Span< const geode::uuid > surface_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1150 |     absl::Span< const geode::uuid > collection_uuids )
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1149:37: note: the first parameter in the range is 'surface_uuids'
     1149 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1150:37: note: the last parameter in the range is 'collection_uuids'
     1150 |     absl::Span< const geode::uuid > collection_uuids )
          |                                     ^~~~~~~~~~~~~~~~
  • tests/model/test-brep.cpp:1171:6: warning: [misc-use-internal-linkage]

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

     1171 | void test_block_collection_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1172:5: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'test_block_collection_ranges' of similar type ('const geode::uuid &') are easily swapped by mistake

     1172 |     const geode::uuid& block_uuid,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1173 |     const geode::uuid& collection_uuid )
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1172:24: note: the first parameter in the range is 'block_uuid'
     1172 |     const geode::uuid& block_uuid,
          |                        ^~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1173:24: note: the last parameter in the range is 'collection_uuid'
     1173 |     const geode::uuid& collection_uuid )
          |                        ^~~~~~~~~~~~~~~
  • tests/model/test-brep.cpp:1193:6: warning: [misc-use-internal-linkage]

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

     1193 | void test_compare_brep( const geode::BRep& model, const geode::BRep& model2 )
          |      ^
          | static 
  • tests/model/test-brep.cpp:1193:6: warning: [readability-function-cognitive-complexity]

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

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1227:5: note: +1, including nesting penalty of 0, nesting level increased to 1
     1227 |     for( const auto& block : model.blocks() )
          |     ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1234:9: note: +2, including nesting penalty of 1, nesting level increased to 2
     1234 |         for( const auto vertex_id : geode::Range{ mesh.nb_vertices() } )
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1242:5: note: +1, including nesting penalty of 0, nesting level increased to 1
     1242 |     for( const auto& surface : model.surfaces() )
          |     ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1250:9: note: +2, including nesting penalty of 1, nesting level increased to 2
     1250 |         for( const auto vertex_id : geode::Range{ mesh.nb_vertices() } )
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1258:5: note: +1, including nesting penalty of 0, nesting level increased to 1
     1258 |     for( const auto& line : model.lines() )
          |     ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1265:9: note: +2, including nesting penalty of 1, nesting level increased to 2
     1265 |         for( const auto vertex_id : geode::Range{ mesh.nb_vertices() } )
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1273:5: note: +1, including nesting penalty of 0, nesting level increased to 1
     1273 |     for( const auto& corner : model.corners() )
          |     ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1280:9: note: +2, including nesting penalty of 1, nesting level increased to 2
     1280 |         for( const auto vertex_id : geode::Range{ mesh.nb_vertices() } )
          |         ^
  • tests/model/test-brep.cpp:1291:6: warning: [misc-use-internal-linkage]

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

     1291 | void test_components_attribute_values( const geode::uuid& attribute_id,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1314:6: warning: [misc-use-internal-linkage]

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

     1314 | void test_block_physical_attribute( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1321:27: warning: [cppcoreguidelines-avoid-magic-numbers]

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

     1321 |             attribute_id, 0.2,
          |                           ^
  • tests/model/test-brep.cpp:1329:6: warning: [misc-use-internal-linkage]

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

     1329 | void test_components_attribute( geode::BRep& model )
          |      ^
          | static 
  • tests/model/test-brep.cpp:1373:6: warning: [misc-use-internal-linkage]

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

     1373 | void test_surface_physical_attribute( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1380:27: warning: [cppcoreguidelines-avoid-magic-numbers]

    1e7 is a magic number; consider replacing it with a named constant

     1380 |             attribute_id, 1e7,
          |                           ^
  • tests/model/test-brep.cpp:1388:6: warning: [misc-use-internal-linkage]

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

     1388 | void test_physical_properties( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1416:6: warning: [misc-use-internal-linkage]

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

     1416 | void test_clone( const geode::BRep& brep,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1426:31: warning: [cppcoreguidelines-avoid-magic-numbers]

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

     1426 |         brep2.nb_corners() == 6, "BRep should have 6 corners" );
          |                               ^

Have any feedback or feature suggestions? Share it here.

@francoisbonneau
francoisbonneau requested review from BotellaA and panquez and removed request for panquez October 21, 2026 09:55
@francoisbonneau
francoisbonneau force-pushed the fix/component-access-robustness branch from 28a0d46 to da555af Compare October 21, 2026 13:33
… unknown ids

Follow-up of 56952bf (single lookup and explicit error for unknown
component):

- the unknown component message names the component type:
  "[ComponentsStorage] Fault with id <uuid> does not exist", useful when
  the same uuid is looked up in several component collections;
- delete_component erased components_.find(id) without checking it,
  undefined behavior for an unknown id; it now throws the same exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@francoisbonneau francoisbonneau changed the title fix(ComponentsStorage): throw a clear exception for unknown component ids fix(ComponentsStorage): name the component type and check deletion of unknown ids Oct 21, 2026
@francoisbonneau
francoisbonneau force-pushed the fix/component-access-robustness branch from da555af to b96df52 Compare October 21, 2026 13:53
@BenPinet
BenPinet merged commit b0eb883 into next Oct 21, 2026
25 checks passed
@BenPinet
BenPinet deleted the fix/component-access-robustness branch October 21, 2026 16:01
@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 19.1.0-rc.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@geode-ci

geode-ci Bot commented Oct 22, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 19.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@geode-ci geode-ci Bot added the released label Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants