Skip to content

fix(docs): use opengraph-image.png instead of api endpoint #201

fix(docs): use opengraph-image.png instead of api endpoint

fix(docs): use opengraph-image.png instead of api endpoint #201

GitHub Actions / clippy succeeded Sep 21, 2024 in 0s

clippy

58 warnings

Details

Results

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

Versions

  • rustc 1.81.0 (eeb90cda1 2024-09-04)
  • cargo 1.81.0 (2dbb1af80 2024-08-20)
  • clippy 0.1.81 (eeb90cd 2024-09-04)

Annotations

Check warning on line 53 in crates/bulloak/src/scaffold.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

more than 3 bools in a struct

warning: more than 3 bools in a struct
  --> crates/bulloak/src/scaffold.rs:21:1
   |
21 | / pub struct Scaffold {
22 | |     /// The set of tree files to generate from.
23 | |     ///
24 | |     /// Each Solidity file will be named after its matching
...  |
52 | |     pub skip_modifiers: bool,
53 | | }
   | |_^
   |
   = help: consider using a state machine or refactoring bools into two-variant enums
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_excessive_bools
   = note: `-W clippy::struct-excessive-bools` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::struct_excessive_bools)]`

Check warning on line 40 in crates/bulloak/src/cli.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

struct update has no effect, all the fields in the struct have already been specified

warning: struct update has no effect, all the fields in the struct have already been specified
  --> crates/bulloak/src/cli.rs:40:19
   |
40 |                 ..Self::default()
   |                   ^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
   = note: `-W clippy::needless-update` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::needless_update)]`

Check warning on line 28 in crates/bulloak/src/cli.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

calling `Scaffold::default()` is more clear than this expression

warning: calling `Scaffold::default()` is more clear than this expression
  --> crates/bulloak/src/cli.rs:28:24
   |
28 |         Self::Scaffold(Default::default())
   |                        ^^^^^^^^^^^^^^^^^^ help: try: `Scaffold::default()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
   = note: `-W clippy::default-trait-access` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::default_trait_access)]`

Check warning on line 366 in crates/bulloak/src/../README.md

See this annotation in the file changed.

@github-actions github-actions / clippy

you should put bare URLs between `<`/`>` or make a proper Markdown link

warning: you should put bare URLs between `<`/`>` or make a proper Markdown link
   --> crates/bulloak/src/../README.md:366:3
    |
366 |   https://opensource.org/licenses/MIT).
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<https://opensource.org/licenses/MIT>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown

Check warning on line 364 in crates/bulloak/src/../README.md

See this annotation in the file changed.

@github-actions github-actions / clippy

you should put bare URLs between `<`/`>` or make a proper Markdown link

warning: you should put bare URLs between `<`/`>` or make a proper Markdown link
   --> crates/bulloak/src/../README.md:364:3
    |
364 |   https://www.apache.org/licenses/LICENSE-2.0).
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<https://www.apache.org/licenses/LICENSE-2.0>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown

Check warning on line 32 in crates/bulloak/src/../README.md

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
  --> crates/bulloak/src/../README.md:32:15
   |
32 | The following VSCode extensions are not essential but they are recommended for a
   |               ^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
   |
32 | The following `VSCode` extensions are not essential but they are recommended for a
   |               ~~~~~~~~

Check warning on line 30 in crates/bulloak/src/../README.md

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
  --> crates/bulloak/src/../README.md:30:5
   |
30 | ### VSCode
   |     ^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
   |
30 | ### `VSCode`
   |     ~~~~~~~~

Check warning on line 7 in crates/bulloak/src/../README.md

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
 --> crates/bulloak/src/../README.md:7:6
  |
