Skip to content

[fg] Bumped tree sitter parsers and added logging #626

[fg] Bumped tree sitter parsers and added logging

[fg] Bumped tree sitter parsers and added logging #626

Triggered via push December 17, 2024 19:36
Status Failure
Total duration 1m 23s
Artifacts
Fit to window
Zoom out
Zoom in

Annotations

1 error and 25 warnings
test
Process completed with exit code 101.
test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
this `map_or` can be simplified: git-function-history-lib/src/lib.rs#L552
warning: this `map_or` can be simplified --> git-function-history-lib/src/lib.rs:552:5 | 552 | / filename 553 | | .extension() 554 | | .map_or(false, |ext| ext.eq_ignore_ascii_case(file_ext)) | |________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `#[warn(clippy::unnecessary_map_or)]` on by default help: use is_some_and instead | 552 ~ filename 553 + .extension().is_some_and(|ext| ext.eq_ignore_ascii_case(file_ext)) |
this argument is passed by value, but not consumed in the function body: git-function-history-lib/src/lib.rs#L538
warning: this argument is passed by value, but not consumed in the function body --> git-function-history-lib/src/lib.rs:538:12 | 538 | files: Vec<(String, String)>, | ^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type to: `&[(String, String)]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
this argument is passed by value, but not consumed in the function body: git-function-history-lib/src/lib.rs#L338
warning: this argument is passed by value, but not consumed in the function body --> git-function-history-lib/src/lib.rs:338:11 | 338 | path: String, | ^^^^^^ help: consider changing the type to: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
this argument is passed by value, but not consumed in the function body: git-function-history-lib/src/lib.rs#L323
warning: this argument is passed by value, but not consumed in the function body --> git-function-history-lib/src/lib.rs:323:11 | 323 | repo: gix::Repository, | ^^^^^^^^^^^^^^^ help: consider taking a reference instead: `&gix::Repository` | = 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)]`
docs for function which may panic missing `# Panics` section: git-function-history-lib/src/lib.rs#L139
warning: docs for function which may panic missing `# Panics` section --> git-function-history-lib/src/lib.rs:139:1 | 139 | / pub fn get_function_history( 140 | | name: &str, 141 | | file: &FileFilterType, 142 | | filter: &Filter, 143 | | langs: &[&dyn SupportedLanguage], 144 | | ) -> Result<FunctionHistory, Box<dyn Error + Send + Sync>> { | |__________________________________________________________^ | note: first possible panic found here --> git-function-history-lib/src/lib.rs:234:17 | 234 | let langs = langs.instantiate_map(name).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
docs for function which may panic missing `# Panics` section: git-function-history-lib/src/types.rs#L84
warning: docs for function which may panic missing `# Panics` section --> git-function-history-lib/src/types.rs:84:5 | 84 | pub fn get_metadata(&self) -> HashMap<String, String> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first possible panic found here --> git-function-history-lib/src/types.rs:90:201 | 90 | ...le|file.file_name().expect("error ocurred, could not get filename, no filename for current file\nfile a bug to https://github.com/mendelsshop/git_function_history/issues").to... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 --> git-function-history-lib/src/lib.rs:1:9 | 1 | #![warn(clippy::pedantic, clippy::nursery, clippy::cargo)] | ^^^^^^^^^^^^^^^^ = note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`
empty line after doc comment: git-function-history-lib/src/lib.rs#L14
warning: empty line after doc comment --> git-function-history-lib/src/lib.rs:14:1 | 14 | / /// code and function related language 15 | | | |_^ 16 | /// Different types that can extracted from the result of `get_function_history`. 17 | pub mod types; | ------------- the comment documents this module | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default = help: if the empty line is unintentional remove it help: if the comment should document the crate use an inner doc comment | 14 | //! code and function related language | ~ help: if the documentation should include the empty line include it in the comment | 15 | /// |
trait `UnwrapToError` is never used: git-function-history-lib/src/lib.rs#L557
warning: trait `UnwrapToError` is never used --> git-function-history-lib/src/lib.rs:557:7 | 557 | trait UnwrapToError<T> { | ^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused macro definition: `get_item_from`: git-function-history-lib/src/lib.rs#L18
warning: unused macro definition: `get_item_from` --> git-function-history-lib/src/lib.rs:18:14 | 18 | macro_rules! get_item_from { | ^^^^^^^^^^^^^ | = note: `#[warn(unused_macros)]` on by default
first doc comment paragraph is too long: function-grep/src/lib.rs#L80
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 = note: `#[warn(clippy::too_long_first_doc_paragraph)]` implied by `#[warn(clippy::nursery)]`
docs for function returning `Result` missing `# Errors` section: function-grep/src/supported_languages.rs#L229
warning: docs for function returning `Result` missing `# Errors` section --> function-grep/src/supported_languages.rs:229:5 | 229 | / fn instantiate_map( 230 | | self, 231 | | name: &'a str, 232 | | ) -> Result<Vec<InstantiatedLanguage<'a>>, InstantiationError>; | |___________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
docs for function returning `Result` missing `# Errors` section: function-grep/src/supported_languages.rs#L219
warning: docs for function returning `Result` missing `# Errors` section --> function-grep/src/supported_languages.rs:219:5 | 219 | / fn to_language<'a>( 220 | | &self, 221 | | search: &'a str, 222 | | ) -> Result<InstantiatedLanguage<'a>, InstantiationError> { | |_____________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
docs for function returning `Result` missing `# Errors` section: function-grep/src/supported_languages.rs#L218
warning: docs for function returning `Result` missing `# Errors` section --> function-grep/src/supported_languages.rs:218:5 | 218 | fn instantiate(&self, search: Box<str>) -> Result<QueryFunction, InstantiationError>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
called `map(<f>).unwrap_or_else(<g>)` on a `Result` value: function-grep/src/supported_languages.rs#L184
warning: called `map(<f>).unwrap_or_else(<g>)` on a `Result` value --> function-grep/src/supported_languages.rs:184:21 | 184 | / tag_config 185 | | .generate_tags(&mut tag_context, code, None) 186 | | .map(|tags| { 187 | | let ranges = tags ... | 202 | | }) 203 | | .unwrap_or_else(|_| vec![].into_boxed_slice()) | |______________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or = note: `#[warn(clippy::map_unwrap_or)]` implied by `#[warn(clippy::pedantic)]`
some fields in `TagsConfigurationThreadSafe` are not safe to be sent to another thread: function-grep/src/supported_languages.rs#L153
warning: some fields in `TagsConfigurationThreadSafe` are not safe to be sent to another thread --> function-grep/src/supported_languages.rs:153:1 | 153 | unsafe impl Send for TagsConfigurationThreadSafe {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: it is not safe to send field `0` to another thread --> function-grep/src/supported_languages.rs:152:36 | 152 | struct TagsConfigurationThreadSafe(TagsConfiguration); | ^^^^^^^^^^^^^^^^^ = help: use a thread-safe type that implements `Send` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_send_fields_in_send_ty note: the lint level is defined here --> function-grep/src/lib.rs:5:27 | 5 | #![warn(clippy::pedantic, clippy::nursery, clippy::cargo)] | ^^^^^^^^^^^^^^^ = note: `#[warn(clippy::non_send_fields_in_send_ty)]` implied by `#[warn(clippy::nursery)]`
docs for function returning `Result` missing `# Errors` section: function-grep/src/filter.rs#L359
warning: docs for function returning `Result` missing `# Errors` section --> function-grep/src/filter.rs:359:5 | 359 | pub fn add_filter(&mut self, filter: impl Into<FilterType<'a>>) -> Result<(), String> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
method `default` can be confused for the standard trait method `std::default::Default::default`: function-grep/src/filter.rs#L315
warning: method `default` can be confused for the standard trait method `std::default::Default::default` --> function-grep/src/filter.rs:315:5 | 315 | / pub fn default() -> Self { 316 | | Self { 317 | | filters: HashMap::from([ ... | 355 | | } | |_____^ | = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait = note: `#[warn(clippy::should_implement_trait)]` on by default
docs for function returning `Result` missing `# Errors` section: function-grep/src/filter.rs#L263
warning: docs for function returning `Result` missing `# Errors` section --> function-grep/src/filter.rs:263:5 | 263 | pub fn to_filter(&self, s: &str) -> Result<InstantiatedFilterType, String> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
manual `Debug` impl does not include all fields: function-grep/src/filter.rs#L156
warning: manual `Debug` impl does not include all fields --> function-grep/src/filter.rs:156:1 | 156 | / impl<Supports: std::fmt::Debug> std::fmt::Debug for InstantiatedFilter<Supports> { 157 | | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 158 | | f.debug_struct("InstantiatedFilter") 159 | | .field("filter_information", &self.filter_information) ... | 162 | | } | |_^ | note: this field is unused --> function-grep/src/filter.rs:137:5 | 137 | 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)]`
re-implementing `PartialEq::ne` is unnecessary: function-grep/src/filter.rs#L145
warning: re-implementing `PartialEq::ne` is unnecessary --> function-grep/src/filter.rs:145:5 | 145 | / fn ne(&self, other: &Self) -> bool { 146 | | !self.eq(other) 147 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl = note: `#[warn(clippy::partialeq_ne_impl)]` on by default
docs for function returning `Result` missing `# Errors` section: function-grep/src/filter.rs#L46
warning: docs for function returning `Result` missing `# Errors` section --> function-grep/src/filter.rs:46:5 | 46 | fn to_filter(&self, s: &str) -> Result<InstantiatedFilter<Self::Supports>, String> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
docs for function returning `Result` missing `# Errors` section: function-grep/src/filter.rs#L44
warning: docs for function returning `Result` missing `# Errors` section --> function-grep/src/filter.rs:44:5 | 44 | 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)]`
unused macro definition: `default_filters`: function-grep/src/filter.rs#L212
warning: unused macro definition: `default_filters` --> function-grep/src/filter.rs:212:14 | 212 | macro_rules! default_filters { | ^^^^^^^^^^^^^^^ | = note: `#[warn(unused_macros)]` on by default
clippy_check
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636