Skip to content

Commit

Permalink
Linter returns non-zero exit code on warnings (#15761)
Browse files Browse the repository at this point in the history
  • Loading branch information
vineethk authored Jan 16, 2025
1 parent fbf0256 commit 4b69e48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions aptos-move/framework/src/built_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl BuiltPackage {

if let Some(model_options) = model.get_extension::<Options>() {
if model_options.experiment_on(Experiment::STOP_BEFORE_EXTENDED_CHECKS) {
std::process::exit(0)
std::process::exit(if model.has_warnings() { 1 } else { 0 })
}
}

Expand All @@ -287,7 +287,7 @@ impl BuiltPackage {

if let Some(model_options) = model.get_extension::<Options>() {
if model_options.experiment_on(Experiment::STOP_AFTER_EXTENDED_CHECKS) {
std::process::exit(0)
std::process::exit(if model.has_warnings() { 1 } else { 0 })
}
}

Expand Down
4 changes: 2 additions & 2 deletions third_party/move/move-compiler-v2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ where
check_errors(&env, emitter, "checking errors")?;

if options.experiment_on(Experiment::STOP_BEFORE_STACKLESS_BYTECODE) {
std::process::exit(0)
std::process::exit(if env.has_warnings() { 1 } else { 0 })
}

// Run code generator
Expand Down Expand Up @@ -140,7 +140,7 @@ where
check_errors(&env, emitter, "stackless-bytecode analysis errors")?;

if options.experiment_on(Experiment::STOP_BEFORE_FILE_FORMAT) {
std::process::exit(0)
std::process::exit(if env.has_warnings() { 1 } else { 0 })
}

let modules_and_scripts = run_file_format_gen(&mut env, &targets);
Expand Down

0 comments on commit 4b69e48

Please sign in to comment.