Skip to content

fixes #163

fixes #163 #297

Triggered via push November 22, 2023 09:36
Status Success
Total duration 2m 45s
Artifacts

ci.yml

on: push
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

15 warnings
length comparison to zero: src/serde.rs#L166
warning: length comparison to zero --> src/serde.rs:166:31 | 166 | if valid_variants == 0 && e.variants().len() != 0 { | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!e.variants().is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
`panic` should not be present in production code: src/serde.rs#L82
warning: `panic` should not be present in production code --> src/serde.rs:82:36 | 82 | .unwrap_or_else(|| panic!("Type '{}' was never populated.", ty.sid.type_name)); // TODO: Error properly | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
`panic` should not be present in production code: src/serde.rs#L80
warning: `panic` should not be present in production code --> src/serde.rs:80:36 | 80 | .unwrap_or_else(|| panic!("Reference type not found for: {}", ty.sid.type_name)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic note: the lint level is defined here --> src/lib.rs:3:43 | 3 | #![warn(clippy::all, clippy::unwrap_used, clippy::panic)] // TODO: missing_docs | ^^^^^^^^^^^^^
called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent: src/lang/ts/mod.rs#L650
warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent --> src/lang/ts/mod.rs:650:31 | 650 | if let Some(first_char) = ident.chars().nth(0) { | ^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `ident.chars().next()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero = note: `#[warn(clippy::iter_nth_zero)]` implied by `#[warn(clippy::all)]`
length comparison to zero: src/lang/ts/mod.rs#L446
warning: length comparison to zero --> src/lang/ts/mod.rs:446:24 | 446 | if obj.fields.len() == 0 { | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `obj.fields.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` implied by `#[warn(clippy::all)]`
useless conversion to the same type: `std::ops::Range<usize>`: src/lang/ts/mod.rs#L233
warning: useless conversion to the same type: `std::ops::Range<usize>` --> src/lang/ts/mod.rs:233:21 | 233 | / (0..length) 234 | | .into_iter() | |____________________________________^ help: consider removing `.into_iter()`: `(0..length)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` implied by `#[warn(clippy::all)]`
useless use of `format!`: src/lang/ts/mod.rs#L227
warning: useless use of `format!` --> src/lang/ts/mod.rs:227:17 | 227 | format!("{dt}") | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `dt.to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` implied by `#[warn(clippy::all)]`
single-character string constant used as pattern: src/lang/ts/mod.rs#L223
warning: single-character string constant used as pattern --> src/lang/ts/mod.rs:223:74 | 223 | || (dt.contains(' ') && (dt.contains("&") || dt.contains("|"))) | ^^^ help: try using a `char` instead: `'|'` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
single-character string constant used as pattern: src/lang/ts/mod.rs#L223
warning: single-character string constant used as pattern --> src/lang/ts/mod.rs:223:54 | 223 | || (dt.contains(' ') && (dt.contains("&") || dt.contains("|"))) | ^^^ help: try using a `char` instead: `'&'` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` implied by `#[warn(clippy::all)]`
using a reference to `Cow` is not recommended: src/lang/ts/mod.rs#L106
warning: using a reference to `Cow` is not recommended --> src/lang/ts/mod.rs:106:11 | 106 | docs: &Cow<'static, str>, | ^^^^^^^^^^^^^^^^^^ help: change this to: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` implied by `#[warn(clippy::all)]`
calling `push_str()` using a single-character string literal: src/lang/ts/js_doc.rs#L72
warning: calling `push_str()` using a single-character string literal --> src/lang/ts/js_doc.rs:72:9 | 72 | self.value.push_str("\n"); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `self.value.push('\n')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str = note: `#[warn(clippy::single_char_add_str)]` implied by `#[warn(clippy::all)]`
this expression creates a reference which is immediately dereferenced by the compiler: src/lang/ts/comments.rs#L21
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lang/ts/comments.rs:21:33 | 21 | builder.push_deprecated(&deprecated); | ^^^^^^^^^^^ help: change this to: `deprecated` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow note: the lint level is defined here --> src/lib.rs:3:9 | 3 | #![warn(clippy::all, clippy::unwrap_used, clippy::panic)] // TODO: missing_docs | ^^^^^^^^^^^ = note: `#[warn(clippy::needless_borrow)]` implied by `#[warn(clippy::all)]`
constant `RESERVED_IDENTS` is never used: src/lang/ts/reserved_terms.rs#L66
warning: constant `RESERVED_IDENTS` is never used --> src/lang/ts/reserved_terms.rs:66:18 | 66 | pub(crate) const RESERVED_IDENTS: &[&str] = &[ | ^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused variable: `should_export`: macros/src/type/mod.rs#L124
warning: unused variable: `should_export` --> macros/src/type/mod.rs:124:9 | 124 | let should_export = match container_attrs.export { | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_should_export` | = note: `#[warn(unused_variables)]` on by default
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/