7 |   - [VSCode](#vscode)
  |      ^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
  = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
  = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]`
help: try
  |
7 |   - [`VSCode`](#vscode)
  |      ~~~~~~~~

Check warning on line 17 in crates/foundry/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
  --> crates/foundry/src/scaffold/mod.rs:17:1
   |
17 | pub fn scaffold(text: &str, cfg: &Config) -> anyhow::Result<String> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 17 in crates/foundry/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
  --> crates/foundry/src/scaffold/mod.rs:17:1
   |
17 | pub fn scaffold(text: &str, cfg: &Config) -> anyhow::Result<String> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first possible panic found here
  --> crates/foundry/src/scaffold/mod.rs:22:9
   |
22 |         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 38 in crates/foundry/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
  --> crates/foundry/src/scaffold/modifiers.rs:38:5
   |
38 |     pub fn discover(&mut self, ast: &Ast) -> &IndexMap<String, String> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first possible panic found here
  --> crates/foundry/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 91 in crates/foundry/src/scaffold/emitter.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `self` argument

warning: unused `self` argument
  --> crates/foundry/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: `-W clippy::unused-self` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::unused_self)]`

Check warning on line 26 in crates/foundry/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
  --> crates/foundry/src/hir/mod.rs:26:1
   |
26 | pub fn translate(text: &str, cfg: &Config) -> 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 85 in crates/foundry/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
  --> crates/foundry/src/hir/visitor.rs:82:5
   |
82 | /     fn visit_statement(
83 | |         &mut self,
84 | |         statement: &hir::Statement,
85 | |     ) -> Result<Self::StatementOutput, Self::Error>;
   | |____________________________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 73 in crates/foundry/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
  --> crates/foundry/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

Check warning on line 59 in crates/foundry/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
  --> crates/foundry/src/hir/visitor.rs:56:5
   |
56 | /     fn visit_function(
57 | |         &mut self,
58 | |         function: &hir::FunctionDefinition,
59 | |     ) -> 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 47 in crates/foundry/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
  --> crates/foundry/src/hir/visitor.rs:44:5
   |
44 | /     fn visit_contract(
45 | |         &mut self,
46 | |         contract: &hir::ContractDefinition,
47 | |     ) -> 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 35 in crates/foundry/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
  --> crates/foundry/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

Check warning on line 103 in crates/foundry/src/hir/combiner.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
   --> crates/foundry/src/hir/combiner.rs:99:5
    |
99  | /     pub fn combine(
100 | |         self,
101 | |         text: &str,
102 | |         hirs: impl Iterator<Item = Hir>,
103 | |     ) -> Result<Hir> {
    | |____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 308 in crates/foundry/src/check/violation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `&Box<T>`. Consider using just `&T`

warning: you seem to be trying to use `&Box<T>`. Consider using just `&T`
   --> crates/foundry/src/check/violation.rs:308:19
    |
308 |     contract_sol: &Box<ContractDefinition>,
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&ContractDefinition`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
    = note: `-W clippy::borrowed-box` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::borrowed_box)]`

Check warning on line 174 in crates/foundry/src/check/violation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
   --> crates/foundry/src/check/violation.rs:174:5
    |
174 |     pub fn fix(&self, mut ctx: Context) -> Context {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn fix(&self, mut ctx: Context) -> Context`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 174 in crates/foundry/src/check/violation.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
   --> crates/foundry/src/check/violation.rs:174:5
    |
174 |     pub fn fix(&self, mut ctx: Context) -> Context {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: first possible panic found here
   --> crates/foundry/src/check/violation.rs:181:21
    |
181 |                     parse(&source).expect("should parse Solidity string");
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
    = note: `-W clippy::missing-panics-doc` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::missing_panics_doc)]`

Check warning on line 151 in crates/foundry/src/check/violation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
   --> crates/foundry/src/check/violation.rs:151:5
    |
151 |     pub fn help(&self) -> Option<Cow<'static, str>> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn help(&self) -> Option<Cow<'static, str>>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 139 in crates/foundry/src/check/violation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
   --> crates/foundry/src/check/violation.rs:139:5
    |
139 |     pub fn is_fixable(&self) -> bool {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn is_fixable(&self) -> bool`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 54 in crates/foundry/src/check/violation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item name starts with its containing module's name

warning: item name starts with its containing module's name
  --> crates/foundry/src/check/violation.rs:54:10
   |
54 | pub enum ViolationKind {
   |          ^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
   = note: `-W clippy::module-name-repetitions` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::module_name_repetitions)]`