hdf5libs
Unit Tests
| Test | Status |
|---|---|
| HDF5WriteReadTimeSlice_test | ✅ Passed |
| HDF5WriteReadTriggerRecord_test | ✅ Passed |
Clang Formatting
| File | Status |
|---|---|
| include/hdf5libs/HDF5FileLayout.hpp | ✅ Already formatted |
| include/hdf5libs/HDF5FileLayoutParameters.hpp | ❌ Needs formatting |
| include/hdf5libs/HDF5RawDataFile.hpp | ❌ Needs formatting |
| include/hdf5libs/HDF5SourceIDHandler.hpp | ❌ Needs formatting |
| pybindsrc/hdf5rawdatafile.cpp | ❌ Needs formatting |
| pybindsrc/module.cpp | ✅ Already formatted |
| src/HDF5FileLayout.cpp | ❌ Needs formatting |
| src/HDF5RawDataFile.cpp | ❌ Needs formatting |
| src/HDF5SourceIDHandler.cpp | ❌ Needs formatting |
| unittest/HDF5WriteReadTimeSlice_test.cxx | ❌ Needs formatting |
| unittest/HDF5WriteReadTriggerRecord_test.cxx | ✅ Already formatted |
include/hdf5libs/HDF5FileLayoutParameters.hpp
Errors
- Line 33: Single-parameter constructors should be marked explicit.
- Line 40: Single-parameter constructors should be marked explicit.
- Line 72: Single-parameter constructors should be marked explicit.
- Line 85: Single-parameter constructors should be marked explicit.
- Line 68: Add #include
for string
include/hdf5libs/HDF5RawDataFile.hpp
Errors
- Line 171: Access specifier "public" has already appeared in class HDF5RawDataFile
- Line 182: Access specifier "public" has already appeared in class HDF5RawDataFile
- Line 455: Access specifier "private" has already appeared in class HDF5RawDataFile
- Line 482: Add #include
for tuple<>
include/hdf5libs/test/HDF5TestUtils.hpp
Errors
- Line 11: #ifndef header guard has wrong style, please use: HDF5LIBS_INCLUDE_HDF5LIBS_TEST_HDF5TESTUTILS_HPP_
- Line 99: #endif line should be "#endif // HDF5LIBS_INCLUDE_HDF5LIBS_TEST_HDF5TESTUTILS_HPP_"
- Line 53: An unsigned integer appears to be used here.
- Line 56: An unsigned integer appears to be used here.
- Line 57: An unsigned integer appears to be used here.
pybindsrc/hdf5rawdatafile.cpp
Warnings
- Line 21: nested namespaces can be concatenated
- Line 133: initialization of 's_inprogress_suffix' with static storage duration may throw an exception that cannot be caught
- Line 163: redundant get() call on smart pointer
- Line 171: redundant access specifier has the same accessibility as the previous access specifier
- Line 394: do not declare C-style arrays, use std::array<> instead
- Line 34: nested namespaces can be concatenated
- Line 20: nested namespaces can be concatenated
pybindsrc/module.cpp
Warnings
- Line 14: nested namespaces can be concatenated
src/HDF5FileLayout.cpp
Warnings
- Line 21: nested namespaces can be concatenated
- Line 14: nested namespaces can be concatenated
src/HDF5RawDataFile.cpp
Errors
- Line 596: An unsigned integer appears to be used here.
- Line 894: An unsigned integer appears to be used here.
- Line 917: An unsigned integer appears to be used here.
- Line 936: An unsigned integer appears to be used here.
- Line 941: An unsigned integer appears to be used here.
- Line 942: An unsigned integer appears to be used here.
- Line 285: Add #include
for tuple<>
Warnings
- Line 21: nested namespaces can be concatenated
- Line 133: initialization of 's_inprogress_suffix' with static storage duration may throw an exception that cannot be caught
- Line 163: redundant get() call on smart pointer
- Line 171: redundant access specifier has the same accessibility as the previous access specifier
- Line 394: do not declare C-style arrays, use std::array<> instead
- Line 34: nested namespaces can be concatenated
- Line 22: nested namespaces can be concatenated
- Line 93: redundant get() call on smart pointer
- Line 246: do not use C-style cast to convert between unrelated types
- Line 246: C-style casts are discouraged; use reinterpret_cast
- Line 291: the const qualified variable 'dataset_name' is copy-constructed from a const reference; consider making it a const reference
- Line 430: use auto when initializing with a template cast to avoid duplicating the type name
- Line 457: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead
- Line 465: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead
- Line 682: object backing the pointer will be destroyed at the end of the full-expression
- Line 753: object backing the pointer will be destroyed at the end of the full-expression
- Line 813: object backing the pointer will be destroyed at the end of the full-expression
- Line 824: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop
- Line 911: object backing the pointer will be destroyed at the end of the full-expression
- Line 930: object backing the pointer will be destroyed at the end of the full-expression
- Line 955: object backing the pointer will be destroyed at the end of the full-expression
- Line 967: object backing the pointer will be destroyed at the end of the full-expression
- Line 979: object backing the pointer will be destroyed at the end of the full-expression
- Line 992: object backing the pointer will be destroyed at the end of the full-expression
- Line 1004: object backing the pointer will be destroyed at the end of the full-expression
- Line 1025: object backing the pointer will be destroyed at the end of the full-expression
- Line 1045: object backing the pointer will be destroyed at the end of the full-expression
- Line 1054: do not declare C-style arrays, use std::array<> instead
- Line 1065: do not declare C-style arrays, use std::array<> instead
- Line 1086: object backing the pointer will be destroyed at the end of the full-expression
- Line 1175: object backing the pointer will be destroyed at the end of the full-expression
- Line 1200: object backing the pointer will be destroyed at the end of the full-expression
- Line 1235: object backing the pointer will be destroyed at the end of the full-expression
- Line 1248: object backing the pointer will be destroyed at the end of the full-expression
src/HDF5SourceIDHandler.cpp
Errors
- Line 22: An unsigned integer appears to be used here.
- Line 25: An unsigned integer appears to be used here.
- Line 26: An unsigned integer appears to be used here.
- Line 122: A catch-all-exceptions construct was found in a file which doesn't contain int main(); this can only be used to wrap main()
- Line 145: A catch-all-exceptions construct was found in a file which doesn't contain int main(); this can only be used to wrap main()
- Line 159: A catch-all-exceptions construct was found in a file which doesn't contain int main(); this can only be used to wrap main()
- Line 172: A catch-all-exceptions construct was found in a file which doesn't contain int main(); this can only be used to wrap main()
- Line 185: A catch-all-exceptions construct was found in a file which doesn't contain int main(); this can only be used to wrap main()
- Line 308: An unsigned integer appears to be used here.
- Line 328: An unsigned integer appears to be used here.
- Line 398: Add #include
for string - Line 367: Add #include
for vector<> - Line 405: Add #include
for set<>
Warnings
- Line 34: nested namespaces can be concatenated
- Line 19: nested namespaces can be concatenated
- Line 64: narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined
- Line 64: narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined
- Line 64: narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined
- Line 64: narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined
- Line 339: use auto when initializing with a cast to avoid duplicating the type name
- Line 340: use auto when initializing with a cast to avoid duplicating the type name
- Line 350: use auto when initializing with a cast to avoid duplicating the type name
- Line 352: use auto when initializing with a cast to avoid duplicating the type name
- Line 363: use auto when initializing with a cast to avoid duplicating the type name
- Line 365: use auto when initializing with a cast to avoid duplicating the type name
- Line 369: loop variable is copied but only used as const reference; consider making it a const reference
- Line 382: use auto when initializing with a cast to avoid duplicating the type name
- Line 387: use auto when initializing with a cast to avoid duplicating the type name
- Line 389: use auto when initializing with a cast to avoid duplicating the type name
- Line 403: use auto when initializing with a cast to avoid duplicating the type name
- Line 408: use auto when initializing with a cast to avoid duplicating the type name
- Line 410: use auto when initializing with a cast to avoid duplicating the type name
test/apps/HDF5LIBS_TestDumpRecord.cpp
Errors
- Line 82: C-style comment syntax detected; please use either C++ style "//" or Doxygen style
- Line 36: "cout" should not be used for output in DUNE DAQ software.
- Line 38: "cout" should not be used for output in DUNE DAQ software.
- Line 39: "cout" should not be used for output in DUNE DAQ software.
- Line 47: Consider using gmtime_r(...) instead of gmtime(...) for improved thread safety.
- Line 48: Consider using asctime_r(...) instead of asctime(...) for improved thread safety.
- Line 50: Using deprecated casting style. Use static_cast
(...) instead - Line 171: "cout" should not be used for output in DUNE DAQ software.
- Line 172: "cout" should not be used for output in DUNE DAQ software.
- Line 177: "cout" should not be used for output in DUNE DAQ software.
- Line 178: "cout" should not be used for output in DUNE DAQ software.
- Line 239: An unsigned integer appears to be used here.
- Line 243: An unsigned integer appears to be used here.
- Line 244: An unsigned integer appears to be used here.
- Line 245: An unsigned integer appears to be used here.
- Line 246: An unsigned integer appears to be used here.
- Line 266: Use of reinterpret_cast can be dangerous. If there's no way to avoid its use add " // NOLINT" to the end of this line so this script will ignore it next time
- Line 266: An unsigned integer appears to be used here.
- Line 287: Use of reinterpret_cast can be dangerous. If there's no way to avoid its use add " // NOLINT" to the end of this line so this script will ignore it next time
- Line 287: An unsigned integer appears to be used here.
- Line 303: Use of reinterpret_cast can be dangerous. If there's no way to avoid its use add " // NOLINT" to the end of this line so this script will ignore it next time
- Line 303: An unsigned integer appears to be used here.
- Line 323: Use of reinterpret_cast can be dangerous. If there's no way to avoid its use add " // NOLINT" to the end of this line so this script will ignore it next time
- Line 323: An unsigned integer appears to be used here.
- Line 333: "cout" should not be used for output in DUNE DAQ software.
- Line 334: "cout" should not be used for output in DUNE DAQ software.
- Line 340: "cout" should not be used for output in DUNE DAQ software.
- Line 341: "cout" should not be used for output in DUNE DAQ software.
- Line 374: An unsigned integer appears to be used here.
- Line 375: An unsigned integer appears to be used here.
- Line 395: An unsigned integer appears to be used here.
- Line 417: "cout" should not be used for output in DUNE DAQ software.
- Line 192: Add #include
for set<> - Line 239: Add #include
for vector<>
Warnings
- Line 21: nested namespaces can be concatenated
- Line 133: initialization of 's_inprogress_suffix' with static storage duration may throw an exception that cannot be caught
- Line 163: redundant get() call on smart pointer
- Line 171: redundant access specifier has the same accessibility as the previous access specifier
- Line 394: do not declare C-style arrays, use std::array<> instead
- Line 34: nested namespaces can be concatenated
- Line 25: inclusion of deprecated C++ header 'time.h'; consider using 'ctime' instead
- Line 46: narrowing conversion from 'timestamp_t' (aka 'unsigned long') to signed type 'time_t' (aka 'long') is implementation-defined
- Line 50: narrowing conversion from 'double' to 'size_t' (aka 'unsigned long')
- Line 50: C-style casts are discouraged; use static_cast
- Line 67: variable 'opt' is not initialized
- Line 68: narrowing conversion from 'int' to signed type 'signed char' is implementation-defined
- Line 71: do not use pointer arithmetic
- Line 74: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead
- Line 77: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead
- Line 83: do not use pointer arithmetic
- Line 89: do not use pointer arithmetic
- Line 91: do not use pointer arithmetic
- Line 95: do not use pointer arithmetic
- Line 103: use auto when initializing with a template cast to avoid duplicating the type name
- Line 208: narrowing conversion from 'timestamp_t' (aka 'unsigned long') to signed type 'int64_t' (aka 'long') is implementation-defined
- Line 209: narrowing conversion from 'timestamp_t' (aka 'unsigned long') to signed type 'int64_t' (aka 'long') is implementation-defined
- Line 210: narrowing conversion from 'timestamp_t' (aka 'unsigned long') to signed type 'int64_t' (aka 'long') is implementation-defined
- Line 211: narrowing conversion from 'timestamp_t' (aka 'unsigned long') to signed type 'int64_t' (aka 'long') is implementation-defined
- Line 265: use auto when initializing with a cast to avoid duplicating the type name
- Line 266: do not use reinterpret_cast
- Line 266: do not use pointer arithmetic
- Line 266: do not use reinterpret_cast
- Line 269: narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int' is implementation-defined
- Line 271: use auto when initializing with a cast to avoid duplicating the type name
- Line 286: use auto when initializing with a cast to avoid duplicating the type name
- Line 287: do not use reinterpret_cast
- Line 287: do not use pointer arithmetic
- Line 287: do not use reinterpret_cast
- Line 302: use auto when initializing with a cast to avoid duplicating the type name
- Line 303: do not use reinterpret_cast
- Line 303: do not use pointer arithmetic
- Line 303: do not use reinterpret_cast
- Line 306: narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int' is implementation-defined
- Line 308: use auto when initializing with a cast to avoid duplicating the type name
- Line 322: use auto when initializing with a cast to avoid duplicating the type name
- Line 323: do not use reinterpret_cast
- Line 323: do not use pointer arithmetic
- Line 323: do not use reinterpret_cast
- Line 331: use auto when initializing with a cast to avoid duplicating the type name
- Line 363: use auto when initializing with a cast to avoid duplicating the type name
- Line 374: multiple declarations in a single statement reduces readability
- Line 374: variable 'bit_pos' is not initialized
- Line 374: variable 'bit_sniff' is not initialized
test/apps/HDF5LIBS_TestReader.cpp
Warnings
- Line 21: nested namespaces can be concatenated
- Line 133: initialization of 's_inprogress_suffix' with static storage duration may throw an exception that cannot be caught
- Line 163: redundant get() call on smart pointer
- Line 171: redundant access specifier has the same accessibility as the previous access specifier
- Line 394: do not declare C-style arrays, use std::array<> instead
- Line 34: nested namespaces can be concatenated
- Line 40: do not use pointer arithmetic
test/apps/HDF5LIBS_TestRecoverFile.cpp
Errors
- Line 45: C-style comment syntax detected; please use either C++ style "//" or Doxygen style
- Line 27: "cout" should not be used for output in DUNE DAQ software.
- Line 28: "cout" should not be used for output in DUNE DAQ software.
- Line 29: "cout" should not be used for output in DUNE DAQ software.
- Line 124: "cout" should not be used for output in DUNE DAQ software.
- Line 125: "cout" should not be used for output in DUNE DAQ software.
- Line 126: "cout" should not be used for output in DUNE DAQ software.
- Line 136: "cout" should not be used for output in DUNE DAQ software.
- Line 140: "cout" should not be used for output in DUNE DAQ software.
- Line 145: "cout" should not be used for output in DUNE DAQ software.
- Line 150: "cout" should not be used for output in DUNE DAQ software.
- Line 153: "cout" should not be used for output in DUNE DAQ software.
- Line 160: "cout" should not be used for output in DUNE DAQ software.
- Line 164: "cout" should not be used for output in DUNE DAQ software.
- Line 173: "cout" should not be used for output in DUNE DAQ software.
- Line 184: Consider using gmtime_r(...) instead of gmtime(...) for improved thread safety.
- Line 185: "cout" should not be used for output in DUNE DAQ software.
- Line 187: Consider using asctime_r(...) instead of asctime(...) for improved thread safety.
- Line 191: "cout" should not be used for output in DUNE DAQ software.
- Line 196: Consider using gmtime_r(...) instead of gmtime(...) for improved thread safety.
- Line 197: "cout" should not be used for output in DUNE DAQ software.
- Line 199: Consider using asctime_r(...) instead of asctime(...) for improved thread safety.
- Line 204: "cout" should not be used for output in DUNE DAQ software.
- Line 207: "cout" should not be used for output in DUNE DAQ software.
- Line 213: "cout" should not be used for output in DUNE DAQ software.
- Line 217: Consider using gmtime_r(...) instead of gmtime(...) for improved thread safety.
- Line 218: "cout" should not be used for output in DUNE DAQ software.
- Line 220: Consider using asctime_r(...) instead of asctime(...) for improved thread safety.
- Line 224: "cout" should not be used for output in DUNE DAQ software.
- Line 227: "cout" should not be used for output in DUNE DAQ software.
- Line 61: Add #include
for unique_ptr<> - Line 94: Add #include
for set<> - Line 105: Add #include
for vector<>
Warnings
- Line 21: nested namespaces can be concatenated
- Line 133: initialization of 's_inprogress_suffix' with static storage duration may throw an exception that cannot be caught
- Line 163: redundant get() call on smart pointer
- Line 171: redundant access specifier has the same accessibility as the previous access specifier
- Line 394: do not declare C-style arrays, use std::array<> instead
- Line 34: nested namespaces can be concatenated
- Line 18: inclusion of deprecated C++ header 'time.h'; consider using 'ctime' instead
- Line 36: variable 'opt' is not initialized
- Line 37: narrowing conversion from 'int' to signed type 'signed char' is implementation-defined
- Line 40: do not use pointer arithmetic
- Line 46: do not use pointer arithmetic
- Line 52: do not use pointer arithmetic
- Line 54: do not use pointer arithmetic
- Line 58: do not use pointer arithmetic
- Line 115: use nullptr
- Line 163: use auto when initializing with a template cast to avoid duplicating the type name
- Line 180: use nullptr
- Line 215: use auto when initializing with a template cast to avoid duplicating the type name
test/apps/HDF5LIBS_TestWriter.cpp
Errors
- Line 140: An unsigned integer appears to be used here.
Warnings
- Line 21: nested namespaces can be concatenated
- Line 133: initialization of 's_inprogress_suffix' with static storage duration may throw an exception that cannot be caught
- Line 163: redundant get() call on smart pointer
- Line 171: redundant access specifier has the same accessibility as the previous access specifier
- Line 394: do not declare C-style arrays, use std::array<> instead
- Line 34: nested namespaces can be concatenated
- Line 45: do not use pointer arithmetic
- Line 46: do not use pointer arithmetic
- Line 47: do not use pointer arithmetic
- Line 48: do not use pointer arithmetic
- Line 52: multiple declarations in a single statement reduces readability
- Line 72: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined
unittest/HDF5WriteReadTimeSlice_test.cxx
Errors
- Line 107: An unsigned integer appears to be used here.
- Line 133: An unsigned integer appears to be used here.
- Line 151: Constructors callable with one argument should be marked explicit.
- Line 220: If an else has a brace on one side, it should have it on both
Warnings
- Line 21: nested namespaces can be concatenated
- Line 133: initialization of 's_inprogress_suffix' with static storage duration may throw an exception that cannot be caught
- Line 163: redundant get() call on smart pointer
- Line 171: redundant access specifier has the same accessibility as the previous access specifier
- Line 394: do not declare C-style arrays, use std::array<> instead
- Line 34: nested namespaces can be concatenated
- Line 21: nested namespaces can be concatenated
- Line 26: function 'get_files_matching_pattern' defined in a header file; function definitions in header files can lead to ODR violations
- Line 39: function 'delete_files_matching_pattern' defined in a header file; function definitions in header files can lead to ODR violations
- Line 54: function 'encode_geoid' defined in a header file; function definitions in header files can lead to ODR violations
- Line 61: function 'create_srcid_geoid_map' defined in a header file; function definitions in header files can lead to ODR violations
- Line 33: initialization of 'application_name' with static storage duration may throw an exception that cannot be caught
- Line 157: The parameter must not be null
unittest/HDF5WriteReadTriggerRecord_test.cxx
Errors
- Line 120: An unsigned integer appears to be used here.
- Line 154: An unsigned integer appears to be used here.
- Line 180: An unsigned integer appears to be used here.
- Line 206: An unsigned integer appears to be used here.
- Line 231: An unsigned integer appears to be used here.
- Line 245: Small and focused functions are preferred: create_trigger_record() has 84 non-comment lines (error triggered by exceeding 80 lines) (disable this by putting "// NOLINT" after the function's closing brace.)
- Line 249: An unsigned integer appears to be used here.
- Line 249: Constructors callable with one argument should be marked explicit.
- Line 272: An unsigned integer appears to be used here.
- Line 466: An unsigned integer appears to be used here.
- Line 467: An unsigned integer appears to be used here.
Warnings
- Line 21: nested namespaces can be concatenated
- Line 133: initialization of 's_inprogress_suffix' with static storage duration may throw an exception that cannot be caught
- Line 163: redundant get() call on smart pointer
- Line 171: redundant access specifier has the same accessibility as the previous access specifier
- Line 394: do not declare C-style arrays, use std::array<> instead
- Line 34: nested namespaces can be concatenated
- Line 21: nested namespaces can be concatenated
- Line 26: function 'get_files_matching_pattern' defined in a header file; function definitions in header files can lead to ODR violations
- Line 39: function 'delete_files_matching_pattern' defined in a header file; function definitions in header files can lead to ODR violations
- Line 54: function 'encode_geoid' defined in a header file; function definitions in header files can lead to ODR violations
- Line 61: function 'create_srcid_geoid_map' defined in a header file; function definitions in header files can lead to ODR violations
- Line 33: initialization of 'application_name' with static storage duration may throw an exception that cannot be caught
- Line 253: The parameter must not be null