chore(misc): ci activities and lint fixes (#97)
Some checks failed
Build and Test / build (push) Has been cancelled

This commit is contained in:
Ashar 2025-11-23 13:44:10 +05:30 committed by GitHub
parent db358fc123
commit 806090e5cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 12 deletions

View file

@ -20,3 +20,5 @@ jobs:
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run lints
run: cargo clippy --all-targets -- -D warnings

2
Cargo.lock generated
View file

@ -879,7 +879,7 @@ dependencies = [
[[package]]
name = "protols"
version = "0.12.9"
version = "0.13.0"
dependencies = [
"async-lsp",
"basic-toml",

View file

@ -1,7 +1,6 @@
#[cfg(test)]
mod test {
use insta::assert_yaml_snapshot;
use insta::internals::{Content, ContentPath};
use crate::config::Config;
use crate::state::ProtoLanguageState;
@ -10,22 +9,22 @@ mod test {
fn test_workspace_symbols() {
let current_dir = std::env::current_dir().unwrap();
let ipath = vec![current_dir.join("src/workspace/input")];
let a_uri = (&format!(
let a_uri = format!(
"file://{}/src/workspace/input/a.proto",
current_dir.to_str().unwrap()
))
)
.parse()
.unwrap();
let b_uri = (&format!(
let b_uri = format!(
"file://{}/src/workspace/input/b.proto",
current_dir.to_str().unwrap()
))
)
.parse()
.unwrap();
let c_uri = (&format!(
let c_uri = format!(
"file://{}/src/workspace/input/c.proto",
current_dir.to_str().unwrap()
))
)
.parse()
.unwrap();
@ -49,7 +48,7 @@ mod test {
);
format!(
"file://<redacted>/src/workspace/input/{}",
c.as_str().unwrap().split('/').last().unwrap()
c.as_str().unwrap().split('/').next_back().unwrap()
)
})});
@ -65,7 +64,7 @@ mod test {
);
format!(
"file://<redacted>/src/workspace/input/{}",
c.as_str().unwrap().split('/').last().unwrap()
c.as_str().unwrap().split('/').next_back().unwrap()
)
})});
@ -75,11 +74,11 @@ mod test {
assert!(
c.as_str()
.unwrap()
.contains(&current_dir.to_str().unwrap())
.contains(current_dir.to_str().unwrap())
);
format!(
"file://<redacted>/src/workspace/input/{}",
c.as_str().unwrap().split('/').last().unwrap()
c.as_str().unwrap().split('/').next_back().unwrap()
)
})});