Skip to content

feat(Attributes): add no-value property support - #195

Open
BenPinet wants to merge 2 commits into
v18from
feat/add_no_value_property_to_attribute
Open

feat(Attributes): add no-value property support#195
BenPinet wants to merge 2 commits into
v18from
feat/add_no_value_property_to_attribute

Conversation

@BenPinet

Copy link
Copy Markdown
Member

No description provided.

@BenPinet
BenPinet requested a review from BotellaA July 29, 2026 13:57
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 68 concern(s)
  • include/geode/io/image/detail/vtk_output.hpp:34:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

       34 | namespace geode
          | ^~~~~~~~~~~~~~~
       35 | {
          | ~
       36 |     namespace detail
          |     ~~~~~~~~~~~~~~~~
          |     namespace geode::detail
  • include/geode/io/image/detail/vtk_output.hpp:39:15: warning: [cppcoreguidelines-special-member-functions]

    class 'VTKOutputImpl' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator

       39 |         class VTKOutputImpl
          |               ^
  • include/geode/io/image/detail/vtk_output.hpp:62:21: warning: [hicpp-use-equals-default]

    use '= default' to define a trivial destructor

       62 |             virtual ~VTKOutputImpl() {}
          |                     ^                ~~
          |                                      = default;
  • include/geode/io/image/detail/vtk_output.hpp:82:18: warning: [readability-function-cognitive-complexity]

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

       82 |             void write_attributes( pugi::xml_node& attribute_node,
          |                  ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/image/detail/vtk_output.hpp:86:17: note: +1, including nesting penalty of 0, nesting level increased to 1
       86 |                 for( const auto& id : manager.attribute_ids() )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/image/detail/vtk_output.hpp:89:21: note: +2, including nesting penalty of 1, nesting level increased to 2
       89 |                     if( !attribute || !attribute->is_genericable() )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/image/detail/vtk_output.hpp:89:36: note: +1
       89 |                     if( !attribute || !attribute->is_genericable() )
          |                                    ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/image/detail/vtk_output.hpp:98:21: note: +2, including nesting penalty of 1, nesting level increased to 2
       98 |                     for( const auto e : elements )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/image/detail/vtk_output.hpp:100:25: note: +3, including nesting penalty of 2, nesting level increased to 3
      100 |                         for( const auto i : LRange{ attribute->nb_items() } )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/image/detail/vtk_output.hpp:102:29: note: +4, including nesting penalty of 3, nesting level increased to 4
      102 |                             if( !attribute->has_value( e ) )
          |                             ^
  • include/geode/io/image/detail/vtk_output.hpp:86:34: warning: [readability-identifier-length]

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

       86 |                 for( const auto& id : manager.attribute_ids() )
          |                                  ^
  • include/geode/io/mesh/detail/vtk_input.hpp:42:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

       42 | namespace geode
          | ^~~~~~~~~~~~~~~
       43 | {
          | ~
       44 |     namespace detail
          |     ~~~~~~~~~~~~~~~~
          |     namespace geode::detail
  • include/geode/io/mesh/detail/vtk_input.hpp:47:15: warning: [cppcoreguidelines-special-member-functions]

    class 'VTKInputImpl' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator

       47 |         class VTKInputImpl
          |               ^
  • include/geode/io/mesh/detail/vtk_input.hpp:62:13: error: [clang-diagnostic-error]

    unknown type name 'Percentage'

       62 |             Percentage is_loadable()
          |             ^
  • include/geode/io/mesh/detail/vtk_input.hpp:65:30: error: [clang-diagnostic-error]

    use of undeclared identifier 'Percentage'

       65 |                 std::vector< Percentage > percentages;
          |                              ^
  • include/geode/io/mesh/detail/vtk_input.hpp:72:28: error: [clang-diagnostic-error]

    use of undeclared identifier 'Percentage'

       72 |                     return Percentage{ 0 };
          |                            ^
  • include/geode/io/mesh/detail/vtk_input.hpp:72:38: error: [clang-diagnostic-error]

    expected ';' after return statement

       72 |                     return Percentage{ 0 };
          |                                      ^
          |                                      ;
  • include/geode/io/mesh/detail/vtk_input.hpp:80:24: error: [clang-diagnostic-error]

    use of undeclared identifier 'Percentage'

       80 |                 return Percentage{ value / nb_percentages };
          |                        ^
  • include/geode/io/mesh/detail/vtk_input.hpp:80:34: error: [clang-diagnostic-error]

    expected ';' after return statement

       80 |                 return Percentage{ value / nb_percentages };
          |                                  ^
          |                                  ;
  • include/geode/io/mesh/detail/vtk_input.hpp:100:30: error: [clang-diagnostic-error]

    use of undeclared identifier 'Percentage'

      100 |                 std::vector< Percentage >& percentages ) const = 0;
          |                              ^
  • include/geode/io/mesh/detail/vtk_input.hpp:127:24: error: [clang-diagnostic-error]

    use of undeclared identifier 'string_to_index'

      127 |                 return string_to_index(
          |                        ^
  • include/geode/io/mesh/detail/vtk_input.hpp:128:48: warning: [bugprone-suspicious-stringview-data-usage]

    result of a data() call may not be null terminated, provide size information to the callee to prevent potential issues

      128 |                     piece.attribute( attribute.data() ).value() );
          |                                      ~~~~~~~~~~^~~~
  • include/geode/io/mesh/detail/vtk_input.hpp:135:17: warning: [llvm-qualified-auto]

    'const auto format' can be declared as 'const auto *const format'

      135 |                 const auto format = data.attribute( "format" ).value();
          |                 ^~~~~~~~~~
          |                 const auto *const 
  • include/geode/io/mesh/detail/vtk_input.hpp:140:17: warning: [llvm-else-after-return]

    do not use 'else' after 'return'

      140 |                 else
          |                 ^~~~
      141 |                 {
          |                 ~
      142 |                     const auto data_string =
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~
      143 |                         absl::StripAsciiWhitespace( data.child_value() );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      144 |                     if( match( format, "ascii" ) )
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      145 |                     {
          |                     ~
      146 |                         auto string = to_string( data_string );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      147 |                         absl::RemoveExtraAsciiWhitespace( &string );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      148 |                         return read_ascii_integer_data_array< T >( string );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      149 |                     }
          |                     ~
      150 |                     return decode< T >( data_string );
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      151 |                 }
          |                 ~
  • include/geode/io/mesh/detail/vtk_input.hpp:158:17: warning: [llvm-qualified-auto]

    'const auto format' can be declared as 'const auto *const format'

      158 |                 const auto format = data.attribute( "format" ).value();
          |                 ^~~~~~~~~~
          |                 const auto *const 
  • include/geode/io/mesh/detail/vtk_input.hpp:163:17: warning: [llvm-else-after-return]

    do not use 'else' after 'return'

      163 |                 else
          |                 ^~~~
      164 |                 {
          |                 ~
      165 |                     const auto data_string =
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~
      166 |                         absl::StripAsciiWhitespace( data.child_value() );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      167 |                     if( match( format, "ascii" ) )
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      168 |                     {
          |                     ~
      169 |                         auto string = to_string( data_string );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      170 |                         absl::RemoveExtraAsciiWhitespace( &string );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      171 |                         return read_ascii_uint8_data_array< T >( string );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      172 |                     }
          |                     ~
      173 |                     return decode< T >( data_string );
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      174 |                 }
          |                 ~
  • include/geode/io/mesh/detail/vtk_input.hpp:181:17: warning: [llvm-qualified-auto]

    'const auto format' can be declared as 'const auto *const format'

      181 |                 const auto format = data.attribute( "format" ).value();
          |                 ^~~~~~~~~~
          |                 const auto *const 
  • include/geode/io/mesh/detail/vtk_input.hpp:186:17: warning: [llvm-else-after-return]

    do not use 'else' after 'return'

      186 |                 else
          |                 ^~~~
      187 |                 {
          |                 ~
      188 |                     const auto data_string =
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~
      189 |                         absl::StripAsciiWhitespace( data.child_value() );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      190 |                     if( match( format, "ascii" ) )
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      191 |                     {
          |                     ~
      192 |                         auto string = to_string( data_string );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      193 |                         absl::RemoveExtraAsciiWhitespace( &string );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      194 |                         return read_ascii_float_data_array< T >( string );
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      195 |                     }
          |                     ~
      196 |                     return decode< T >( data_string );
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      197 |                 }
          |                 ~
  • include/geode/io/mesh/detail/vtk_input.hpp:212:18: warning: [readability-function-size]

    function 'build_attribute' exceeds recommended size/complexity thresholds

      212 |             void build_attribute( AttributeManager& manager,
          |                  ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:212:18: note: 5 parameters (threshold 4)
  • include/geode/io/mesh/detail/vtk_input.hpp:261:18: warning: [readability-function-cognitive-complexity]

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

      261 |             void read_attribute_data( const pugi::xml_node& data,
          |                  ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:268:17: note: +1, including nesting penalty of 0, nesting level increased to 1
      268 |                 if( const auto data_nb_components =
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:274:17: note: +1, including nesting penalty of 0, nesting level increased to 1
      274 |                 if( match( data_array_type, "Float64" )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:275:21: note: +1
      275 |                     || match( data_array_type, "Float32" ) )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:283:22: note: +1, nesting level increased to 1
      283 |                 else if( match( data_array_type, "Int64" )
          |                      ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:286:26: note: +1
      286 |                          || match( data_array_type, "UInt64" ) )
          |                          ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:290:21: note: +2, including nesting penalty of 1, nesting level increased to 2
      290 |                     if( min_value >= 0
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:291:25: note: +1
      291 |                         && max_value < std::numeric_limits< index_t >::max() )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:299:21: note: +1, nesting level increased to 2
      299 |                     else
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:308:22: note: +1, nesting level increased to 1
      308 |                 else if( match( data_array_type, "Int8" ) )
          |                      ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:317:22: note: +1, nesting level increased to 1
      317 |                 else if( match( data_array_type, "UInt8" ) )
          |                      ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:327:17: note: +1, nesting level increased to 1
      327 |                 else
          |                 ^
  • include/geode/io/mesh/detail/vtk_input.hpp:265:17: warning: [llvm-qualified-auto]

    'const auto data_array_name' can be declared as 'const auto *const data_array_name'

      265 |                 const auto data_array_name = data.attribute( "Name" ).value();
          |                 ^~~~~~~~~~
          |                 const auto *const 
  • include/geode/io/mesh/detail/vtk_input.hpp:266:17: warning: [llvm-qualified-auto]

    'const auto data_array_type' can be declared as 'const auto *const data_array_type'

      266 |                 const auto data_array_type = data.attribute( "type" ).value();
          |                 ^~~~~~~~~~
          |                 const auto *const 
  • include/geode/io/mesh/detail/vtk_input.hpp:302:54: warning: [google-runtime-int]

    consider replacing 'long' with 'int64'

      302 |                             read_integer_data_array< long int >( data );
          |                                                      ^
  • include/geode/io/mesh/detail/vtk_input.hpp:303:42: warning: [google-runtime-int]

    consider replacing 'long' with 'int64'

      303 |                         build_attribute< long int >( attribute_manager,
          |                                          ^
  • include/geode/io/mesh/detail/vtk_input.hpp:375:18: warning: [readability-function-size]

    function 'create_attribute' exceeds recommended size/complexity thresholds

      375 |             void create_attribute( AttributeManager& manager,
          |                  ^
    /__w/OpenGeode-IO/OpenGeode-IO/include/geode/io/mesh/detail/vtk_input.hpp:375:18: note: 6 parameters (threshold 4)
  • include/geode/io/mesh/detail/vtk_input.hpp:397:37: warning: [readability-identifier-length]

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

      397 |                     for( const auto c : Range{ nb_components } )
          |                                     ^
  • include/geode/io/mesh/detail/vtk_input.hpp:399:56: warning: [readability-math-missing-parentheses]

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

      399 |                         const auto& new_value = values[nb_components * i + c];
          |                                                        ^~~~~~~~~~~~~~~~~
          |                                                        (                )
  • include/geode/io/mesh/detail/vtk_input.hpp:421:17: warning: [llvm-qualified-auto]

    'const auto compressor' can be declared as 'const auto *const compressor'

      421 |                 const auto compressor = root_.attribute( "compressor" ).value();
          |                 ^~~~~~~~~~
          |                 const auto *const 
  • include/geode/io/mesh/detail/vtk_input.hpp:473:39: warning: [cppcoreguidelines-pro-type-reinterpret-cast]

    do not use reinterpret_cast

      473 |                 const auto nb_data = *reinterpret_cast< const UInt* >(
          |                                       ^
  • include/geode/io/mesh/detail/vtk_input.hpp:480:37: warning: [cppcoreguidelines-pro-type-reinterpret-cast]

    do not use reinterpret_cast

      480 |                 const auto values = reinterpret_cast< const T* >(
          |                                     ^
  • include/geode/io/mesh/detail/vtk_input.hpp:501:37: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      501 |                         nb_values * 8. * sizeof( UInt ) / ( 6. * 4. ) ) );
          |                                     ^
  • include/geode/io/mesh/detail/vtk_input.hpp:501:61: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      501 |                         nb_values * 8. * sizeof( UInt ) / ( 6. * 4. ) ) );
          |                                                             ^
  • include/geode/io/mesh/detail/vtk_input.hpp:501:66: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      501 |                         nb_values * 8. * sizeof( UInt ) / ( 6. * 4. ) ) );
          |                                                                  ^
  • include/geode/io/mesh/detail/vtk_input.hpp:511:21: warning: [cppcoreguidelines-pro-type-reinterpret-cast]

    do not use reinterpret_cast

      511 |                     reinterpret_cast< const UInt* >(
          |                     ^
  • include/geode/io/mesh/detail/vtk_input.hpp:534:21: warning: [cppcoreguidelines-pro-type-reinterpret-cast]

    do not use reinterpret_cast

      534 |                     reinterpret_cast< const UInt* >(
          |                     ^
  • include/geode/io/mesh/detail/vtk_input.hpp:539:33: warning: [readability-identifier-length]

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

      539 |                 for( const auto b : Range{ nb_data_blocks } )
          |                                 ^
  • include/geode/io/mesh/detail/vtk_input.hpp:551:17: warning: [llvm-qualified-auto]

    'const auto compressed_data_bytes' can be declared as 'const auto *const compressed_data_bytes'

      551 |                 const auto compressed_data_bytes =
          |                 ^~~~~~~~~~
          |                 const auto *const 
  • include/geode/io/mesh/detail/vtk_input.hpp:552:21: warning: [cppcoreguidelines-pro-type-reinterpret-cast]

    do not use reinterpret_cast

      552 |                     reinterpret_cast< const unsigned char* >(
          |                     ^
  • include/geode/io/mesh/detail/vtk_input.hpp:560:33: warning: [readability-identifier-length]

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

      560 |                 for( const auto b : Range{ nb_data_blocks } )
          |                                 ^
  • include/geode/io/mesh/detail/vtk_input.hpp:564:21: warning: [google-runtime-int]

    consider replacing 'unsigned long' with 'uint64'

      564 |                     unsigned long decompressed_data_length =
          |                     ^
  • include/geode/io/mesh/detail/vtk_input.hpp:577:41: warning: [cppcoreguidelines-pro-type-reinterpret-cast]

    do not use reinterpret_cast

      577 |                     const auto values = reinterpret_cast< const T* >(
          |                                         ^
  • include/geode/io/mesh/detail/vtk_input.hpp:608:32: warning: [readability-identifier-length]

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

      608 |                     const auto ok = ( *string_convert )( string, &value );
          |                                ^
  • include/geode/io/mesh/detail/vtk_input.hpp:633:25: warning: [cert-err34-c]

    'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead

      633 |                         std::atoi( to_string( string ).c_str() ) );
          |                         ^
  • src/geode/io/mesh/csv_input_helpers.cpp:55:9: warning: [google-explicit-constructor]

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

       55 |         Impl( std::string_view filename )
          |         ^
          |         explicit 
  • src/geode/io/mesh/csv_input_helpers.cpp:129:36: warning: [readability-make-member-function-const]

    method 'split_line' can be made const

      129 |         std::vector< std::string > split_line( const std::string& line )
          |                                    ^                                    
          |                                                                          const
  • src/geode/io/mesh/csv_input_helpers.cpp:135:14: warning: [readability-function-cognitive-complexity]

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

      135 |         void set_attribute_on_vertex( const geode::index_t vertex_id,
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:142:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      142 |             if( vertex_id == 0 )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:144:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      144 |                 for( const auto col : geode::Range{ line_values.size() } )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:146:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      146 |                     if( col == x_column_ || col == y_column_
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:147:25: note: +1
      147 |                         || col == z_column_ )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:153:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      153 |                     if( !absl::SimpleAtod( line_values[col], &value ) )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:174:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      174 |             for( const auto col : geode::Range{ line_values.size() } )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:176:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      176 |                 if( col == x_column_ || col == y_column_ || col == z_column_ )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:176:58: note: +1
      176 |                 if( col == x_column_ || col == y_column_ || col == z_column_ )
          |                                                          ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:180:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      180 |                 if( double_attrs.contains( col ) )
          |                 ^
  • src/geode/io/mesh/csv_input_helpers.cpp:135:14: warning: [readability-function-size]

    function 'set_attribute_on_vertex' exceeds recommended size/complexity thresholds

      135 |         void set_attribute_on_vertex( const geode::index_t vertex_id,
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:135:14: note: 5 parameters (threshold 4)
  • src/geode/io/mesh/csv_input_helpers.cpp:135:14: warning: [readability-make-member-function-const]

    method 'set_attribute_on_vertex' can be made const

      135 |         void set_attribute_on_vertex( const geode::index_t vertex_id,
          |              ^
      136 |             const std::vector< std::string >& line_values,
      137 |             const std::vector< std::string >& headers,
      138 |             absl::flat_hash_map< index_t,
      139 |                 std::shared_ptr< VariableAttribute< double > > >& double_attrs,
      140 |             AttributeManager& attribute_manager )
          |                                                  
          |                                                   const
  • src/geode/io/mesh/csv_input_helpers.cpp:136:13: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'set_attribute_on_vertex' of similar type ('const std::vectorstd::string &') are easily swapped by mistake

      136 |             const std::vector< std::string >& line_values,
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      137 |             const std::vector< std::string >& headers,
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:136:47: note: the first parameter in the range is 'line_values'
      136 |             const std::vector< std::string >& line_values,
          |                                               ^~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/csv_input_helpers.cpp:137:47: note: the last parameter in the range is 'headers'
      137 |             const std::vector< std::string >& headers,
          |                                               ^~~~~~~
  • src/geode/io/mesh/csv_input_helpers.cpp:151:32: warning: [performance-unnecessary-copy-initialization]

    the const qualified variable 'attribute_name' is copy-constructed from a const reference; consider making it a const reference

      151 |                     const auto attribute_name = headers.at( col );
          |                                ^
          |                               &
  • src/geode/io/mesh/csv_input_helpers.cpp:157:21: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'default_values'

      157 |                     AttributeValues< double > default_values;
          |                     ^                                       
          |                                                             {}
  • tests/mesh/test-vti.cpp:44:6: warning: [misc-use-internal-linkage]

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

       44 | void put_attributes_on_grid( const geode::Grid3D& grid )
          |      ^
          | static 
  • tests/mesh/test-vti.cpp:46:5: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'default_values'

       46 |     geode::AttributeValues< geode::index_t > default_values;
          |     ^                                                      
          |                                                            {}
  • tests/mesh/test-vti.cpp:60:21: warning: [readability-identifier-length]

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

       60 |     for( const auto c : geode::Range{ grid.nb_cells() } )
          |                     ^
  • tests/mesh/test-vti.cpp:72:21: warning: [readability-identifier-length]

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

       72 |     for( const auto c : geode::Range{ grid.nb_grid_vertices() } )
          |                     ^
  • tests/mesh/test-vti.cpp:78:6: warning: [misc-use-internal-linkage]

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

       78 | void test_regular_grid( const geode::RegularGrid3D& grid )
          |      ^
          | static 
  • tests/mesh/test-vti.cpp:110:6: warning: [misc-use-internal-linkage]

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

      110 | void test_light_regular_grid( const geode::LightRegularGrid3D& grid )
          |      ^
          | static 
  • tests/mesh/test-vti.cpp:151:46: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      151 |             geode::Point3D{ { 1, 2, 3 } }, { 10, 20, 30 }, 1 );
          |                                              ^
  • tests/mesh/test-vti.cpp:151:50: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      151 |             geode::Point3D{ { 1, 2, 3 } }, { 10, 20, 30 }, 1 );
          |                                                  ^
  • tests/mesh/test-vti.cpp:151:54: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      151 |             geode::Point3D{ { 1, 2, 3 } }, { 10, 20, 30 }, 1 );
          |                                                      ^
  • tests/mesh/test-vti.cpp:156:15: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      156 |             { 10, 20, 30 }, { 1, 1, 1 } };
          |               ^
  • tests/mesh/test-vti.cpp:156:19: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      156 |             { 10, 20, 30 }, { 1, 1, 1 } };
          |                   ^
  • tests/mesh/test-vti.cpp:156:23: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      156 |             { 10, 20, 30 }, { 1, 1, 1 } };
          |                       ^
  • tests/model/test-gid.cpp:182:9: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'default_values'

      182 |         geode::AttributeValues< geode::index_t > default_values;
          |         ^                                                      
          |                                                                {}

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