Skip to content

[function-grep] Bumped tree sitter version #281

[function-grep] Bumped tree sitter version

[function-grep] Bumped tree sitter version #281

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / clippy failed Sep 3, 2024 in 0s

clippy

4 errors, 8 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 4
Warning 8
Note 0
Help 0

Versions

  • rustc 1.80.1 (3f5fd8dd4 2024-08-06)
  • cargo 1.80.1 (376290515 2024-07-16)
  • clippy 0.1.80 (3f5fd8d 2024-08-06)

Annotations

Check warning on line 85 in function-grep/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

first doc comment paragraph is too long

warning: first doc comment paragraph is too long
  --> function-grep/src/lib.rs:80:1
   |
80 | / /// Tries to find the appropiate language for the given file [`file_name`] based on the list of
81 | | /// languages [`langs`] provided.
82 | | /// This works by obtaining the extension from the file path and using
83 | | /// [`get_file_type_from_file_ext`].
84 | | ///
85 | | /// # Errors
   | |_
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph

Check warning on line 206 in function-grep/src/supported_languages.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

first doc comment paragraph is too long

warning: first doc comment paragraph is too long
   --> function-grep/src/supported_languages.rs:200:1
    |
200 | / /// Use to more easily make new [`SupportedLanguage`]s.
201 | | /// First provide the name (which is used as the type of the language), followed by the tree sitter
202 | | /// languge in parenthesis, next you put the file extensions in brackets with a leading .
203 | | /// to specify the query we use ?= variable -> string literal query.
204 | | /// In the query you when you want use the variable just do {variable}.
205 | | ///
206 | | /// Example:
    | |_
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
    = note: `#[warn(clippy::too_long_first_doc_paragraph)]` on by default
help: add an empty line
    |
200 ~ /// Use to more easily make new [`SupportedLanguage`]s.
201 + ///
    |

Check warning on line 148 in function-grep/src/supported_languages.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
   --> function-grep/src/supported_languages.rs:148:5
    |
148 |     fn instatiate_map(self, name: &'a str) -> Result<Vec<InstatiatedLanguage<'a>>, QueryError>;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check failure on line 123 in function-grep/src/supported_languages.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

error: used `unwrap()` on a `Result` value
   --> function-grep/src/supported_languages.rs:119:21
    |
119 |           let query = Query::new(
    |  _____________________^
120 | |             &self.language(),
121 | |             &self.query_string_function(search.as_ref()),
122 | |         )
123 | |         .unwrap();
    | |_________________^
    |
    = note: if this value is an `Err`, it will panic
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check failure on line 106 in function-grep/src/supported_languages.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

error: used `unwrap()` on a `Result` value
   --> function-grep/src/supported_languages.rs:106:61
    |
106 |                         .any(|c| c.index == method_field && c.node.utf8_text(code).unwrap() == name)
    |                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check failure on line 97 in function-grep/src/supported_languages.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on an `Option` value

error: used `unwrap()` on an `Option` value
  --> function-grep/src/supported_languages.rs:95:28
   |
95 |           let method_field = query
   |  ____________________________^
96 | |             .capture_index_for_name(&self.query_name().to_string())
97 | |             .unwrap();
   | |_____________________^
   |
   = note: if this value is `None`, it will panic
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check failure on line 94 in function-grep/src/supported_languages.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

error: used `unwrap()` on a `Result` value
  --> function-grep/src/supported_languages.rs:94:21
   |
94 |         let query = Query::new(&self.language(), &self.query_string().to_string()).unwrap();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: if this value is an `Err`, it will panic
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
note: the lint level is defined here
  --> function-grep/src/lib.rs:2:9
   |
2  | #![deny(clippy::unwrap_used, clippy::expect_used)]
   |         ^^^^^^^^^^^^^^^^^^^

Check warning on line 148 in function-grep/src/filter.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual `Debug` impl does not include all fields

warning: manual `Debug` impl does not include all fields
   --> function-grep/src/filter.rs:142:1
    |
142 | / impl std::fmt::Debug for InstantiatedFilter {
143 | |     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
144 | |         f.debug_struct("InstantiatedFilter")
145 | |             .field("filter_information", &self.filter_information)
146 | |             .finish()
147 | |     }
148 | | }
    | |_^
    |
note: this field is unused
   --> function-grep/src/filter.rs:127:5
    |
127 |     filter_function: FilterFunction,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: consider including all fields in this `Debug` impl
    = help: consider calling `.finish_non_exhaustive()` if you intend to ignore fields
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_fields_in_debug
    = note: `#[warn(clippy::missing_fields_in_debug)]` implied by `#[warn(clippy::pedantic)]`

Check warning on line 125 in function-grep/src/filter.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item name ends with its containing module's name

warning: item name ends with its containing module's name
   --> function-grep/src/filter.rs:125:12
    |
125 | pub struct InstantiatedFilter {
    |            ^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions

Check warning on line 49 in function-grep/src/filter.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
  --> function-grep/src/filter.rs:49:12
   |
49 | pub struct FilterInformation {
   |            ^^^^^^^^^^^^^^^^^
   |
   = 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)]`

Check warning on line 39 in function-grep/src/filter.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
  --> function-grep/src/filter.rs:39:5
   |
39 |     fn to_filter(&self, s: &str) -> Result<InstantiatedFilter, String> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 37 in function-grep/src/filter.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
  --> function-grep/src/filter.rs:37:5
   |
37 |     fn parse_filter(&self, s: &str) -> Result<FilterFunction, String>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
note: the lint level is defined here
  --> function-grep/src/lib.rs:5:9
   |
5  | #![warn(clippy::pedantic, clippy::nursery, clippy::cargo)]
   |         ^^^^^^^^^^^^^^^^
   = note: `#[warn(clippy::missing_errors_doc)]` implied by `#[warn(clippy::pedantic)]`