Skip to content

lint: add better rust formatting #156

lint: add better rust formatting

lint: add better rust formatting #156

GitHub Actions / clippy failed Jul 6, 2024 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (9)

src/check/context.rs|56 col 58| 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)]
src/check/rules/structural_match.rs|142 col 21| 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)]
src/check/violation.rs|196 col 48| 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
src/hir/visitor.rs|32 col 5| 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
src/hir/visitor.rs|70 col 5| 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
src/scaffold/emitter.rs|91 col 9| 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)]
src/syntax/visitor.rs|17 col 5| 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
src/syntax/visitor.rs|22 col 5| 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
src/syntax/visitor.rs|27 col 5| 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

Filtered Findings (43)

README.md|18 col 6| warning: item in documentation is missing backticks
--> src/../README.md:18:6
|
18 | - VSCode
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
note: the lint level is defined here
--> src/lib.rs:3:22
|
3 | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
| ^^^^^^^^^^^^^^^^
= note: #[warn(clippy::doc_markdown)] implied by #[warn(clippy::pedantic)]
help: try
|
18 | - VSCode
| ~~~~~~~~
README.md|44 col 5| warning: item in documentation is missing backticks
--> src/../README.md:44:5
|
44 | ### VSCode
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
44 | ### VSCode
| ~~~~~~~~
README.md|46 col 15| warning: item in documentation is missing backticks
--> src/../README.md:46:15
|
46 | 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
|
46 | The following VSCode extensions are not essential but they are recommended for a
| ~~~~~~~~
README.md|403 col 3| warning: you should put bare URLs between </> or make a proper Markdown link
--> src/../README.md:403:3
|
403 | 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
README.md|405 col 3| warning: you should put bare URLs between </> or make a proper Markdown link
--> src/../README.md:405:3
|
405 | 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
src/lib.rs|1 col 1| warning: multiple versions for dependency alloy-primitives: 0.3.3, 0.4.2
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
note: the lint level is defined here
--> src/lib.rs:3:40
|
3 | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
| ^^^^^^^^^^^^^
= note: #[warn(clippy::multiple_crate_versions)] implied by #[warn(clippy::cargo)]
src/lib.rs|1 col 1| warning: multiple versions for dependency bitflags: 1.3.2, 2.4.1
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
src/lib.rs|1 col 1| warning: multiple versions for dependency proc-macro-crate: 1.3.1, 2.0.0
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
src/lib.rs|1 col 1| warning: multiple versions for dependency socket2: 0.4.10, 0.5.5
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
src/lib.rs|1 col 1| warning: multiple versions for dependency syn: 1.0.109, 2.0.66
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
src/lib.rs|1 col 1| warning: multiple versions for dependency toml: 0.7.8, 0.8.8
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
src/lib.rs|1 col 1| warning: multiple versions for dependency toml_edit: 0.19.15, 0.20.7, 0.21.0
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
src/lib.rs|1 col 1| warning: multiple versions for dependency yansi: 0.5.1, 1.0.0-rc.1
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
src/check/context.rs|53 col 43| warning: this argument is passed by value, but not consumed in the function body
--> src/check/context.rs:53:43
|
53 | pub(crate) fn new(tree: PathBuf, cfg: Config) -> Result<Self, Violation> {
| ^^^^^^ help: consider taking a reference instead: &Config
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: #[warn(clippy::needless_pass_by_value)] implied by #[warn(clippy::pedantic)]
src/check/context.rs|83 col 31| warning: methods called from_* usually take no self
--> src/check/context.rs:83:31
|
83 | pub(crate) fn from_parsed(mut self, parsed: Parsed) -> Self {
| ^^^^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
note: the lint level is defined here
--> src/lib.rs:3:9
|
3 | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
| ^^^^^^^^^^^
= note: #[warn(clippy::wrong_self_convention)] implied by #[warn(clippy::all)]
src/check/context.rs|127 col 20| warning: calling Config::default() is more clear than this expression
--> src/check/context.rs:127:20
|
127 | let cfg = &Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: Config::default()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
src/check/rules/structural_match.rs|12 col 5| warning: doc list item missing indentation
--> src/check/rules/structural_match.rs:12:5
|
12 | //! and modifiers are supported.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: #[warn(clippy::doc_lazy_continuation)] implied by #[warn(clippy::all)]
help: indent this line
|
12 | //! and modifiers are supported.
| ++
src/check/rules/structural_match.rs|148 col 25| warning: consider adding a ; to the last statement for consistent formatting
--> src/check/rules/structural_match.rs:148:25
|
148 | / violations.push(Violation::new(
149 | | ViolationKind::MatchingFunctionMissing(
150 | | fn_hir.clone(),
151 | | hir_idx,
... |
156 | | ),
157 | | ))
| |____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
help: add a ; here
|
148 ~ violations.push(Violation::new(
149 + ViolationKind::MatchingFunctionMissing(
150 + fn_hir.clone(),
151 + hir_idx,
152 + ),
153 + Location::Code(
154 + ctx.tree.to_string_lossy().into_owned(),
155 + fn_hir.span.start.line,
156 + ),
157 + ));
|
src/check/rules/structural_match.rs|177 col 18| warning: the loop variable j is only used to index present_fn_indices
--> src/check/rules/structural_match.rs:177:18
|
177 | for j in i + 1..present_fn_indices.len() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: #[warn(clippy::needless_range_loop)] implied by #[warn(clippy::all)]
help: consider using an iterator
|
177 | for in present_fn_indices.iter().skip(i + 1) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/check/violation.rs|345 col 19| warning: you seem to be trying to use &Box<T>. Consider using just &T
--> src/check/violation.rs:345:19
|
345 | contract_sol: &Box,
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: &ContractDefinition
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
= note: #[warn(clippy::borrowed_box)] implied by #[warn(clippy::all)]
src/check/mod.rs|55 col 5| warning: this function's return value is unnecessary
--> src/check/mod.rs:55:5
|
55 | / pub(crate) fn run(&self, cfg: &Config) -> anyhow::Result<()> {
56 | | let mut violations = Vec::new();
57 | | let ctxs: Vec = self
58 | | .files
... |
134 | | Ok(())
135 | | }
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
= note: #[warn(clippy::unnecessary_wraps)] implied by #[warn(clippy::pedantic)]
help: remove the return type...
|
55 | pub(crate) fn run(&self, cfg: &Config) -> anyhow::Result<()> {
| ~~~~~~~~~~~~~~~~~~
help: ...and then remove returned values
|
134 - Ok(())
134 +
|
src/config.rs|19 col 35| warning: calling Scaffold::default() is more clear than this expression
--> src/config.rs:19:35
|
19 | Commands::Check() => Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: Scaffold::default()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
src/config.rs|26 col 38| warning: calling Check::default() is more clear than this expression
--> src/config.rs:26:38
|
26 | Commands::Scaffold(
) => Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: Check::default()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
src/config.rs|40 col 19| warning: struct update has no effect, all the fields in the struct have already been specified
--> src/config.rs:40:19
|
40 | ..Config::default()
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
= note: #[warn(clippy::needless_update)] implied by #[warn(clippy::all)]
src/config.rs|61 col 24| warning: calling Scaffold::default() is more clear than this expression
--> src/config.rs:61:24
|
61 | 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
src/config.rs|66 col 1| warning: docs for function returning Result missing # Errors section
--> src/config.rs:66:1
|
66 | pub fn run() -> 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)]
src/hir/combiner.rs|114 col 5| warning: docs for function returning Result missing # Errors section
--> src/hir/combiner.rs:114:5
|
114 | pub fn combine(self, text: &str, hirs: Vec) -> Result {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
src/hir/visitor.rs|44 col 5| warning: docs for function returning Result missing # Errors section
--> 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
src/hir/visitor.rs|56 col 5| warning: docs for function returning Result missing # Errors section
--> 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
src/hir/visitor.rs|82 col 5| warning: docs for function returning Result missing # Errors section
--> 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
src/hir/mod.rs|22 col 1| warning: docs for function returning Result missing # Errors section
--> src/hir/mod.rs:22:1
|
22 | pub fn translate(text: &str, cfg: &Config) -> anyhow::Result {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
src/hir/mod.rs|47 col 1| warning: docs for function returning Result missing # Errors section
--> src/hir/mod.rs:47:1
|
47 | pub fn translate_tree_to_hir(tree: &str, cfg: &Config) -> error::Result {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
src/hir/mod.rs|47 col 8| warning: item name ends with its containing module's name
--> src/hir/mod.rs:47:8
|
47 | pub fn translate_tree_to_hir(tree: &str, cfg: &Config) -> error::Result {
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
= note: #[warn(clippy::module_name_repetitions)] implied by #[warn(clippy::pedantic)]
src/scaffold/modifiers.rs|43 col 5| warning: docs for function which may panic missing # Panics section
--> src/scaffold/modifiers.rs:43:5
|
43 | pub fn discover(&mut self, ast: &Ast) -> &IndexMap<String, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/scaffold/modifiers.rs:46:17
|
46 | self.visit_root(root).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: #[warn(clippy::missing_panics_doc)] implied by #[warn(clippy::pedantic)]
src/scaffold/mod.rs|26 col 1| warning: more than 3 bools in a struct
--> src/scaffold/mod.rs:26:1
|
26 | / pub struct Scaffold {
27 | | /// The set of tree files to generate from.
28 | | ///
29 | | /// Each Solidity file will be named after its matching
... |
57 | | pub skip_modifiers: bool,
58 | | }
| |
^
|
= 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: #[warn(clippy::struct_excessive_bools)] implied by #[warn(clippy::pedantic)]
src/scaffold/mod.rs|148 col 1| warning: docs for function which may panic missing # Panics section
--> src/scaffold/mod.rs:148:1
|
148 | pub fn scaffold(text: &str, cfg: &Config) -> crate::error::Result {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/scaffold/mod.rs:153:9
|
153 | 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
src/scaffold/mod.rs|148 col 1| warning: docs for function returning Result missing # Errors section
--> src/scaffold/mod.rs:148:1
|
148 | pub fn scaffold(text: &str, cfg: &Config) -> crate::error::Result {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
src/syntax/parser.rs|145 col 5| warning: docs for function returning Result missing # Errors section
--> src/syntax/parser.rs:145:5
|
145 | pub fn parse(&mut self, text: &str, tokens: &[Token]) -> Result {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
src/syntax/semantics.rs|130 col 5| warning: docs for function which may panic missing # Panics section
--> src/syntax/semantics.rs:130:5
|
130 | pub fn analyze(&mut self, ast: &ast::Ast) -> Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/syntax/semantics.rs:131:9
|
131 | / match ast {
132 | | Ast::Root(root) => self.visit_root(root),
133 | | Ast::Condition(condition) => self.visit_condition(condition),
134 | | Ast::Action(action) => self.visit_action(action),
... |
140 | | // be stored in self.errors.
141 | | .unwrap();
| |
^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
src/syntax/semantics.rs|130 col 5| warning: docs for function returning Result missing # Errors section
--> src/syntax/semantics.rs:130:5
|
130 | 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
src/syntax/tokenizer.rs|161 col 5| warning: docs for function returning Result missing # Errors section
--> src/syntax/tokenizer.rs:161:5
|
161 | pub fn tokenize(&mut self, text: &str) -> Result<Vec> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
src/syntax/visitor.rs|32 col 5| warning: docs for function returning Result missing # Errors section
--> src/syntax/visitor.rs:32:5
|
32 | / fn visit_description(
33 | | &mut self,
34 | | description: &ast::Description,
35 | | ) -> Result<Self::Output, Self::Error>;
| |___________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
src/syntax/mod.rs|14 col 1| warning: docs for function returning Result missing # Errors section
--> src/syntax/mod.rs:14:1
|
14 | pub fn parse(text: &str) -> crate::error::Resultast::Ast {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Annotations

Check warning on line 56 in src/check/context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] 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)]`
Raw output
src/check/context.rs:56:58:w: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)]`


__END__

Check warning on line 142 in src/check/rules/structural_match.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] 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)]`
Raw output
src/check/rules/structural_match.rs:142:21:w: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)]`


__END__

Check warning on line 196 in src/check/violation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] 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
Raw output
src/check/violation.rs:196:48:w: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


__END__

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

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] 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
Raw output
src/hir/visitor.rs:32:5:w: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


__END__

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

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] 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
Raw output
src/hir/visitor.rs:70:5:w: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


__END__

Check warning on line 91 in src/scaffold/emitter.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] 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)]`
Raw output
src/scaffold/emitter.rs:91:9:w: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)]`


__END__

Check warning on line 17 in src/syntax/visitor.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] 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
Raw output
src/syntax/visitor.rs:17:5:w: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


__END__

Check warning on line 22 in src/syntax/visitor.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] 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
Raw output
src/syntax/visitor.rs:22:5:w: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


__END__

Check warning on line 27 in src/syntax/visitor.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] 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
Raw output
src/syntax/visitor.rs:27:5:w: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


__END__