Skip to content

lint: add better rust formatting #158

lint: add better rust formatting

lint: add better rust formatting #158

Triggered via pull request July 6, 2024 19:24
Status Success
Total duration 4m 36s
Artifacts

ci.yml

on: pull_request
nightly / fmt
13s
nightly / fmt
ubuntu / stable / coverage
2m 5s
ubuntu / stable / coverage
Matrix: build
Matrix: clippy
Fit to window
Zoom out
Zoom in

Annotations

38 warnings
build (macOS-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build (macOS-latest)
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
build (macOS-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (macOS-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (macOS-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (macOS-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
[clippy] src/check/context.rs#L56: src/check/context.rs#L56
warning: calling `Config::default()` is more clear than this expression --> src/check/context.rs:56:58 | 56 | let hir = crate::hir::translate(&tree_contents, &Default::default()) | ^^^^^^^^^^^^^^^^^^ help: try: `Config::default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access = note: `#[warn(clippy::default_trait_access)]` implied by `#[warn(clippy::pedantic)]`
[clippy] src/check/rules/structural_match.rs#L142: src/check/rules/structural_match.rs#L142
warning: consider adding a `;` to the last statement for consistent formatting --> src/check/rules/structural_match.rs:142:21 | 142 | present_fn_indices.push((hir_idx, sol_idx)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `present_fn_indices.push((hir_idx, sol_idx));` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned = note: `#[warn(clippy::semicolon_if_nothing_returned)]` implied by `#[warn(clippy::pedantic)]`
[clippy] src/check/violation.rs#L196: src/check/violation.rs#L196
warning: calling `Config::default()` is more clear than this expression --> src/check/violation.rs:196:48 | 196 | let pt = sol::Translator::new(&Default::default()) | ^^^^^^^^^^^^^^^^^^ help: try: `Config::default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
[clippy] src/hir/visitor.rs#L32: src/hir/visitor.rs#L32
warning: docs for function returning `Result` missing `# Errors` section --> src/hir/visitor.rs:32:5 | 32 | / fn visit_root( 33 | | &mut self, 34 | | root: &hir::Root, 35 | | ) -> Result<Self::RootOutput, Self::Error>; | |_______________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[clippy] src/hir/visitor.rs#L70: src/hir/visitor.rs#L70
warning: docs for function returning `Result` missing `# Errors` section --> src/hir/visitor.rs:70:5 | 70 | / fn visit_comment( 71 | | &mut self, 72 | | comment: &hir::Comment, 73 | | ) -> Result<Self::CommentOutput, Self::Error>; | |__________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[clippy] src/scaffold/emitter.rs#L91: src/scaffold/emitter.rs#L91
warning: unused `self` argument --> src/scaffold/emitter.rs:91:9 | 91 | &self, | ^^^^^ | = help: consider refactoring to an associated function = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self = note: `#[warn(clippy::unused_self)]` implied by `#[warn(clippy::pedantic)]`
[clippy] src/syntax/visitor.rs#L17: src/syntax/visitor.rs#L17
warning: docs for function returning `Result` missing `# Errors` section --> src/syntax/visitor.rs:17:5 | 17 | / fn visit_root( 18 | | &mut self, 19 | | root: &ast::Root, 20 | | ) -> Result<Self::Output, Self::Error>; | |___________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[clippy] src/syntax/visitor.rs#L22: src/syntax/visitor.rs#L22
warning: docs for function returning `Result` missing `# Errors` section --> src/syntax/visitor.rs:22:5 | 22 | / fn visit_condition( 23 | | &mut self, 24 | | condition: &ast::Condition, 25 | | ) -> Result<Self::Output, Self::Error>; | |___________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[clippy] src/syntax/visitor.rs#L27: src/syntax/visitor.rs#L27
warning: docs for function returning `Result` missing `# Errors` section --> src/syntax/visitor.rs:27:5 | 27 | / fn visit_action( 28 | | &mut self, 29 | | action: &ast::Action, 30 | | ) -> Result<Self::Output, Self::Error>; | |___________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[clippy] src/check/context.rs#L56: src/check/context.rs#L56
warning: calling `Config::default()` is more clear than this expression --> src/check/context.rs:56:58 | 56 | let hir = crate::hir::translate(&tree_contents, &Default::default()) | ^^^^^^^^^^^^^^^^^^ help: try: `Config::default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access = note: `#[warn(clippy::default_trait_access)]` implied by `#[warn(clippy::pedantic)]`
[clippy] src/check/rules/structural_match.rs#L142: src/check/rules/structural_match.rs#L142
warning: consider adding a `;` to the last statement for consistent formatting --> src/check/rules/structural_match.rs:142:21 | 142 | present_fn_indices.push((hir_idx, sol_idx)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `present_fn_indices.push((hir_idx, sol_idx));` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned = note: `#[warn(clippy::semicolon_if_nothing_returned)]` implied by `#[warn(clippy::pedantic)]`
[clippy] src/check/violation.rs#L196: src/check/violation.rs#L196
warning: calling `Config::default()` is more clear than this expression --> src/check/violation.rs:196:48 | 196 | let pt = sol::Translator::new(&Default::default()) | ^^^^^^^^^^^^^^^^^^ help: try: `Config::default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
[clippy] src/hir/visitor.rs#L32: src/hir/visitor.rs#L32
warning: docs for function returning `Result` missing `# Errors` section --> src/hir/visitor.rs:32:5 | 32 | / fn visit_root( 33 | | &mut self, 34 | | root: &hir::Root, 35 | | ) -> Result<Self::RootOutput, Self::Error>; | |_______________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[clippy] src/hir/visitor.rs#L70: src/hir/visitor.rs#L70
warning: docs for function returning `Result` missing `# Errors` section --> src/hir/visitor.rs:70:5 | 70 | / fn visit_comment( 71 | | &mut self, 72 | | comment: &hir::Comment, 73 | | ) -> Result<Self::CommentOutput, Self::Error>; | |__________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[clippy] src/scaffold/emitter.rs#L91: src/scaffold/emitter.rs#L91
warning: unused `self` argument --> src/scaffold/emitter.rs:91:9 | 91 | &self, | ^^^^^ | = help: consider refactoring to an associated function = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self = note: `#[warn(clippy::unused_self)]` implied by `#[warn(clippy::pedantic)]`
[clippy] src/syntax/visitor.rs#L17: src/syntax/visitor.rs#L17
warning: docs for function returning `Result` missing `# Errors` section --> src/syntax/visitor.rs:17:5 | 17 | / fn visit_root( 18 | | &mut self, 19 | | root: &ast::Root, 20 | | ) -> Result<Self::Output, Self::Error>; | |___________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[clippy] src/syntax/visitor.rs#L22: src/syntax/visitor.rs#L22
warning: docs for function returning `Result` missing `# Errors` section --> src/syntax/visitor.rs:22:5 | 22 | / fn visit_condition( 23 | | &mut self, 24 | | condition: &ast::Condition, 25 | | ) -> Result<Self::Output, Self::Error>; | |___________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[clippy] src/syntax/visitor.rs#L27: src/syntax/visitor.rs#L27
warning: docs for function returning `Result` missing `# Errors` section --> src/syntax/visitor.rs:27:5 | 27 | / fn visit_action( 28 | | &mut self, 29 | | action: &ast::Action, 30 | | ) -> Result<Self::Output, Self::Error>; | |___________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
stable / clippy
The following actions uses Node.js version which is deprecated and will be forced to run on node20: giraffate/clippy-action@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
beta / clippy
The following actions uses Node.js version which is deprecated and will be forced to run on node20: giraffate/clippy-action@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
build (ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build (ubuntu-latest)
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build (windows-latest)
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/