You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run clippy against a crate that contains the module generated by icu4x-datagen I get a whole bunch of clippy errors. Here's a sample:
$> cargo clippy --locked --all-targets --all-features --workspace -- -D clippy::all
Checking omegasort-rs v0.1.0 (/home/autarch/projects/omegasort-rs)
error: module has the same name as its containing module
--> src/./icu-data/mod.rs:2:1
|
2 | mod collator ; mod fallback ; mod normalizer ; use :: icu_provider :: prelude :: * ; # [doc = r" Implement [`DataProvider<M>`] on the given str...
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
= note: `-D clippy::module-inception` implied by `-D clippy::all`
error: unnecessary closure used with `bool::then`
--> src/./icu-data/collator/jamo_v1/mod.rs:2:253
|
2 | ... 'static DataStruct > { locale . is_empty () . then (|| & UND) } static UND : DataStruct = include ! ("und.rs.data") ;
| ^^^^^^^^^^^^^^^^^^^^^^^---------------
| |
| help: use `then_some(..)` instead: `then_some(& UND)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D clippy::all`
I note that the generated code has some #[allow (clippy :: octal_escapes)] bits in it, but that's not helping with this.
I think it'd be best to just #[allow(clippy)]. Otherwise every time clippy adds a new lint that causes a lint failure you need to update the icu4x-datagen crate and I need to regenerate the generated code.
The text was updated successfully, but these errors were encountered:
I found the #[clippy::msrv] attribute which we can set. Note that your first clippy finding is actually due to how you named the enclosing module, and I think that's a valid point.
If I run clippy against a crate that contains the module generated by
icu4x-datagen
I get a whole bunch of clippy errors. Here's a sample:I note that the generated code has some
#[allow (clippy :: octal_escapes)]
bits in it, but that's not helping with this.I think it'd be best to just
#[allow(clippy)]
. Otherwise every time clippy adds a new lint that causes a lint failure you need to update theicu4x-datagen
crate and I need to regenerate the generated code.The text was updated successfully, but these errors were encountered: