Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates related to changes in Scrutinizer and plotting scripts #63

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion alohomora/src/orm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod value;
mod policy;

pub use database::*;
pub use rocket::*;
pub use self::rocket::*;
pub use value::*;
pub use policy::*;

Expand Down
24 changes: 3 additions & 21 deletions alohomora_build/src/scrutinizer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,6 @@ fn remove_vars(cmd: &mut Command) {
}
}

fn generate_facts(env: &Env) {
warn!("\x1b[96mnote: \x1b[97mGenerating scrutinizer facts....\x1b[0m");

let mut cmd = Command::new(&env.cargo);
remove_vars(&mut cmd);

let status = cmd
.arg("+nightly-2023-04-12")
.arg("build")
.arg("-Zbuild-std=std,core,alloc,proc_macro")
.arg(&format!("--target={}", env.host))
.env("RUSTFLAGS", "-Zalways-encode-mir -Znll-facts")
.status()
.expect("\x1b[91merror: \x1b[97mFailed to generate scrutinizer facts'.\x1b[0m");
if !status.success() {
panic!("\x1b[91merror: \x1b[97mFailed to generate scrutinizer facts'.\x1b[0m");
}
}

// Run scrutinizer
fn run_scrutinizer(env: &Env) {
warn!("\x1b[96mnote: \x1b[97mRunning scrutinizer....\x1b[0m");
Expand All @@ -46,9 +27,11 @@ fn run_scrutinizer(env: &Env) {
remove_vars(&mut cmd);

let status = cmd
.arg("+nightly-2023-04-12")
.arg("+nightly-2023-08-25")
.arg("scrutinizer")
.args(["--config-path", "scrutinizer-config.toml"])
.env("RUST_BACKTRACE", "full")
.env("RUST_LOG", "scrutinizer=trace,scrutils=trace")
.status()
.expect("\x1b[91merror: \x1b[97mFailed to run scrutinizer'.\x1b[0m");
if !status.success() {
Expand All @@ -60,7 +43,6 @@ pub fn scrutinize(env: &Env) {
let profile = &env.profile;
if profile == "release" {
warn!("\x1b[97m Scrutinizer\x1b[0m");
generate_facts(env);
run_scrutinizer(env);
warn!("\x1b[92m Scrutinizer completed!\x1b[0m");
} else {
Expand Down
125 changes: 53 additions & 72 deletions alohomora_lints/Cargo.lock

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

Loading