korpling / annatto

Converts linguistic data formats based on the graphANNIS data model as intermediate representation and can apply consistency tests.
Apache License 2.0
1 stars 0 forks source link

Warn about using "unwrap()" in clippy #253

Closed thomaskrause closed 3 months ago

thomaskrause commented 3 months ago

This adds the clippy::unwrap_used check to the library.

To fix the warnings, instead of unwrapping something (something.unwrap()), you can convert the Option to an error:


something.ok_or_else(|| {
                anyhow!("Some context about the error")
})?
``
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 68.96552% with 18 lines in your changes missing coverage. Please review.

Project coverage is 81.56%. Comparing base (7c6fc56) to head (4222b01).

:exclamation: Current head 4222b01 differs from pull request most recent head 4c28c92

Please upload reports for the commit 4c28c92 to get more accurate results.

Files Patch % Lines
src/manipulator/check.rs 69.09% 15 Missing and 2 partials :warning:
src/manipulator/re.rs 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #253 +/- ## ========================================== + Coverage 81.36% 81.56% +0.19% ========================================== Files 41 40 -1 Lines 15453 14192 -1261 Branches 15453 14192 -1261 ========================================== - Hits 12573 11575 -998 + Misses 1139 1018 -121 + Partials 1741 1599 -142 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.