Support file:line:col format on CLI command (#217) #499
Annotations
1 error and 10 warnings
|
test windows-latest
Process completed with exit code 1.
|
|
calling `push_str()` using a single-character string literal:
src/input/keybindings.rs#L58
warning: calling `push_str()` using a single-character string literal
--> src/input/keybindings.rs:58:24
|
58 | KeyCode::Up => result.push_str("↑"),
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('↑')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#single_char_add_str
|
|
calling `push_str()` using a single-character string literal:
src/input/keybindings.rs#L57
warning: calling `push_str()` using a single-character string literal
--> src/input/keybindings.rs:57:27
|
57 | KeyCode::Right => result.push_str("→"),
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('→')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#single_char_add_str
|
|
calling `push_str()` using a single-character string literal:
src/input/keybindings.rs#L56
warning: calling `push_str()` using a single-character string literal
--> src/input/keybindings.rs:56:26
|
56 | KeyCode::Left => result.push_str("←"),
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('←')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#single_char_add_str
= note: `#[warn(clippy::single_char_add_str)]` on by default
|
|
empty line after doc comment:
src/input/keybindings.rs#L1269
warning: empty line after doc comment
--> src/input/keybindings.rs:1269:5
|
1269 | / /// Create default keybindings organized by context
1270 | |
| |_^
...
1273 | pub fn get_all_bindings(&self) -> Vec<(String, String)> {
| ----------------------- the comment documents this function
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#empty_line_after_doc_comments
= note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
= help: if the empty line is unintentional, remove it
help: if the documentation should include the empty line include it in the comment
|
1270 | ///
|
|
|
the loop variable `j` is only used to index `lines`:
build.rs#L1337
warning: the loop variable `j` is only used to index `lines`
--> build.rs:1337:14
|
1337 | for j in enum_line_idx..lines.len() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#needless_range_loop
help: consider using an iterator
|
1337 - for j in enum_line_idx..lines.len() {
1337 + for <item> in lines.iter().skip(enum_line_idx) {
|
|
|
the loop variable `j` is only used to index `lines`:
build.rs#L1256
warning: the loop variable `j` is only used to index `lines`
--> build.rs:1256:14
|
1256 | for j in struct_line_idx..lines.len() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#needless_range_loop
help: consider using an iterator
|
1256 - for j in struct_line_idx..lines.len() {
1256 + for <item> in lines.iter().skip(struct_line_idx) {
|
|
|
the loop variable `j` is only used to index `lines`:
build.rs#L504
warning: the loop variable `j` is only used to index `lines`
--> build.rs:504:14
|
504 | for j in struct_line_idx..lines.len() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator
|
504 - for j in struct_line_idx..lines.len() {
504 + for <item> in lines.iter().skip(struct_line_idx) {
|
|
|
this `if` has identical blocks:
build.rs#L421
warning: this `if` has identical blocks
--> build.rs:421:24
|
421 | } else if is_serde {
| ________________________^
422 | | rust_type_to_ts(rust_type)
423 | | } else {
| |_____^
|
note: same as this
--> build.rs:423:12
|
423 | } else {
| ____________^
424 | | rust_type_to_ts(rust_type)
425 | | };
| |_____^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#if_same_then_else
|
|
this `if` has identical blocks:
build.rs#L358
warning: this `if` has identical blocks
--> build.rs:358:9
|
358 | / {
359 | | rust_type_to_ts(rust_ret)
360 | | } else {
| |_________^
|
note: same as this
--> build.rs:360:16
|
360 | } else {
| ________________^
361 | | rust_type_to_ts(rust_ret)
362 | | }
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#if_same_then_else
= note: `#[warn(clippy::if_same_then_else)]` on by default
|
|
field `doc_comment` is never read:
build.rs#L1142
warning: field `doc_comment` is never read
--> build.rs:1142:5
|
1139 | struct EnumVariantInfo {
| --------------- field in this struct
...
1142 | doc_comment: String,
| ^^^^^^^^^^^
|
= note: `EnumVariantInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
|