Skip to content

V18 - #5

Draft
BenPinet wants to merge 15 commits into
nextfrom
v18
Draft

V18#5
BenPinet wants to merge 15 commits into
nextfrom
v18

Conversation

@BenPinet

@BenPinet BenPinet commented Aug 4, 2026

Copy link
Copy Markdown
Member

No description provided.

@BenPinet
BenPinet requested a review from BotellaA August 4, 2026 09:40
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 19 concern(s)
  • src/geode/inspector_geosciences/inspection/geology/cross_section_geology.cpp:60:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

       60 |         Impl( const CrossSection& model ) : model_( model ) {}
          |         ^
          |         explicit 
  • src/geode/inspector_geosciences/inspection/geology/cross_section_geology.cpp:132:9: warning: [modernize-use-nodiscard]

    function 'horizon_invalidity' should be marked [[nodiscard]]

      132 |         std::optional< std::string > horizon_invalidity(
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector_geosciences/inspection/geology/cross_section_geology.cpp:165:9: warning: [modernize-use-nodiscard]

    function 'surface_is_in_a_fault_block' should be marked [[nodiscard]]

      165 |         bool surface_is_in_a_fault_block( const Surface2D& surface ) const
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector_geosciences/inspection/geology/cross_section_geology.cpp:169:32: error: [clang-diagnostic-error]

    reference to non-static member function must be called; did you mean to call it with no arguments?

      169 |                 if( collection.type == FaultBlock2D::component_type_static() )
          |                     ~~~~~~~~~~~^~~~
          |                                    ()
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/OpenGeode-0.0.0-ubuntu/include/geode/model/mixin/core/component_type.hpp:67:44: note: possible target for call
       67 |         [[nodiscard]] const ComponentType& type() const&
          |                                            ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/OpenGeode-0.0.0-ubuntu/include/geode/model/mixin/core/component_type.hpp:72:39: note: possible target for call
       72 |         [[nodiscard]] ComponentType&& type() &&
          |                                       ^
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:48:32: error: [clang-diagnostic-error]

    reference to non-static member function must be called; did you mean to call it with no arguments?

       48 |                     collection.type )
          |                     ~~~~~~~~~~~^~~~
          |                                    ()
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:65:18: note: in instantiation of function template specialization '(anonymous namespace)::component_is_linked_to_geology<geode::CrossSection>' requested here
       65 |             if( !component_is_linked_to_geology( model, component.id() ) )
          |                  ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:77:16: note: in instantiation of function template specialization '(anonymous namespace)::components_are_linked_to_geology<geode::CrossSection, geode::Corners<2>::CornerRange>' requested here
       77 |         return components_are_linked_to_geology( model, model.corners() )
          |                ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:110:22: note: in instantiation of function template specialization '(anonymous namespace)::components_are_linked_to_geology_base<geode::CrossSection>' requested here
      110 |             return ::components_are_linked_to_geology_base( model );
          |                      ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/OpenGeode-0.0.0-ubuntu/include/geode/model/mixin/core/component_type.hpp:67:44: note: possible target for call
       67 |         [[nodiscard]] const ComponentType& type() const&
          |                                            ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/OpenGeode-0.0.0-ubuntu/include/geode/model/mixin/core/component_type.hpp:72:39: note: possible target for call
       72 |         [[nodiscard]] ComponentType&& type() &&
          |                                       ^
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:49:31: error: [clang-diagnostic-error]

    reference to non-static member function must be called; did you mean to call it with no arguments?

       49 |                 || collection.type
          |                    ~~~~~~~~~~~^~~~
          |                                   ()
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/OpenGeode-0.0.0-ubuntu/include/geode/model/mixin/core/component_type.hpp:67:44: note: possible target for call
       67 |         [[nodiscard]] const ComponentType& type() const&
          |                                            ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/OpenGeode-0.0.0-ubuntu/include/geode/model/mixin/core/component_type.hpp:72:39: note: possible target for call
       72 |         [[nodiscard]] ComponentType&& type() &&
          |                                       ^
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:61:44: warning: [performance-unnecessary-value-param]

    the parameter 'component_range' is copied for each invocation but only used as a const reference; consider making it a const reference

       61 |         const Model& model, ComponentRange component_range )
          |                                            ^
          |                             const         &
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:85:24: warning: [performance-unnecessary-value-param]

    the parameter 'component_range' is copied for each invocation but only used as a const reference; consider making it a const reference

       85 |         ComponentRange component_range )
          |                        ^
          |         const         &
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:101:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

      101 | namespace geode
          | ^~~~~~~~~~~~~~~
      102 | {
          | ~
      103 |     namespace internal
          |     ~~~~~~~~~~~~~~~~~~
          |     namespace geode::internal
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:148:14: warning: [readability-function-cognitive-complexity]

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

      148 |         bool model_geological_components_are_linked_to_geometry(
          |              ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:151:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      151 |             for( const auto& fault_block : model.fault_blocks() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:153:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      153 |                 if( model.nb_items( fault_block.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:158:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      158 |             for( const auto& fault : model.faults() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:160:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      160 |                 if( model.nb_items( fault.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:165:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      165 |             for( const auto& horizon : model.horizons() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:167:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      167 |                 if( model.nb_items( horizon.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:172:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      172 |             for( const auto& stratigraphic_unit : model.stratigraphic_units() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:174:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      174 |                 if( model.nb_items( stratigraphic_unit.id() ) == 0 )
          |                 ^
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:183:14: warning: [readability-function-cognitive-complexity]

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

      183 |         void add_model_geological_components_not_linked_to_geometry(
          |              ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:186:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      186 |             for( const auto& fault_block : model.fault_blocks() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:188:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      188 |                 if( model.nb_items( fault_block.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:196:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      196 |             for( const auto& fault : model.faults() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:198:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      198 |                 if( model.nb_items( fault.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:206:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      206 |             for( const auto& horizon : model.horizons() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:208:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      208 |                 if( model.nb_items( horizon.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:216:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      216 |             for( const auto& stratigraphic_unit : model.stratigraphic_units() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:218:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      218 |                 if( model.nb_items( stratigraphic_unit.id() ) == 0 )
          |                 ^
  • src/geode/inspector_geosciences/inspection/geology/structural_model_geology.cpp:61:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

       61 |         Impl( const StructuralModel& model ) : model_( model ) {}
          |         ^
          |         explicit 
  • src/geode/inspector_geosciences/inspection/geology/structural_model_geology.cpp:133:9: warning: [modernize-use-nodiscard]

    function 'horizon_invalidity' should be marked [[nodiscard]]

      133 |         std::optional< std::string > horizon_invalidity(
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector_geosciences/inspection/geology/structural_model_geology.cpp:166:9: warning: [modernize-use-nodiscard]

    function 'block_is_in_a_fault_block' should be marked [[nodiscard]]

      166 |         bool block_is_in_a_fault_block( const Block3D& block ) const
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector_geosciences/inspection/geology/structural_model_geology.cpp:170:32: error: [clang-diagnostic-error]

    reference to non-static member function must be called; did you mean to call it with no arguments?

      170 |                 if( collection.type == FaultBlock3D::component_type_static() )
          |                     ~~~~~~~~~~~^~~~
          |                                    ()
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/OpenGeode-0.0.0-ubuntu/include/geode/model/mixin/core/component_type.hpp:67:44: note: possible target for call
       67 |         [[nodiscard]] const ComponentType& type() const&
          |                                            ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/OpenGeode-0.0.0-ubuntu/include/geode/model/mixin/core/component_type.hpp:72:39: note: possible target for call
       72 |         [[nodiscard]] ComponentType&& type() &&
          |                                       ^
  • tests/inspection/test-structural-model-inspection.cpp:40:6: warning: [misc-use-internal-linkage]

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

       40 | void check_model_A2()
          |      ^
          | static 
  • tests/inspection/test-structural-model-inspection.cpp:40:6: warning: [readability-identifier-naming]

    invalid case style for global function 'check_model_A2'

       40 | void check_model_A2()
          |      ^~~~~~~~~~~~~~
          |      check_model_a2
  • tests/inspection/test-structural-model-inspection.cpp:51:54: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

       51 |     const geode::index_t expected_nb_geology_issues{ model.nb_blocks() * 2
          |                                                      ^~~~~~~~~~~~~~~~~~~~~
          |                                                      (                    )
  • tests/inspection/test-structural-model-inspection.cpp:64:6: warning: [misc-use-internal-linkage]

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

       64 | void check_implicit_model()
          |      ^
          | static 

Have any feedback or feature suggestions? Share it here.

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