Skip to content

chore: refactor grit error #1166

chore: refactor grit error

chore: refactor grit error #1166

Triggered via pull request August 12, 2024 08:43
Status Failure
Total duration 6m 57s
Artifacts

main.yaml

on: pull_request
Rust tests (marzano)
6m 39s
Rust tests (marzano)
Rust wasm
55s
Rust wasm
Test the standard library
5m 19s
Test the standard library
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 20 warnings
Rust wasm
Process completed with exit code 1.
unneeded `return` statement: crates/core/src/marzano_resolved_pattern.rs#L700
error: unneeded `return` statement --> crates/core/src/marzano_resolved_pattern.rs:700:17 | 700 | / return Err(GritPatternError::new( 701 | | "cannot linearize files pattern, not implemented yet", 702 | | )); | |__________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `-D clippy::needless-return` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_return)]` help: remove `return` | 700 ~ Err(GritPatternError::new( 701 + "cannot linearize files pattern, not implemented yet", 702 ~ )) |
using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)`: crates/core/src/foreign_function_definition.rs#L119
error: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` --> crates/core/src/foreign_function_definition.rs:119:22 | 119 | let string = String::from_utf8(result).or_else(|_| { | ______________________^ 120 | | Err(GritPatternError::new(format!( 121 | | "function {} returned did not return a UTF-8 string", 122 | | self.name, 123 | | ))) 124 | | })?; | |__________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map help: try | 119 ~ let string = String::from_utf8(result).map_err(|_| GritPatternError::new(format!( 120 + "function {} returned did not return a UTF-8 string", 121 + self.name, 122 ~ )))?; |
using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)`: crates/core/src/foreign_function_definition.rs#L111
error: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` --> crates/core/src/foreign_function_definition.rs:111:22 | 111 | let result = function.call(&resolved_str).or_else(|e| { | ______________________^ 112 | | Err(GritPatternError::new(format!( 113 | | "failed to call function {}: {}", 114 | | self.name, e 115 | | ))) 116 | | })?; | |__________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map = note: `-D clippy::bind-instead-of-map` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::bind_instead_of_map)]` help: try | 111 ~ let result = function.call(&resolved_str).map_err(|e| GritPatternError::new(format!( 112 + "failed to call function {}: {}", 113 + self.name, e 114 ~ )))?; |
Rust wasm
This job failure may be caused by using an out of date self-hosted runner. You are currently using runner version 2.317.0. Please update to the latest version 2.319.0
Rust wasm
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Rust wasm
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Rust wasm
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rust wasm
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rust wasm
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rust wasm
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test the standard library
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Test the standard library
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Test the standard library
Restore cache failed: Dependencies file is not found in /home/runner/work/gritql/gritql. Supported file pattern: go.sum
Test the standard library
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test the standard library
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test the standard library
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test the standard library
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rust tests (marzano)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Rust tests (marzano)
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/toolchain@v1, actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Rust tests (marzano)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rust tests (marzano)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rust tests (marzano)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rust tests (marzano)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/