diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 4f294f3..f393e99 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -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. @@ -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 diff --git a/ci/prep_deploy.sh b/ci/prep_deploy.sh index 5e957b6..f9b3d00 100755 --- a/ci/prep_deploy.sh +++ b/ci/prep_deploy.sh @@ -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/" diff --git a/src/main.rs b/src/main.rs index 4d0a7be..a9fa66b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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; diff --git a/src/opts.rs b/src/opts.rs index e43e7f0..ea1c6f1 100644 --- a/src/opts.rs +++ b/src/opts.rs @@ -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, - pub version: Option, -} - -#[derive(Debug, StructOpt, Clone, Default)] -pub struct CargoOpts { - #[structopt(long = "features", value_name = "FEATURES")] - /// Space-separated list of features to activate - pub features: Option, - #[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, - #[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, - #[structopt(short = "Z", value_name = "FLAG")] - /// Unstable (nightly-only) flags to Cargo - pub unstable_flags: Vec, -} - #[derive(Debug, StructOpt, Clone)] pub struct NewId { #[structopt(long = "url")] @@ -120,15 +86,12 @@ impl From 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")] @@ -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")] @@ -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)] @@ -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 @@ -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 @@ -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, - - /// Severity of bug/security issue [none low medium high] - #[structopt(long = "severity")] - pub severity: Option, - - /// 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>, - - #[structopt(flatten)] - pub cargo_opts: CargoOpts, -} - #[derive(Debug, Clone, Default)] pub struct AdviseCommon { /// This release contains advisory (important fix) diff --git a/src/shared.rs b/src/shared.rs index d5c85b9..3ba5a4a 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -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, trust_or_distrust: TrustOrDistrust,