feat(check): improve violations reporting #85
clippy
28 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 28 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.72.1 (d5c2e9c34 2023-09-13)
- cargo 1.72.1 (103a7ff2e 2023-08-15)
- clippy 0.1.72 (d5c2e9c 2023-09-13)
Annotations
Check warning on line 65 in src/error.rs
github-actions / clippy
wildcard matches only a single variant and will also match any future added variants
warning: wildcard matches only a single variant and will also match any future added variants
--> src/error.rs:65:13
|
65 | _ => unreachable!(),
| ^ help: try this: `Self::__Nonexhaustive`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
Check warning on line 14 in src/syntax/mod.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/syntax/mod.rs:14:1
|
14 | pub fn parse(text: &str) -> crate::error::Result<ast::Ast> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 26 in src/syntax/visitor.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/syntax/visitor.rs:23:5
|
23 | / fn visit_description(
24 | | &mut self,
25 | | description: &ast::Description,
26 | | ) -> Result<Self::Output, Self::Error>;
| |___________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 21 in src/syntax/visitor.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/syntax/visitor.rs:21:5
|
21 | fn visit_action(&mut self, action: &ast::Action) -> Result<Self::Output, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 19 in src/syntax/visitor.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/syntax/visitor.rs:19:5
|
19 | fn visit_condition(&mut self, condition: &ast::Condition) -> Result<Self::Output, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 17 in src/syntax/visitor.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/syntax/visitor.rs:17:5
|
17 | fn visit_root(&mut self, root: &ast::Root) -> Result<Self::Output, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 156 in src/syntax/tokenizer.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/syntax/tokenizer.rs:156:5
|
156 | pub fn tokenize(&mut self, text: &str) -> Result<Vec<Token>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 69 in src/syntax/tokenizer.rs
github-actions / clippy
wildcard matches only a single variant and will also match any future added variants
warning: wildcard matches only a single variant and will also match any future added variants
--> src/syntax/tokenizer.rs:69:13
|
69 | _ => unreachable!(),
| ^ help: try this: `__Nonexhaustive`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
Check warning on line 118 in src/syntax/semantics.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/syntax/semantics.rs:118:5
|
118 | pub fn analyze(&mut self, ast: &ast::Ast) -> Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 118 in src/syntax/semantics.rs
github-actions / clippy
docs for function which may panic missing `# Panics` section
warning: docs for function which may panic missing `# Panics` section
--> src/syntax/semantics.rs:118:5
|
118 | pub fn analyze(&mut self, ast: &ast::Ast) -> Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/syntax/semantics.rs:119:9
|
119 | / match ast {
120 | | Ast::Root(root) => self.visit_root(root),
121 | | Ast::Condition(condition) => self.visit_condition(condition),
122 | | Ast::Action(action) => self.visit_action(action),
... |
126 | | // be stored in `self.errors`.
127 | | .unwrap();
| |_________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
Check warning on line 81 in src/syntax/semantics.rs
github-actions / clippy
wildcard matches only a single variant and will also match any future added variants
warning: wildcard matches only a single variant and will also match any future added variants
--> src/syntax/semantics.rs:81:13
|
81 | _ => unreachable!(),
| ^ help: try this: `__Nonexhaustive`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
Check warning on line 140 in src/syntax/parser.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/syntax/parser.rs:140:5
|
140 | pub fn parse(&mut self, text: &str, tokens: &[Token]) -> Result<Ast> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 112 in src/syntax/parser.rs
github-actions / clippy
wildcard matches only a single variant and will also match any future added variants
warning: wildcard matches only a single variant and will also match any future added variants
--> src/syntax/parser.rs:112:13
|
112 | _ => unreachable!(),
| ^ help: try this: `__Nonexhaustive`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
Check warning on line 96 in src/syntax/parser.rs
github-actions / clippy
usage of wildcard import for enum variants
warning: usage of wildcard import for enum variants
--> src/syntax/parser.rs:96:13
|
96 | use self::ErrorKind::*;
| ^^^^^^^^^^^^^^^^^^ help: try: `self::ErrorKind::{CornerNotLastChild, DescriptionTokenUnexpected, EofUnexpected, GivenUnexpected, ItUnexpected, TeeLastChild, TitleMissing, TokenUnexpected, TreeEmpty, TreeRootless, WhenUnexpected, WordUnexpected}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_glob_use
= note: `#[warn(clippy::enum_glob_use)]` implied by `#[warn(clippy::pedantic)]`
Check warning on line 130 in src/scaffold/mod.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/scaffold/mod.rs:130:5
|
130 | pub fn scaffold(&self, text: &str) -> crate::error::Result<String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 54 in src/scaffold/mod.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/scaffold/mod.rs:54:5
|
54 | pub fn run(self) -> anyhow::Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 39 in src/scaffold/modifiers.rs
github-actions / clippy
docs for function which may panic missing `# Panics` section
warning: docs for function which may panic missing `# Panics` section
--> src/scaffold/modifiers.rs:39:5
|
39 | pub fn discover(&mut self, ast: &Ast) -> &IndexMap<String, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/scaffold/modifiers.rs:42:17
|
42 | self.visit_root(root).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
Check warning on line 78 in src/scaffold/emitter.rs
github-actions / clippy
unused `self` argument
warning: unused `self` argument
--> src/scaffold/emitter.rs:78:29
|
78 | fn emit_contract_header(&self, contract: &hir::ContractDefinition) -> String {
| ^^^^^
|
= 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)]`
Check warning on line 14 in src/hir/mod.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/hir/mod.rs:14:1
|
14 | pub fn translate(tree: &str) -> anyhow::Result<Hir> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 26 in src/hir/visitor.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/hir/visitor.rs:26:5
|
26 | fn visit_comment(&mut self, comment: &hir::Comment) -> Result<Self::Output, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 24 in src/hir/visitor.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/hir/visitor.rs:21:5
|
21 | / fn visit_function(
22 | | &mut self,
23 | | function: &hir::FunctionDefinition,
24 | | ) -> Result<Self::Output, Self::Error>;
| |___________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 19 in src/hir/visitor.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/hir/visitor.rs:16:5
|
16 | / fn visit_contract(
17 | | &mut self,
18 | | contract: &hir::ContractDefinition,
19 | | ) -> Result<Self::Output, Self::Error>;
| |___________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 14 in src/hir/visitor.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/hir/visitor.rs:14:5
|
14 | fn visit_root(&mut self, root: &hir::Root) -> Result<Self::Output, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 4 in src/hir/mod.rs
github-actions / clippy
module has the same name as its containing module
warning: module has the same name as its containing module
--> src/hir/mod.rs:4:1
|
4 | pub mod hir;
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
= note: `#[warn(clippy::module_inception)]` implied by `#[warn(clippy::all)]`
Check warning on line 36 in src/check/mod.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/check/mod.rs:36:5
|
36 | pub fn run(self) -> anyhow::Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
= note: `#[warn(clippy::missing_errors_doc)]` implied by `#[warn(clippy::pedantic)]`