chore(test): consolidate hlint snake_case exceptions across codebase #967
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog
Context
This PR addresses code maintainability by consolidating duplicate hlint pragma comments that were scattered across 12 test files. Previously, each test file contained its own
{- HLINT ignore "Use camelCase" -}
pragma to allow snake_case naming conventions commonly used in Haskell test properties.The change centralizes this configuration into the root
.hlint.yaml
file, applying the exception globally to all test modules matching the patternsTest.Cardano.Api.**
andTest.Golden.Cardano.Api.**
. This approach:This allows #515 to be closed
How to trust this PR
This is a purely mechanical change that affects only hlint configuration and comments. The actual test code remains unchanged.
Verification steps:
hlint .
to verify no new warnings are introducedcabal test all
.hlint.yaml
rule correctly applies to the affected modulesFiles changed:
.hlint.yaml
: Added global rule to ignore "Use camelCase" warnings for test modules and "Use + directly" warning{- HLINT ignore "Use camelCase" -}
pragmas from:cardano-api/gen/Test/Hedgehog/Roundtrip/CBOR.hs
cardano-api/test/cardano-api-golden/Test/Golden/Cardano/Api/Script.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/Address.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/CBOR.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/Cip129.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/Envelope.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/Json.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/KeysByron.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/Ord.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/RawBytes.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/Transaction/Autobalance.hs
cardano-api/test/cardano-api-test/Test/Cardano/Api/TxBody.hs
Checklist