Skip to content

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Jan 14, 2026

Summary

  • Add #![allow(unused_assignments)] to suppress false positives from thiserror/miette macro-generated code
  • Improve error messages to use previously unused fields for better debugging context

Changes

Error variants now include more context in their messages:

  • ConfigFileNotFound, ConfigReadFailed, ConfigWriteFailed - now show path
  • ConfigValidationFailed - now shows list of issues
  • ProviderConfigResolutionFailed - now shows details
  • AgeIdentityNotFound, AgeIdentityReadFailed - now show path
  • AgeIdentityParseFailed, AgeEncryptionFailed, AgeDecryptionFailed - now show details

Test plan

  • cargo clippy passes with no warnings

🤖 Generated with Claude Code


Note

Improves diagnostics and eliminates clippy noise in src/error.rs.

  • Adds crate-level #![allow(unused_assignments)] to avoid false positives from thiserror/miette macro-generated code
  • Enhances error messages to surface previously unused fields:
    • Config errors (ConfigFileNotFound, ConfigReadFailed, ConfigWriteFailed) now include path; ConfigValidationFailed prints issues
    • Provider errors (ProviderConfigResolutionFailed) now include details
    • Age encryption errors (AgeIdentityNotFound, AgeIdentityReadFailed) now include path; (AgeIdentityParseFailed, AgeEncryptionFailed, AgeDecryptionFailed) include details
  • Minor copy tweaks to help text for clarity

Written by Cursor Bugbot for commit 55d98ad. This will update automatically on new commits. Configure here.

- Add #![allow(unused_assignments)] to suppress false positives from
  thiserror/miette macro-generated code
- Improve error messages to use previously unused fields:
  - ConfigFileNotFound, ConfigReadFailed, ConfigWriteFailed now show path
  - ConfigValidationFailed now shows list of issues
  - ProviderConfigResolutionFailed now shows details
  - AgeIdentityNotFound, AgeIdentityReadFailed now show path
  - AgeIdentityParseFailed, AgeEncryptionFailed, AgeDecryptionFailed now show details

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 14, 2026 17:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR resolves clippy unused_assignments warnings in error.rs by adding a module-level allow directive and improving error message formatting to include previously unused fields.

Changes:

  • Added #![allow(unused_assignments)] to suppress false positives from thiserror/miette macro-generated code
  • Enhanced error messages to include contextual information from struct fields (paths, details, issues)
  • Updated one help message to reference "above" instead of "below" to match the new error format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

#[diagnostic(
code(fnox::config::validation_failed),
help("Review the errors below and update your fnox.toml file")
help("Review the errors above and update your fnox.toml file")
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help message refers to 'errors above' but the actual validation issues appear inline within the error message itself (joined with newlines), not above it in the output. Consider changing to 'Review the validation issues and update your fnox.toml file' for clarity.

Suggested change
help("Review the errors above and update your fnox.toml file")
help("Review the validation issues and update your fnox.toml file")

Copilot uses AI. Check for mistakes.
@jdx jdx merged commit a0402b0 into main Jan 14, 2026
19 checks passed
@jdx jdx deleted the fix-clippy-warnings branch January 14, 2026 18:16
jdx pushed a commit that referenced this pull request Jan 17, 2026
## [1.8.0](https://github.com/jdx/fnox/compare/v1.7.0..v1.8.0) -
2026-01-17

### 🚀 Features

- add passwordstate provider by
[@davidolrik](https://github.com/davidolrik) in
[#147](#147)
- aws-ps batch concurrency, aws-kms 10 -> 100 concurrency by
[@johnpyp](https://github.com/johnpyp) in
[#180](#180)

### 🐛 Bug Fixes

- resolve clippy unused_assignments warnings in error.rs by
[@jdx](https://github.com/jdx) in
[#174](#174)
- improve AWS SDK error messages and enable SSO support by
[@daghoidahl](https://github.com/daghoidahl) in
[#173](#173)

### 📚 Documentation

- add AWS Parameter store to sidebar and provider lists by
[@johnpyp](https://github.com/johnpyp) in
[#178](#178)

### 🧪 Testing

- Add missing skip logic to aws_parameter_store.bats by
[@jdx](https://github.com/jdx) in
[#145](#145)

### 🛡️ Security

- **(deps)** update azure-sdk-for-rust monorepo to 0.30 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#144](#144)

### 📦️ Dependency Updates

- pin dependencies by [@renovate[bot]](https://github.com/renovate[bot])
in [#133](#133)
- update rust crate demand to v1.8.0 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#134](#134)
- lock file maintenance by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#137](#137)
- update rust crate usage-lib to v2.9.0 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#143](#143)
- update rust crate age to v0.11.2 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#149](#149)
- update aws-sdk-rust monorepo to v1.8.12 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#148](#148)
- update rust crate gcp_auth to v0.12.5 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#151](#151)
- update rust crate dbus to v0.9.10 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#150](#150)
- update rust crate google-cloud-secretmanager-v1 to v1.2.0 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#153](#153)
- update rust crate reqwest to v0.12.25 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#152](#152)
- lock file maintenance by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#154](#154)
- update dependency vue to v3.5.26 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#156](#156)
- update rust crate console to v0.16.2 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#157](#157)
- lock file maintenance by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#162](#162)
- update rust crate arc-swap to v1.8.0 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#167](#167)
- update rust crate chrono to v0.4.43 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#176](#176)
- update aws-sdk-rust monorepo to v1.98.0 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#177](#177)

### New Contributors

- @johnpyp made their first contribution in
[#180](#180)
- @daghoidahl made their first contribution in
[#173](#173)
- @davidolrik made their first contribution in
[#147](#147)
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.

2 participants