diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3e5c5d0..77f4476 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,6 +12,12 @@ jobs: name: ✅ Semantic Pull Request uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 + cspell: + name: 🔤 Check Spelling + uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1 + with: + config: cspell.config.yaml + changes: runs-on: ubuntu-latest diff --git a/cspell.config.yaml b/cspell.config.yaml index 6a65f8f..00b666e 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -1,7 +1,70 @@ $schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json version: '0.2' -ignorePaths: ['build', '**/*.g.dart'] +ignorePaths: + - target + - build + - '**/*.g.dart' + # Flutter platform directories with per-platform build files + - windows + - macos + - linux + - ios + - android words: - - subosito + - aarch + - androideabi + - apks + - armeabi + - armv7 + - autogen + - bidiff + - bipatch + - bootable + - buildroot + - bundletool - carryforward + - cbindgen + - cdylib + - classpath + - comde + - compatch + - Condvar + - datadir + - declspec + - Decompressor + - dllexport + - dlopen - endtemplate + - eseidel + - ffigen + - gclient + - hdpi + - ifdef + - libapp + - libc + - libflutter + - libupdater + - logcat + - mockall + - mocktail + - oslog + - pubspec + - repr + - reqwest + - rollouts + - rustls + - rustup + - serde + - shorebirdtech + - sigstore + - staticlib + - subosito + - unbootable + - Verdana + - vmcode + - withf + - xlink + - zstandard + - zstd + - xcodeproj + - pbxproj \ No newline at end of file diff --git a/library/README.md b/library/README.md index 27132bb..3493445 100644 --- a/library/README.md +++ b/library/README.md @@ -182,7 +182,7 @@ This state machine tracks the process of checking for new patches. It is managed by the code in `updater.rs` and does not have any on-disk state. It has the following states: -1. Ready - Ready to check for udpates. +1. Ready - Ready to check for updates. 2. Send queued events (e.g., report that a patch succeeded or failed to boot) a. Move to checking once events, if any, have been reported. 3. Checking for new patches - A PatchCheckRequest is issued but not completed. diff --git a/library/src/android.rs b/library/src/android.rs index 54a8258..adc8c16 100644 --- a/library/src/android.rs +++ b/library/src/android.rs @@ -1,3 +1,4 @@ +// cspell:ignore rpkDZSLBRv2jWcc1gQpwdg use anyhow::Context; use std::fs; use std::io::{Cursor, Read}; diff --git a/library/src/c_api/c_file.rs b/library/src/c_api/c_file.rs index c66b4a3..8446343 100644 --- a/library/src/c_api/c_file.rs +++ b/library/src/c_api/c_file.rs @@ -10,11 +10,11 @@ struct CFile { } #[derive(Clone, Debug)] -pub struct CFileProvder { +pub struct CFileProvider { pub file_callbacks: FileCallbacks, } -impl ExternalFileProvider for CFileProvder { +impl ExternalFileProvider for CFileProvider { fn open(&self) -> anyhow::Result> { let handle = (self.file_callbacks.open)(); if handle.is_null() { @@ -139,7 +139,7 @@ mod test { fn test_open() { reset_tests(); - let file_provider = CFileProvder { + let file_provider = CFileProvider { file_callbacks: FileCallbacks::new(), }; let handle = file_provider.open().unwrap(); @@ -158,7 +158,7 @@ mod test { OPEN_RET = std::ptr::null_mut(); } - let file_provider = CFileProvder { + let file_provider = CFileProvider { file_callbacks: FileCallbacks::new(), }; let result = file_provider.open(); @@ -170,7 +170,7 @@ mod test { fn test_read() { reset_tests(); - let file_provider = CFileProvder { + let file_provider = CFileProvider { file_callbacks: FileCallbacks::new(), }; let mut handle = file_provider.open().unwrap(); @@ -187,7 +187,7 @@ mod test { fn test_seek() { reset_tests(); - let file_provider = CFileProvder { + let file_provider = CFileProvider { file_callbacks: FileCallbacks::new(), }; let mut handle = file_provider.open().unwrap(); @@ -233,7 +233,7 @@ mod test { fn test_seek_err() { reset_tests(); - let file_provider = CFileProvder { + let file_provider = CFileProvider { file_callbacks: FileCallbacks::new(), }; let mut handle = file_provider.open().unwrap(); diff --git a/library/src/c_api/mod.rs b/library/src/c_api/mod.rs index 31d0752..5c553a2 100644 --- a/library/src/c_api/mod.rs +++ b/library/src/c_api/mod.rs @@ -16,7 +16,7 @@ use std::path::PathBuf; use crate::{updater, UpdateStatus}; -use self::c_file::CFileProvder; +use self::c_file::CFileProvider; mod c_file; @@ -162,7 +162,7 @@ pub extern "C" fn shorebird_init( log_on_error( || { let config = app_config_from_c(c_params)?; - let file_provider = Box::new(CFileProvder { + let file_provider = Box::new(CFileProvider { file_callbacks: c_file_callbacks, }); let yaml_string = to_rust(c_yaml)?; diff --git a/library/src/cache/disk_io.rs b/library/src/cache/disk_io.rs index cb086c2..cceef63 100644 --- a/library/src/cache/disk_io.rs +++ b/library/src/cache/disk_io.rs @@ -79,7 +79,7 @@ mod test { } #[test] - fn read_errs_if_file_doesnt_exist() { + fn read_errs_if_file_does_not_exist() { assert!(super::read::(&Path::new("nonexistent.json")).is_err()); } diff --git a/library/src/cache/patch_manager.rs b/library/src/cache/patch_manager.rs index 2aa02bd..2c71309 100644 --- a/library/src/cache/patch_manager.rs +++ b/library/src/cache/patch_manager.rs @@ -57,13 +57,14 @@ struct PatchesState { /// Abstracts the storage of patches on disk. /// -/// The impementation of this (PatchManager) should only be responsible for translating what is on -/// disk into a form that is useful for the updater and vice versa. Some business logic has crept in -/// in the form of validation, and we should consider moving that into a separate module. +/// The implementation of this (PatchManager) should only be responsible for +/// translating what is on disk into a form that is useful for the updater and +/// vice versa. Some business logic has crept in in the form of validation, and +/// we should consider moving that into a separate module. #[cfg_attr(test, automock)] pub trait ManagePatches { - /// Copies the patch file at file_path to the manager's directory structure sets - /// this patch as the next patch to boot. + /// Copies the patch file at file_path to the manager's directory structure + /// sets this patch as the next patch to boot. /// /// The explicit lifetime is required for automock to work with Options. /// See https://github.com/asomers/mockall/issues/61. @@ -952,7 +953,7 @@ mod fall_back_tests { manager.record_boot_start_for_patch(1)?; manager.record_boot_success()?; let patch_1_path = manager.patch_artifact_path(1); - std::fs::write(patch_1_path, "junkjunkjunk")?; + std::fs::write(patch_1_path, "junk junk junk")?; // Download and fall back from patch 2 manager.add_patch_for_test(&temp_dir, 2)?; diff --git a/library/src/cache/signing.rs b/library/src/cache/signing.rs index b8a95b0..67518fd 100644 --- a/library/src/cache/signing.rs +++ b/library/src/cache/signing.rs @@ -1,3 +1,4 @@ +// cspell:ignore pubin PKCS outform use anyhow::{bail, Context, Result}; use base64::Engine; use std::path::Path; diff --git a/library/src/network.rs b/library/src/network.rs index 859e97b..e618665 100644 --- a/library/src/network.rs +++ b/library/src/network.rs @@ -403,7 +403,7 @@ mod tests { let result = super::report_event_default( // Make the request to an incorrectly formatted URL, which will // trigger the same error as a lack of internet connection. - &patches_events_url("asdfasdf"), + &patches_events_url("does_not_exist"), super::CreatePatchEventRequest { event: PatchEvent { app_id: "app_id".to_string(), diff --git a/library/src/updater_lock.rs b/library/src/updater_lock.rs index 27692fc..5278605 100644 --- a/library/src/updater_lock.rs +++ b/library/src/updater_lock.rs @@ -17,12 +17,11 @@ fn updater_lock() -> &'static std::sync::Mutex { // Note: it is not OK to ever ask for the Updater lock *while* holding the // UpdateConfig lock because the updater thread *will* block on getting the -// UpdateConfig lock while holding the Updater lock. Allowing the inverse -// could cause a deadlock. We could add a check for that here by doing a -// tryLock on the UpdateConfig lock and erroring out if we can't get it, but -// that would probably have false postives since it is OK for some other call to -// be holding the UpdateConfig lock while another thread asks for the Updater -// lock. +// UpdateConfig lock while holding the Updater lock. Allowing the inverse could +// cause a deadlock. We could add a check for that here by doing a tryLock on +// the UpdateConfig lock and erroring out if we can't get it, but that would +// probably have false positives since it is OK for some other call to be +// holding the UpdateConfig lock while another thread asks for the Updater lock. pub fn with_updater_thread_lock(f: F) -> anyhow::Result where F: FnOnce(&UpdaterLockState) -> anyhow::Result, diff --git a/shorebird_code_push/CHANGELOG.md b/shorebird_code_push/CHANGELOG.md index 3074d2a..7e1c8ba 100644 --- a/shorebird_code_push/CHANGELOG.md +++ b/shorebird_code_push/CHANGELOG.md @@ -1,6 +1,6 @@ # 2.0.2 -- fix: unbreak web platform +- fix: un-break web platform - chore: minor improvements to example # 2.0.1