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

reformat #135

Merged
merged 4 commits into from
Sep 19, 2023
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
23 changes: 19 additions & 4 deletions src/cmd/fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,24 @@ pub enum Error {
},
}

#[cfg(target_family = "windows")]
fn fossa_path_command() -> &'static str {
"where.exe fossa"
}

#[cfg(target_family = "unix")]
fn fossa_path_command() -> &'static str {
"which fossa"
}

#[cfg(target_family = "windows")]
fn cli_command() -> &'static str {
"PATH ; fossa.exe analyze -o"
r#"$env:PATH="" ; <INSERT YOUR FOSSA PATH> analyze -o"#
}

#[cfg(target_family = "unix")]
fn cli_command() -> &'static str {
r#"PATH="" fossa analyze -o"#
r#"PATH="" <NSERT YOUR FOSSA PATH> analyze -o"#
}

impl Error {
Expand Down Expand Up @@ -263,6 +273,7 @@ impl Error {

fn integration_scan_error(remote: &Remote, branch: &String) -> Self {
let cli_command = cli_command().green();
let fossa_path_command = fossa_path_command().green();
let git_command = format!("git clone -b {} {}", branch, remote).green();

let msg = formatdoc!(
Expand All @@ -271,8 +282,12 @@ impl Error {
To view the error, you must first download the failing integration. You can download the integration by using the following command:

{git_command}

Once the download is complete, you can debug the issue by running the following command in directory of your downloaded integration:

Next, use the following command to locate the path of the fossa-cli:

{fossa_path_command}

Once the download is complete, you can debug the issue by running the following command in the directory of your downloaded integration:

{cli_command}"
);
Expand Down
1 change: 0 additions & 1 deletion src/cmd/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ struct ScanGitVCSReference {
}

impl ScanGitVCSReference {
/// Instantiate ScanGitVCSReference instance
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially had this comment because I made this a public function because I needed it to grab the jobID and clippy/ rustfmt wanted me to provide a comment. I'm not using it anymore so I opted to just delete the comment and have it restored back to what ti was originally

fn new(integration: &Integration, reference: &Reference) -> Self {
Self {
scan_id: Uuid::new_v4().to_string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ Broker encountered an error while scanning your git remote at 'https://github.co
To view the error, you must first download the failing integration. You can download the integration by using the following command:

git clone -b master https://github.com/fossas/empty.git

Next, use the following command to locate the path of the fossa-cli:

which fossa

Once the download is complete, you can debug the issue by running the following command in the directory of your downloaded integration:

Once the download is complete, you can debug the issue by running the following command in directory of your downloaded integration:

PATH="" fossa analyze -o
PATH="" <NSERT YOUR FOSSA PATH> analyze -o

Errors found while checking connection to FOSSA

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ Broker encountered an error while scanning your git remote at 'https://github.co
To view the error, you must first download the failing integration. You can download the integration by using the following command:

git clone -b master https://github.com/fossas/empty.git

Next, use the following command to locate the path of the fossa-cli:

where.exe fossa

Once the download is complete, you can debug the issue by running the following command in the directory of your downloaded integration:

Once the download is complete, you can debug the issue by running the following command in directory of your downloaded integration:

PATH ; fossa.exe analyze -o
$env:PATH="" ; <INSERT YOUR FOSSA PATH> analyze -o

Errors found while checking connection to FOSSA

Expand Down