Repository navigation
Conversation
sfu-db#972) fed_rewriter::create_sources checked manual_info.is_some() and then unwrapped it; use if let instead. The Option<String> producer in the Trino source already matches all six serde_json::Value variants, so the trailing _ arm could never run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Allow clippy::result_large_err crate-wide, with the reason: the Trino and BigQuery client errors are held by value and boxing them would change public error types. - dispatcher: //! instead of ///! for the module doc; name the prepare() return type as Prepared. - constants: drop single-condition cfg(any(..)). - mssql: Cow::into_owned instead of cloning the Cow; if let instead of single-arm match. - connectorx-cpp: From<Plan> instead of Into; return the struct directly instead of via a let binding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add -D warnings to both clippy steps. missing_docs stays a warning via --force-warn while its backlog (enabled in sfu-db#986) is worked down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1000 +/- ##
==========================================
- Coverage 45.18% 45.12% -0.06%
==========================================
Files 65 65
Lines 9606 9593 -13
==========================================
- Hits 4340 4329 -11
+ Misses 5266 5264 -2
🚀 New features to boost your workflow:
|
Contributor
|
Hi @tschm, thanks for your efforts in maintaining this project! I’ve invited you as a collaborator and hope this makes it easier for you to contribute to ConnectorX. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Both clippy steps in
ci.ymlexit 0 even when there are warnings. This PR clears the clippy backlog and adds-D warnings, so any new warning fails the build.There are three commits, in this order:
1. The two real defects
fed_rewriter.rs:create_sourcescheckedmanual_info.is_some()and then calledunwrap(). It now usesif let Some(manual_info) = &db_info.manual_info.sources/trino/mod.rs: theOption<String>producer already matches all sixserde_json::Valuevariants, so its trailing_ => throw!(..)arm could never run. I removed it. The other producers'_arms are reachable, so they stay.2. Remaining warnings
clippy::result_large_err(32 sites) is allowed crate-wide inlib.rs, with the reason written next to it. Every hit comes from two third-party errors held by value, Trino's (232 B) and BigQuery's (176 B), and they propagate intoConnectorXOutError. Boxing them would change public error types, and the error path is cold.dispatcher.rs:///!→//!for the module doc.prepare()now returns a namedPrepared<'w, S, D>alias (type_complexity).constants.rs:cfg(any(feature = "src_oracle"))→cfg(feature = "src_oracle").mssql/tiberius_impl.rs:decode(..)?.to_owned()cloned theCowitself, so it is nowinto_owned(). Two single-armmatches becomeif let.connectorx-cpp:impl From<Plan> for CXFederatedPlanreplacesimpl Into, and onelet x = ..; xbecomes a direct return. The second clippy step uses--all, which covers this crate.3. CI
Both steps now run
cargo clippy ... -- -D warnings --force-warn missing_docs.# still reports 662 undocumented items. #986 called out that a blanket-D warningswould conflict with that.--force-warn missing_docskeeps those as visible warnings that-D warningsdoesn't promote, so the docs backlog can be worked down separately. Once it's at zero, the flag can go. One side effect is thatconnectorx-cppalso reports 9missing_docswarnings in the--allstep. They are warnings only.Verification
On macOS arm64 with clippy 0.1.97 (Rust 1.97):
cargo clippy --features all -- -D warnings --force-warn missing_docsexits 0.cargo clippy --features all --all -- -D warnings --force-warn missing_docsexits 0.cargo test --lib --features all: 78 passed, 0 failed.cargo fmt --all --checkis clean.Not addressed
cfg(windows)in the mssql source) isn't linted by this CI, which runs on Linux. I applied the sameinto_owned()change there anyway for consistency.stabletoolchain, so a new clippy release that adds lints can turn CI red without any code change. If that turns out to be noisy, pinning the toolchain is the usual fix.tiberius_impl.rs, which Phase 4: remove the Tiberius MSSQL backend #962 deletes. Whichever lands second will hit a trivial conflict.Closes #972
🤖 Generated with Claude Code