Skip to content

chore: CTS update, workspace lints migration, and lint cleanup - #122

Merged
hiltontj merged 7 commits into
mainfrom
chore/cts-update-and-clippy
Jul 13, 2026
Merged

chore: CTS update, workspace lints migration, and lint cleanup#122
hiltontj merged 7 commits into
mainfrom
chore/cts-update-and-clippy

Conversation

@hiltontj

Copy link
Copy Markdown
Owner

Summary

Maintenance work, in six commits intended to be preserved via rebase/merge:

  1. Update the JSONPath Compliance Test Suite submodule (92777057be7c1f, 19 upstream commits). All compliance tests pass against the new cts.json.
  2. Update lint declarations for the current toolchain: clippy::empty_enum renamed to clippy::empty_enums; clippy::match_on_vec_items removed (dropped from clippy, covered by clippy::indexing_slicing).
  3. Fix mismatched_lifetime_syntaxes lints (76 sites, via cargo clippy --fix).
  4. Migrate lints to [workspace.lints] in the root Cargo.toml, replacing the duplicated attribute blocks in each lib.rs. This newly lints the serde_json_path_macros_internal crate and test targets; the resulting findings are fixed in the same commit.
  5. Trim the lint set to essentials. The old list was inherited from axum; removed lints that are on by default, target async/IO/float code this library doesn't have, or are pedantic/restriction lints without value for a maintenance-mode crate. Retained: missing_docs, missing_debug_implementations, unreachable_pub, unsafe_code, rust_2018_idioms, clippy::dbg_macro, clippy::todo.
  6. Remove the elided_lifetimes_in_paths allow and add explicit '_ at the 34 sites that elided it.

Release impact

Patch. No public API changes. The [lints] table in published manifests is ignored with a warning by cargo < 1.74 (verified empirically on 1.73.0); builds still succeed there.

Verification

  • cargo nextest run: 55/55 pass, including the compliance suite
  • cargo clippy --workspace --all-targets: zero warnings
  • cargo fmt clean

hiltontj added 7 commits July 13, 2026 13:27
Updates the CTS submodule from 9277705 to 7be7c1f (19 commits),
including new tests for function extensions, filter selectors,
normalized paths, and array slices. All compliance tests pass.
- rename clippy::empty_enum to clippy::empty_enums
- remove clippy::match_on_vec_items (removed; covered by
  clippy::indexing_slicing)
Applied via cargo clippy --fix. Adds explicit '_ lifetimes to
return-type paths where the input lifetime is elided, satisfying
the mismatched_lifetime_syntaxes rustc lint.
Moves the lint declarations from crate-level attributes in each
lib.rs to [workspace.lints] in the root Cargo.toml, with each
member crate opting in via [lints] workspace = true. The lint set
is unchanged.

This newly applies the lints to the previously-unlinted
serde_json_path_macros_internal crate and to test targets:

- add crate/function docs in the internal macros crate
- restrict unreachable pub items to pub(crate) in the internal
  macros crate
- add crate docs to integration test files
The previous list was inherited from axum at project inception.
Remove lints that are redundant or not applicable to this library:

- on by default, so redundant: clippy::all, unexpected_cfgs,
  future_incompatible, nonstandard_style, clippy::needless_borrow
- no async/mutex code: await_holding_lock, if_let_mutex
- no file IO: verbose_file_reads
- no float math: imprecise_flops, suboptimal_flops,
  lossy_float_literal
- remaining pedantic/restriction lints guarding against patterns
  not present in the codebase
- clippy::type_complexity allow no longer triggered by any code

Retained: missing_docs, missing_debug_implementations,
unreachable_pub, unsafe_code (public API hygiene);
rust_2018_idioms; clippy::dbg_macro and clippy::todo (leftover
debug artifacts).
Add the explicit '_ lifetime at all sites where it was elided.
This makes lifetime-carrying types visible at use sites and
completes the lifetime-syntax cleanup started with the
mismatched_lifetime_syntaxes fixes.
The question_mark lint in clippy 1.97 (used by CI, which tracks
stable) newly flags if-let/else-return-None blocks that assign
through a binding. Rewrite the two singular query segment matches
in SingularQuery::eval_query with direct assignment and the ?
operator.
@hiltontj
hiltontj marked this pull request as ready for review July 13, 2026 18:27
@hiltontj
hiltontj merged commit 16b4894 into main Jul 13, 2026
5 checks passed
@hiltontj
hiltontj deleted the chore/cts-update-and-clippy branch July 13, 2026 18:31
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