Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
Remove more references to crates and cargo.
Browse files Browse the repository at this point in the history
  • Loading branch information
ffranr committed Sep 26, 2019
1 parent 97081a4 commit 2bec782
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 133 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Thank you for using `crev`!
Thank you for using `git-crev`!

If you want to ask a question, try crev's gitter channel first: https://gitter.im/dpc/crev . You might get a faster answer.

Expand All @@ -7,6 +7,6 @@ If you want to report an issue, please go through the following checklist:
* If a command is failing try running it with `RUST_BACKTRACE=1`
* Paste the exact command and error and/or outputs (along with the backtrace)
* Please let us know:
* Which version are you using (eg. `cargo crev --version`)
* How did you install `crev` (git?, cargo?, your distribution?)
* Which version are you using (eg. `git-crev --version`)
* How did you install `git-crev` (git?, cargo?, your distribution?)
* What OS/platform are you running on
2 changes: 1 addition & 1 deletion ci/prep_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -x

export CRATE_NAME=cargo-crev
export CRATE_NAME=git-crev
name="$TRAVIS_TAG-$TARGET"
mkdir -p "$name"
cp "target/$TARGET/release/$CRATE_NAME" "$name/"
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use crev_lib::{self, local::Local};
use std::io::BufRead;
use structopt::StructOpt;

#[cfg(feature = "documentation")]
/// Documentation
pub mod doc;
// #[cfg(feature = "documentation")]
// /// Documentation
// pub mod doc;

mod opts;
mod prelude;
Expand Down
124 changes: 4 additions & 120 deletions src/opts.rs
Original file line number Diff line number Diff line change
@@ -1,40 +1,6 @@
use crev_data::Level;
use semver::Version;
use std::ffi::OsString;
use std::path::PathBuf;
use structopt::StructOpt;

#[derive(Debug, StructOpt, Clone)]
pub struct CrateSelector {
pub name: Option<String>,
pub version: Option<Version>,
}

#[derive(Debug, StructOpt, Clone, Default)]
pub struct CargoOpts {
#[structopt(long = "features", value_name = "FEATURES")]
/// Space-separated list of features to activate
pub features: Option<String>,
#[structopt(long = "all-features")]
/// Activate all available features
pub all_features: bool,
#[structopt(long = "no-default-features")]
/// Do not activate the `default` feature
pub no_default_features: bool,
#[structopt(long = "target", value_name = "TARGET")]
/// Set the target triple
pub target: Option<String>,
#[structopt(long = "no-dev-dependencies")]
/// Skip dev dependencies.
pub no_dev_dependencies: bool,
#[structopt(long = "manifest-path", value_name = "PATH", parse(from_os_str))]
/// Path to Cargo.toml
pub manifest_path: Option<PathBuf>,
#[structopt(short = "Z", value_name = "FLAG")]
/// Unstable (nightly-only) flags to Cargo
pub unstable_flags: Vec<String>,
}

#[derive(Debug, StructOpt, Clone)]
pub struct NewId {
#[structopt(long = "url")]
Expand Down Expand Up @@ -120,15 +86,12 @@ impl From<VerificationRequirements> for crev_lib::VerificationRequirements {
}

#[derive(Debug, StructOpt, Clone, Default)]
pub struct Update {
#[structopt(flatten)]
pub cargo_opts: CargoOpts,
}
pub struct Update {}

#[derive(Debug, StructOpt, Clone, Default)]
pub struct Verify {
#[structopt(long = "verbose", short = "v")]
/// Display more informations about the crates
/// Display more information
pub verbose: bool,

#[structopt(long = "interactive", short = "i")]
Expand All @@ -141,11 +104,11 @@ pub struct Verify {
pub requirements: VerificationRequirements,

#[structopt(long = "skip-verified")]
/// Display only crates not passing the verification
/// Display only commits not passing the verification
pub skip_verified: bool,

#[structopt(long = "skip-known-owners")]
/// Skip crate from known owners (use `edit known` to edit the list)
/// Skip commits from known owners (use `edit known` to edit the list)
pub skip_known_owners: bool,

#[structopt(long = "for-id")]
Expand All @@ -155,9 +118,6 @@ pub struct Verify {
#[structopt(long = "recursive")]
/// Calculate recursive metrics for your packages
pub recursive: bool,

#[structopt(flatten)]
pub cargo_opts: CargoOpts,
}

#[derive(Debug, StructOpt, Clone)]
Expand Down Expand Up @@ -215,37 +175,6 @@ pub enum QueryId {
},
}

#[derive(Debug, StructOpt, Clone)]
pub struct QueryReview {
#[structopt(flatten)]
pub crate_: CrateSelector,
}

#[derive(Debug, StructOpt, Clone)]
pub struct QueryAdvisory {
#[structopt(flatten)]
pub crate_: CrateSelector,
}

#[derive(Debug, StructOpt, Clone)]
pub struct QueryIssue {
#[structopt(flatten)]
pub crate_: CrateSelector,

#[structopt(flatten)]
pub trust_params: TrustDistanceParams,

/// Minimum trust level of the reviewers for reviews
#[structopt(long = "trust", default_value = "none")]
pub trust_level: crev_data::Level,
}

#[derive(Debug, StructOpt, Clone)]
pub struct QueryDir {
#[structopt(flatten)]
pub common: ReviewOrGotoCommon,
}

#[derive(Debug, StructOpt, Clone)]
pub enum Query {
/// Query Ids
Expand Down Expand Up @@ -299,16 +228,6 @@ pub enum Edit {
Config,
}

#[derive(Debug, StructOpt, Clone)]
pub struct ReviewOrGotoCommon {
#[structopt(flatten)]
pub crate_: CrateSelector,

/// This crate is not neccesarily a dependency of the current cargo project
#[structopt(long = "unrelated", short = "u")]
pub unrelated: bool,
}

#[derive(Debug, StructOpt, Clone)]
pub struct CommonProofCreate {
/// Don't auto-commit local Proof Repository
Expand All @@ -328,41 +247,6 @@ pub struct CommonProofCreate {
pub no_store: bool,
}

#[derive(Debug, StructOpt, Clone)]
pub struct Review {
#[structopt(flatten)]
pub common: ReviewOrGotoCommon,

#[structopt(flatten)]
pub common_proof_create: CommonProofCreate,

/// Create advisory urging to upgrade to a safe version
#[structopt(long = "advisory")]
pub advisory: bool,

/// This release contains advisory (important fix)
#[structopt(long = "affected")]
pub affected: Option<crev_data::proof::review::package::VersionRange>,

/// Severity of bug/security issue [none low medium high]
#[structopt(long = "severity")]
pub severity: Option<Level>,

/// Flag the crate as buggy/low-quality/dangerous
#[structopt(long = "issue")]
pub issue: bool,

#[structopt(long = "skip-activity-check")]
pub skip_activity_check: bool,

#[structopt(long = "diff")]
#[allow(clippy::option_option)]
pub diff: Option<Option<semver::Version>>,

#[structopt(flatten)]
pub cargo_opts: CargoOpts,
}

#[derive(Debug, Clone, Default)]
pub struct AdviseCommon {
/// This release contains advisory (important fix)
Expand Down
6 changes: 0 additions & 6 deletions src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ pub enum VcsInfoJsonGit {
Sha1(String),
}

#[derive(Copy, Clone, PartialEq, Eq)]
pub enum UnrelatedOrDependency {
Unrelated,
Dependency,
}

pub fn create_trust_proof(
ids: Vec<String>,
trust_or_distrust: TrustOrDistrust,
Expand Down

0 comments on commit 2bec782

Please sign in to comment.