Skip to content

Commit

Permalink
Merge pull request #11 from nfurfaro/feature/fix-progress-bar
Browse files Browse the repository at this point in the history
Feature/fix progress bar
  • Loading branch information
nfurfaro authored Feb 15, 2024
2 parents 46b62f0 + ef7ae20 commit b46fbfa
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 32 deletions.
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,10 @@ At a high level, Hunter exposes a CLI with 2 primary commands, scan and mutate.

## Installation

There are 2 ways to install Hunter: via cURL or by building from source.

### cURL

1. Download the installation script using cURL:
`curl -LO https://github.com/nfurfaro/hunter/blob/master/scripts/install.sh | bash`

2. Make the script executable:
`chmod +x install.sh`

3. run the script:
`./install.sh`

This will install the binary to `/usr/local/bin`.
You should now be able to run the program by typing `hunter` in your terminal!

### Build from source

Alternatively, you can build Hunter from source. To do so, you'll need to have Rust installed. If you don't have Rust installed, you can install it by following the instructions [here](https://www.rust-lang.org/tools/install).
You can easily build Hunter from source. To do so, you'll need to have Rust installed. If you don't have Rust installed, you can install it by following the instructions [here](https://www.rust-lang.org/tools/install).

1. Clone the repo:
`git clone [email protected]:nfurfaro/hunter.git`
Expand Down
4 changes: 1 addition & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ pub async fn run_cli() -> Result<()> {
Some(Subcommand::Mutate) => {
let result = handlers::scanner::scan(args.clone(), config.clone_box());
if let Ok(mut result) = result {
let final_result =
handlers::mutator::mutate(args.clone(), config.clone_box(), &mut result);
let _ = print_scan_results(&mut result.clone(), config.clone_box());
final_result
handlers::mutator::mutate(args.clone(), config.clone_box(), &mut result)
} else {
Err(result.unwrap_err())
}
Expand Down
8 changes: 0 additions & 8 deletions src/languages/noir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ impl LanguageConfig for NoirConfig {
"Nargo.toml"
}

// fn is_test_failed(&self, stderr: &str) -> bool {
// let stderr = stderr.to_lowercase();
// stderr.contains("test failed")
// || stderr.contains("failed")
// || stderr.contains("fail")
// || stderr.contains("failed constraint")
// }

fn excluded_dirs(&self) -> Vec<&'static str> {
vec!["temp", "target", "test", "tests"]
}
Expand Down
5 changes: 0 additions & 5 deletions src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ pub fn process_mutants(
.insert(temp_dir.path().to_path_buf());
TEMP_DIRS.lock().unwrap().insert(temp_src_dir.clone());

dbg!(temp_src_dir.clone());

let extension = config.ext();

// Check if the temporary directory exists
Expand Down Expand Up @@ -102,16 +100,13 @@ pub fn process_mutants(

match build_status {
Some(0) => {
println!("Build was successful");
match test_status {
Some(0) => {
println!("Test suite passed");
m.set_status(MutationStatus::Survived);
survived.fetch_add(1, Ordering::SeqCst);
pending.fetch_sub(1, Ordering::SeqCst);
}
Some(_) => {
println!("Test suite failed");
destroyed.fetch_add(1, Ordering::SeqCst);
pending.fetch_sub(1, Ordering::SeqCst);
m.set_status(MutationStatus::Killed);
Expand Down

0 comments on commit b46fbfa

Please sign in to comment.