Skip to content

fix: adjust linting#78

Merged
2bndy5 merged 1 commit intomainfrom
fix-clippy-lints
Aug 19, 2025
Merged

fix: adjust linting#78
2bndy5 merged 1 commit intomainfrom
fix-clippy-lints

Conversation

@2bndy5
Copy link
Member

@2bndy5 2bndy5 commented Aug 19, 2025

Rust linter (clippy)

A recent update to rust's clippy tool triggered several lint violations when not targeting Linux.

Some just required an explicitly anonymous lifetime for member functions that return buffer objects in the bindings.

Others were about unused structs on non-Linux platforms in the node.js binding. The solution for this one was to conditionally compile the structs for only Linux targets. This is not considered a breaking change because the type info remains the same regardless.

Pre-commit hooks

Updated the pre-commit hooks and ran them

Metadata

Some metadata changes were made to exclude linting the rust examples by default. This was done because the examples do not compile for all platforms. More attention is still needed on this subject (see #8).

To run the examples (still only on Linux), an extra arg is now required: -p examples. So, the command to run the getting-started example is now:

cargo run -p examples --bin getting-started

These metadata changes also incited changes to the nurfile about various command invoked in tasks.

CI workflows

I adjusted the lint CI workflow to check all rust packages (including examples) in the workspace (this repo).

I reviewed the caching of rust assets, which are only used when linting, testing, or documenting rust libraries.

@codecov
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.63%. Comparing base (e6ee240) to head (2f16082).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #78   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files          22       22           
  Lines        2734     2734           
=======================================
  Hits         2724     2724           
  Misses         10       10           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@2bndy5 2bndy5 changed the title fix: adjustments for linting fix: adjust linting Aug 19, 2025
## Rust linter (clippy)

A recent update to rust's `clippy` tool triggered several lint violations when not targeting Linux.

Some just required an explicitly anonymous lifetime for member functions that return buffer objects in the bindings.

Others were about unused structs on non-Linux platforms in the node.js binding.
The solution for this one was to conditionally compile the structs for only Linux targets.
This is not considered a breaking change because the type info remains the same regardless.

## Pre-commit hooks

Updated the pre-commit hooks and ran them

## Metadata

Some metadata changes were made to exclude linting the rust examples by default.
This was done because the examples do not compile for all platforms.
More attention is still needed on this subject (see #8).

To run the examples (still only on Linux), an extra arg is now required: `-p examples`.
So, the command to run the getting-started example is now:
```shell
cargo run -p examples --bin getting-started
```

These metadata changes also incited changes to the nurfile about various command invoked in tasks.

## CI workflows

I adjusted the lint CI workflow to check all rust packages (including examples) in the workspace (this repo).

I reviewed the caching of rust assets, which are only used when linting, testing, or documenting rust libraries.
@2bndy5 2bndy5 merged commit 024e75e into main Aug 19, 2025
40 checks passed
@2bndy5 2bndy5 deleted the fix-clippy-lints branch August 19, 2025 06:37
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.

1 participant