Skip to content

Commit 82c55a7

Browse files
committed
chore: add justified nolint for parseLayoutV3 complexity
Binary format parsing requires handling multiple HDF5 layout types (Compact, Contiguous, Chunked) with version differences, which results in inherent cognitive and cyclomatic complexity.
1 parent 1a25e86 commit 82c55a7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/core/datalayout.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ func determineChunkKeySize(superblockVersion uint8) uint8 {
7171
return 4
7272
}
7373

74+
// parseLayoutV3 parses HDF5 Data Layout Message version 3.
75+
// Cognitive complexity is high due to handling 3 distinct layout types
76+
// (Compact, Contiguous, Chunked) with different binary formats and
77+
// HDF5 version differences (32-bit vs 64-bit chunk dimensions).
78+
// This complexity is inherent to the HDF5 format specification.
79+
//
80+
//nolint:gocognit,cyclop // Binary format parsing requires handling multiple layout types
7481
func parseLayoutV3(data []byte, sb *Superblock, msg *DataLayoutMessage) (*DataLayoutMessage, error) {
7582
if len(data) < 2 {
7683
return nil, errors.New("layout v3 message too short")

0 commit comments

Comments
 (0)