Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 81 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ rowan = "0.15.15"
smol_str = "0.3.2"
enum-iterator = "2.1.0"
line-index = "0.1.2"
lsp-server = "0.7.8"
lsp-types = "0.95"
serde-wasm-bindgen = "0.6.5"
wasm-bindgen = "0.2.100"
wasm-bindgen-test = "0.3.34"
Expand All @@ -57,6 +59,7 @@ squawk_lexer = { version = "0.0.0", path = "./crates/squawk_lexer" }
squawk_parser = { version = "0.0.0", path = "./crates/squawk_parser" }
squawk_syntax = { version = "0.0.0", path = "./crates/squawk_syntax" }
squawk_linter = { version = "0.0.0", path = "./crates/squawk_linter" }
squawk_server = { version = "0.0.0", path = "./crates/squawk_server" }

[workspace.lints.clippy]
collapsible_else_if = "allow"
Expand Down
3 changes: 3 additions & 0 deletions crates/squawk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ squawk_syntax.workspace = true
squawk_linter.workspace = true
squawk_lexer.workspace = true
squawk_github.workspace = true
squawk_server.workspace = true
toml.workspace = true
glob.workspace = true
anyhow.workspace = true
annotate-snippets.workspace = true
line-index.workspace = true
lsp-server.workspace = true
lsp-types.workspace = true

[dev-dependencies]
insta.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions crates/squawk/src/github.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::Command;
use crate::UploadToGithubArgs;
use crate::config::Config;
use crate::reporter::{CheckReport, fmt_tty_violation};
use crate::{file_finding::find_paths, reporter::check_files};
Expand Down Expand Up @@ -69,7 +69,7 @@ fn create_gh_app(
const COMMENT_HEADER: &str = "# Squawk Report";

pub fn check_and_comment_on_pr(
cmd: Command,
args: UploadToGithubArgs,
cfg: &Config,
is_stdin: bool,
stdin_path: Option<String>,
Expand All @@ -78,7 +78,7 @@ pub fn check_and_comment_on_pr(
pg_version: Option<Version>,
assume_in_transaction: bool,
) -> Result<()> {
let Command::UploadToGithub {
let UploadToGithubArgs {
paths,
fail_on_violations,
github_private_key,
Expand All @@ -89,7 +89,7 @@ pub fn check_and_comment_on_pr(
github_repo_name,
github_pr_number,
github_private_key_base64,
} = cmd;
} = args;

let fail_on_violations =
if let Some(fail_on_violations_cfg) = cfg.upload_to_github.fail_on_violations {
Expand Down
Loading
Loading