From ced0c3e218fd00fa5479d32bcb23ca3dd0eb4477 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Wed, 25 Sep 2024 01:10:06 +0800 Subject: [PATCH] Fix typos (#1501) --- CONTRIBUTING.md | 2 +- cli/src/auth/oidc.rs | 16 ++++++++-------- cli/src/auth/server.rs | 2 +- cli/src/commands/auth.rs | 2 +- cli/src/commands/init.rs | 2 +- cli/src/commands/project.rs | 2 +- cli/src/permissions.rs | 2 +- cli/src/test.rs | 2 +- cli/src/types.rs | 2 +- doc_templates/README.md | 2 +- extensions/cargo/main.ts | 2 +- lockfile/src/javascript.rs | 2 +- lockfile/src/parsers/go_mod.rs | 2 +- lockfile/src/spdx.rs | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b1cb8c96..3ec76f561 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ Report bugs in the [GitHub issue tracker][bugs]. Please use the template, which should remind you to include: -* A clear and consise description of the bug +* A clear and concise description of the bug * Detailed steps to reproduce the bug * Expected behavior * Screenshots, where appropriate diff --git a/cli/src/auth/oidc.rs b/cli/src/auth/oidc.rs index fa96369af..1d3bb2c26 100644 --- a/cli/src/auth/oidc.rs +++ b/cli/src/auth/oidc.rs @@ -79,20 +79,20 @@ impl CodeVerifier { } impl From for String { - fn from(code_verfier: CodeVerifier) -> Self { - code_verfier.0 + fn from(code_verifier: CodeVerifier) -> Self { + code_verifier.0 } } impl From<&CodeVerifier> for String { - fn from(code_verfier: &CodeVerifier) -> Self { - code_verfier.0.clone() + fn from(code_verifier: &CodeVerifier) -> Self { + code_verifier.0.clone() } } impl<'a> From<&'a CodeVerifier> for &'a str { - fn from(code_verfier: &'a CodeVerifier) -> Self { - &code_verfier.0 + fn from(code_verifier: &'a CodeVerifier) -> Self { + &code_verifier.0 } } @@ -213,14 +213,14 @@ pub async fn fetch_locksmith_server_settings( fn build_grant_type_auth_code_post_body( redirect_url: &Url, authorization_code: &AuthorizationCode, - code_verfier: &CodeVerifier, + code_verifier: &CodeVerifier, token_name: Option, expiry: Option>, ) -> Result> { let mut body = hashmap! { "client_id".to_owned() => Default::default(), "code".to_owned() => authorization_code.into(), - "code_verifier".to_owned() => code_verfier.into(), + "code_verifier".to_owned() => code_verifier.into(), "grant_type".to_owned() => "authorization_code".to_owned(), // Must match previous request to /authorize but not redirected to by server "redirect_uri".to_owned() => redirect_url.to_string(), diff --git a/cli/src/auth/server.rs b/cli/src/auth/server.rs index e037822c5..08c072167 100644 --- a/cli/src/auth/server.rs +++ b/cli/src/auth/server.rs @@ -138,7 +138,7 @@ async fn spawn_server_and_get_auth_code( let is_routable = check_if_routable(format!("{auth_host}:{port}"))?; if is_routable && auth_scheme == "http" { return Err(anyhow!( - "Authorization host {auth_host} is publically routable, must use https to connect." + "Authorization host {auth_host} is publicly routable, must use https to connect." )); } diff --git a/cli/src/commands/auth.rs b/cli/src/commands/auth.rs index 8769fde22..c46de2b73 100644 --- a/cli/src/commands/auth.rs +++ b/cli/src/commands/auth.rs @@ -249,7 +249,7 @@ pub async fn handle_auth( match matches.subcommand() { Some(("register", _)) => match handle_auth_register(config, matches).await { Ok(_) => { - print_user_success!("{}", "User successfuly regsistered"); + print_user_success!("{}", "User successfully regsistered"); Ok(ExitCode::Ok) }, Err(error) => Err(error).context("User registration failed"), diff --git a/cli/src/commands/init.rs b/cli/src/commands/init.rs index 2e060a4eb..a3f5a302a 100644 --- a/cli/src/commands/init.rs +++ b/cli/src/commands/init.rs @@ -227,7 +227,7 @@ fn prompt_depfiles( /// Ask for the dependency file names. fn prompt_depfile_names() -> io::Result> { - // Find all known dependency files below the currenty directory. + // Find all known dependency files below the current directory. let mut depfiles = phylum_lockfile::find_depfiles_at(".") .iter() .flat_map(|(path, _)| Some(path.to_str()?.to_owned())) diff --git a/cli/src/commands/project.rs b/cli/src/commands/project.rs index c4543d58e..0a8c17a56 100644 --- a/cli/src/commands/project.rs +++ b/cli/src/commands/project.rs @@ -286,7 +286,7 @@ async fn handle_update_project( Ok(ExitCode::Ok) } -/// Link a Phylum project to the currenty directory. +/// Link a Phylum project to the current directory. async fn handle_link_project( api: &PhylumApi, matches: &ArgMatches, diff --git a/cli/src/permissions.rs b/cli/src/permissions.rs index 7787db9c2..14194254b 100644 --- a/cli/src/permissions.rs +++ b/cli/src/permissions.rs @@ -339,7 +339,7 @@ pub fn default_sandbox() -> SandboxResult { Ok(birdcage) } -/// Add an execption to the sandbox, ignoring invalid path errors. +/// Add an exception to the sandbox, ignoring invalid path errors. #[cfg(unix)] pub fn add_exception(birdcage: &mut Birdcage, exception: Exception) -> SandboxResult<()> { match birdcage.add_exception(exception) { diff --git a/cli/src/test.rs b/cli/src/test.rs index 3648bdc88..22e947d06 100644 --- a/cli/src/test.rs +++ b/cli/src/test.rs @@ -190,7 +190,7 @@ pub mod open { Handle::current().spawn(async move { let url = Url::from_str(&authorization_url).expect("Failed to parse url."); - let code = "FAKE_OAUTH_ATHORIZATION_CODE"; + let code = "FAKE_OAUTH_AUTHORIZATION_CODE"; let query_params = url.query_pairs().into_owned().collect::>(); let state = diff --git a/cli/src/types.rs b/cli/src/types.rs index 298a40b5d..beb8678a1 100644 --- a/cli/src/types.rs +++ b/cli/src/types.rs @@ -501,7 +501,7 @@ pub struct ProjectListEntry { #[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Debug, Serialize, Deserialize)] pub struct Paginated { - /// The curent page of values. + /// The current page of values. pub values: Vec, /// Indication of whether the current query has more values past the last /// element in `values`. diff --git a/doc_templates/README.md b/doc_templates/README.md index 56fde56dd..129c9975a 100644 --- a/doc_templates/README.md +++ b/doc_templates/README.md @@ -18,7 +18,7 @@ template used when no override is present. Some placeholders are available to templates, these will be replaced automatically with their values during documentation generation. -These placeholers are currently supported: +These placeholders are currently supported: | Name | Description | | ---------------- | -------------------------------------------------------------------------------------- | diff --git a/extensions/cargo/main.ts b/extensions/cargo/main.ts index a61dbc9be..40302afb6 100644 --- a/extensions/cargo/main.ts +++ b/extensions/cargo/main.ts @@ -52,7 +52,7 @@ async function findRoot(manifest: string): Promise { /// Check if there is a cache entry for this lockfile's hash. async function hasSuccessCached(lockfilePath: string): Promise { - // Check if sucess is cached. + // Check if success is cached. const hash = await hashFile(lockfilePath); try { diff --git a/lockfile/src/javascript.rs b/lockfile/src/javascript.rs index 2fef5a156..dad779239 100644 --- a/lockfile/src/javascript.rs +++ b/lockfile/src/javascript.rs @@ -193,7 +193,7 @@ impl Parse for YarnLock { // Extract original resolver from patch. if let Some((_, patch)) = resolver.split_once("patch:") { - // Exctract resolver from `@scope/package@RESOLVER#patch`. + // Extract resolver from `@scope/package@RESOLVER#patch`. let patch = patch[1..].split_once('@'); let subresolver = patch.and_then(|(_, resolver)| resolver.split_once('#')); resolver = match subresolver { diff --git a/lockfile/src/parsers/go_mod.rs b/lockfile/src/parsers/go_mod.rs index 6b641a6da..e16c418ce 100644 --- a/lockfile/src/parsers/go_mod.rs +++ b/lockfile/src/parsers/go_mod.rs @@ -115,7 +115,7 @@ pub fn parse(input: &str) -> IResult<&str, GoDeps> { }, } - // Add the replacment module. + // Add the replacement module. packages.push(Package::from(replacement)); } diff --git a/lockfile/src/spdx.rs b/lockfile/src/spdx.rs index d2d6c9a5e..5052182de 100644 --- a/lockfile/src/spdx.rs +++ b/lockfile/src/spdx.rs @@ -21,7 +21,7 @@ use crate::{ pub(crate) struct SpdxInfo { #[serde(rename = "SPDXID")] pub(crate) spdx_id: String, - // Deprecated in v2.3 but kept for v2.2 compatability. + // Deprecated in v2.3 but kept for v2.2 compatibility. #[serde(default)] pub(crate) document_describes: Vec, pub(crate) packages: Vec,