Skip to content

chore(v0.6.0): update Cargo.toml & CHANGELOG #97

chore(v0.6.0): update Cargo.toml & CHANGELOG

chore(v0.6.0): update Cargo.toml & CHANGELOG #97

GitHub Actions / clippy succeeded Dec 1, 2023 in 0s

clippy

38 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 38
Note 0
Help 0

Versions

  • rustc 1.74.0 (79e9716c9 2023-11-13)
  • cargo 1.74.0 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (79e9716 2023-11-13)

Annotations

Check warning on line 14 in src/syntax/mod.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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 151 in src/syntax/tokenizer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
   --> src/syntax/tokenizer.rs:151:5
    |
151 |     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 128 in src/syntax/semantics.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
   --> src/syntax/semantics.rs:128:5
    |
128 |     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 128 in src/syntax/semantics.rs

See this annotation in the file changed.

@github-actions 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:128:5
    |
128 |     pub fn analyze(&mut self, ast: &ast::Ast) -> Result<()> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: first possible panic found here
   --> src/syntax/semantics.rs:129:9
    |
129 | /         match ast {
130 | |             Ast::Root(root) => self.visit_root(root),
131 | |             Ast::Condition(condition) => self.visit_condition(condition),
132 | |             Ast::Action(action) => self.visit_action(action),
...   |
136 | |         // be stored in `self.errors`.
137 | |         .unwrap();
    | |_________________^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc

Check warning on line 84 in src/syntax/semantics.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> src/syntax/semantics.rs:84:17
   |
84 |                 write!(f, "found a condition more than once in lines: {}", lines)
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
84 -                 write!(f, "found a condition more than once in lines: {}", lines)
84 +                 write!(f, "found a condition more than once in lines: {lines}")
   |

Check warning on line 139 in src/syntax/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
   --> src/syntax/parser.rs:139:5
    |
139 |     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 85 in src/sol/fmt.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> src/sol/fmt.rs:85:49
   |
85 |             parts.push(self.visit_contract_part(&mut p)?);
   |                                                 ^^^^^^ help: change this to: `p`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 112 in src/scaffold/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
   --> src/scaffold/mod.rs:112:5
    |
112 |     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 112 in src/scaffold/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function which may panic missing `# Panics` section

warning: docs for function which may panic missing `# Panics` section
   --> src/scaffold/mod.rs:112:5
    |
112 |     pub fn scaffold(&self, text: &str) -> crate::error::Result<String> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: first possible panic found here
   --> src/scaffold/mod.rs:119:25
    |
119 |         let formatted = fmt(&source).expect("should format the emitted solidity code");
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc

Check warning on line 44 in src/scaffold/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> src/scaffold/mod.rs:44:5
   |
44 |     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 38 in src/scaffold/modifiers.rs

See this annotation in the file changed.

@github-actions 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:38:5
   |
38 |     pub fn discover(&mut self, ast: &Ast) -> &IndexMap<String, String> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first possible panic found here
  --> src/scaffold/modifiers.rs:41:17
   |
41 |                 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 77 in src/scaffold/emitter.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `self` argument

warning: unused `self` argument
  --> src/scaffold/emitter.rs:77:29
   |
77 |     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

See this annotation in the file changed.

@github-actions 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 61 in src/hir/visitor.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> src/hir/visitor.rs:60:5
   |
60 | /     fn visit_comment(&mut self, comment: &hir::Comment)
61 | |         -> Result<Self::CommentOutput, Self::Error>;
   | |____________________________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 51 in src/hir/visitor.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> src/hir/visitor.rs:48:5
   |
48 | /     fn visit_function(
49 | |         &mut self,
50 | |         function: &hir::FunctionDefinition,
51 | |     ) -> Result<Self::FunctionDefinitionOutput, Self::Error>;
   | |_____________________________________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 40 in src/hir/visitor.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> src/hir/visitor.rs:37:5
   |
37 | /     fn visit_contract(
38 | |         &mut self,
39 | |         contract: &hir::ContractDefinition,
40 | |     ) -> Result<Self::ContractDefinitionOutput, Self::Error>;
   | |_____________________________________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 29 in src/hir/visitor.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> src/hir/visitor.rs:29:5
   |
29 |     fn visit_root(&mut self, root: &hir::Root) -> Result<Self::RootOutput, Self::Error>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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)]`

Check warning on line 4 in src/hir/mod.rs

See this annotation in the file changed.

@github-actions 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 25 in src/cli.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

passing a unit value to a function

warning: passing a unit value to a function
  --> src/cli.rs:25:37
   |
25 |         Commands::Check(command) => Ok(command.run()),
   |                                     ^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
   = note: `#[warn(clippy::unit_arg)]` implied by `#[warn(clippy::all)]`
help: move the expression in front of the call and replace it with the unit literal `()`
   |
25 ~         Commands::Check(command) => {
26 +             command.run();
27 +             Ok(())
28 ~         },
   |

Check warning on line 148 in src/check/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> src/check/mod.rs:145:13
    |
145 | /             eprintln!(
146 | |                 " (run `bulloak check --fix <.tree files>` to apply {} {})",
147 | |                 fixable_count, fix_literal
148 | |             );
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`

Check warning on line 46 in src/check/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function which may panic missing `# Panics` section

warning: docs for function which may panic missing `# Panics` section
  --> src/check/mod.rs:46:5
   |
46 |     pub fn run(self) {
   |     ^^^^^^^^^^^^^^^^
   |
note: first possible panic found here
  --> src/check/mod.rs:87:33
   |
87 |                 let formatted = ctx.fmt().expect("should format the emitted solidity code");
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
note: the lint level is defined here
  --> src/lib.rs:3:22
   |
3  | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
   |                      ^^^^^^^^^^^^^^^^
   = note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`