Skip to content

Commit

Permalink
fix(deno-lint): has_error value
Browse files Browse the repository at this point in the history
Close #545
  • Loading branch information
Brooooooklyn committed Nov 2, 2021
1 parent 4f51993 commit 6dcd9b4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/deno-lint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ crate-type = ["cdylib"]
[dependencies]
annotate-snippets = {version = "0.9", features = ["color"]}
anyhow = "1"
deno_ast = "0.4.1"
deno_lint = "0.18.1"
deno_ast = "0.5.0"
deno_lint = "0.19.0"
env_logger = "0.9"
global_alloc = {path = "../../crates/alloc"}
globwalk = "0.8"
Expand Down
2 changes: 1 addition & 1 deletion packages/deno-lint/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LintCommand extends Command {

private readonly checkOnly = Option.Boolean('--check-only', { required: false })

execute() {
async execute() {
const hasError = denolint(this.cwd ?? __dirname, this.configPath ?? '.denolint.json')
return Promise.resolve(hasError && !this.checkOnly ? 1 : 0)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/deno-lint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fn lint_command(ctx: CallContext) -> Result<JsBoolean> {
status: Status::GenericFailure,
reason: format!("Lint failed: {}, at: {:?}", e, &p),
})?;
has_error = !file_diagnostics.is_empty();
has_error = has_error || !file_diagnostics.is_empty();
diagnostics::display_diagnostics(&file_diagnostics, s.source(), true);
}
}
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2021-10-21
nightly-2021-11-01

0 comments on commit 6dcd9b4

Please sign in to comment.