From e10ba1e619b5124800cb900a8291051bcb983cd7 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Wed, 17 Jul 2024 23:52:46 +0800 Subject: [PATCH] docs: Fix typos Found via `typos --hidden --format brief` --- js/releases/index.js | 8 ++++---- src/api/mod.rs | 10 +++++----- src/commands/sourcemaps/explain.rs | 4 ++-- src/utils/chunks.rs | 2 +- src/utils/dif_upload.rs | 4 ++-- src/utils/file_upload.rs | 4 ++-- src/utils/http.rs | 2 +- src/utils/system.rs | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/js/releases/index.js b/js/releases/index.js index 1e42e96ff9..4fcf8bc499 100644 --- a/js/releases/index.js +++ b/js/releases/index.js @@ -141,8 +141,8 @@ class Releases { * rewrite: false, // preprocess sourcemaps before uploading * sourceMapReference: true, // add a source map reference to source files * dedupe: true, // deduplicate already uploaded files - * stripPrefix: [], // remove certain prefices from filenames - * stripCommonPrefix: false, // guess common prefices to remove from filenames + * stripPrefix: [], // remove certain prefixes from filenames + * stripCommonPrefix: false, // guess common prefixes to remove from filenames * validate: false, // validate source maps and cancel the upload on error * urlPrefix: '', // add a prefix source map urls after stripping them * urlSuffix: '', // add a suffix source map urls after stripping them @@ -159,7 +159,7 @@ class Releases { async uploadSourceMaps(release, options) { if (!options || !options.include || !Array.isArray(options.include)) { throw new Error( - '`options.include` must be a vaild array of paths and/or path descriptor objects.' + '`options.include` must be a valid array of paths and/or path descriptor objects.' ); } @@ -246,7 +246,7 @@ class Releases { */ async newDeploy(release, options) { if (!options || !options.env) { - throw new Error('options.env must be a vaild name'); + throw new Error('options.env must be a valid name'); } const args = ['releases', 'deploys', release, 'new']; return this.execute(helper.prepareCommand(args, DEPLOYS_SCHEMA, options), null); diff --git a/src/api/mod.rs b/src/api/mod.rs index 85374fec7b..aae183f9d1 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -454,7 +454,7 @@ impl<'a> AuthenticatedApi<'a> { self.api.put(path, body) } - /// Convinience method to call self.api.request. + /// Convenience method to call self.api.request. fn request(&self, method: Method, url: &str) -> ApiResult { self.api.request(method, url, None) } @@ -496,15 +496,15 @@ impl<'a> AuthenticatedApi<'a> { ) }; - let mut checkums_qs = String::new(); + let mut checksums_qs = String::new(); for checksum in checksums.iter() { - checkums_qs.push_str(&format!("&checksum={}", QueryArg(checksum))); + checksums_qs.push_str(&format!("&checksum={}", QueryArg(checksum))); } // We have a 16kb buffer for reach request configured in nginx, // so do not even bother trying if it's too long. // (16_384 limit still leaves us with 384 bytes for the url itself). - if !checkums_qs.is_empty() && checkums_qs.len() <= 16_000 { - path.push_str(&checkums_qs); + if !checksums_qs.is_empty() && checksums_qs.len() <= 16_000 { + path.push_str(&checksums_qs); } let resp = self.get(&path)?; diff --git a/src/commands/sourcemaps/explain.rs b/src/commands/sourcemaps/explain.rs index c981f7394a..7e128ffe3f 100644 --- a/src/commands/sourcemaps/explain.rs +++ b/src/commands/sourcemaps/explain.rs @@ -135,7 +135,7 @@ fn fetch_release_artifacts(org: &str, project: &str, release: &str) -> Result Result { let full_match = artifacts.iter().find(|a| a.name == path); let partial_match = artifacts @@ -348,7 +348,7 @@ fn resolve_sourcemap_url(abs_path: &str, sourcemap_location: &str) -> Result = chunks diff --git a/src/utils/dif_upload.rs b/src/utils/dif_upload.rs index 98f7dfc2fc..c6270a509c 100644 --- a/src/utils/dif_upload.rs +++ b/src/utils/dif_upload.rs @@ -407,7 +407,7 @@ impl<'a> DifSource<'a> { /// file name. fn get_relative_fs(base: &Path, path: &Path) -> Option> { // Use parent() to get to the directory and then move relative from - // there. ByteView will internally cannonicalize the path and resolve + // there. ByteView will internally canonicalize the path and resolve // symlinks. base.parent() .and_then(|p| ByteView::open(p.join(path)).ok()) @@ -896,7 +896,7 @@ fn collect_object_dif<'a>( // Invoke logic to retrieve attachments specific to the kind // of object file. These are used for processing. Since only - // dSYMs equire processing currently, all other kinds are + // dSYMs require processing currently, all other kinds are // skipped. let attachments = match object.file_format() { FileFormat::MachO => find_uuid_plists(&object, &mut source), diff --git a/src/utils/file_upload.rs b/src/utils/file_upload.rs index f043a96709..d069ad439d 100644 --- a/src/utils/file_upload.rs +++ b/src/utils/file_upload.rs @@ -118,7 +118,7 @@ pub struct SourceFile { pub path: PathBuf, pub contents: Vec, pub ty: SourceFileType, - /// A map of headers attatched to the source file. + /// A map of headers attached to the source file. /// /// Headers that `sentry-cli` knows about are /// * "debug-id" for a file's debug id @@ -199,7 +199,7 @@ impl<'a> FileUpload<'a> { } // Do not permit uploads of more than 20k files if the server does not - // support artifact bundles. This is a termporary downside protection to + // support artifact bundles. This is a temporary downside protection to // protect users from uploading more sources than we support. if self.files.len() > 20_000 { bail!( diff --git a/src/utils/http.rs b/src/utils/http.rs index 668066a8fc..4cd345e443 100644 --- a/src/utils/http.rs +++ b/src/utils/http.rs @@ -63,7 +63,7 @@ pub fn parse_link_header(s: &str) -> Vec> { rv } -/// Checkes whether an url starts with http:// or https:// prefix +/// Checks whether an url starts with http:// or https:// prefix pub fn is_absolute_url(url: &str) -> bool { url.starts_with("http://") || url.starts_with("https://") } diff --git a/src/utils/system.rs b/src/utils/system.rs index bc5730a7e3..04829107b5 100644 --- a/src/utils/system.rs +++ b/src/utils/system.rs @@ -146,7 +146,7 @@ pub fn load_dotenv() -> DotenvResult<()> { } .map_or_else( |error| { - // We only propogate errors if the .env file was found and failed to load. + // We only propagate errors if the .env file was found and failed to load. if error.not_found() { Ok(()) } else {