From 689ae355d22e2918523fa1c1100c6ab4a251fb24 Mon Sep 17 00:00:00 2001 From: tinyboxvk <13696594+tinyboxvk@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:00:07 -0400 Subject: [PATCH] Fix typos (#150) * Fix typos Signed-off-by: tinyboxvk <13696594+tinyboxvk@users.noreply.github.com> --- package.json | 2 +- scripts/pico_project.py | 10 +++++----- src/commands/switchSDK.mts | 2 +- src/utils/cmakeUtil.mts | 10 +++++----- src/utils/download.mts | 8 ++++---- src/utils/downloadGit.mts | 4 ++-- src/utils/githubREST.mts | 6 +++--- src/utils/macOSUtils.mts | 5 +++-- src/utils/requirementsUtil.mts | 2 +- src/webview/newProjectPanel.mts | 6 +++--- web/main.js | 2 +- web/nav.js | 2 +- web/state.js | 6 +++--- 13 files changed, 33 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 86b88d56..ba32849a 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "capabilities": { "virtualWorkspaces": { "supported": false, - "description": "Raspberry Pi Pico extension is intended to be used localy." + "description": "Raspberry Pi Pico extension is intended to be used locally." }, "untrustedWorkspaces": { "supported": false, diff --git a/scripts/pico_project.py b/scripts/pico_project.py index 16f6d783..de8f6555 100644 --- a/scripts/pico_project.py +++ b/scripts/pico_project.py @@ -613,7 +613,7 @@ def ParseCommandLine(): parser.add_argument( "-tcVersion", "--toolchainVersion", - help="ARM/RISCV Embeded Toolchain version to use (required)", + help="ARM/RISCV Embedded Toolchain version to use (required)", ) parser.add_argument( "-picotoolVersion", @@ -790,7 +790,7 @@ def GenerateCMake(folder, params): CMAKE_DO_NOT_EDIT_HEADER_PREFIX, ) else: - # Prexisting CMake configuration - just adding cmake_header_us + # Preexisting CMake configuration - just adding cmake_header_us file.write(cmake_header_us) # If no PICO_BOARD, then add a line for that, defaulting to pico if not any(["set(PICO_BOARD" in line for line in lines]): @@ -1372,7 +1372,7 @@ def DoEverything(params): params["wantEntryProjName"], ) - # If we have any ancilliary files, copy them to our project folder + # If we have any ancillary files, copy them to our project folder # Currently only the picow with lwIP support needs an extra file, so just check that list for feat in features_and_examples: if feat in features_list: @@ -1454,7 +1454,7 @@ def DoEverything(params): CheckSystemType() if args.name == None: - print("No project name specfied\n") + print("No project name specified\n") sys.exit(-1) # Check if we were provided a compiler path, and override the default if so @@ -1463,7 +1463,7 @@ def DoEverything(params): codeToolchainPath(args.toolchainVersion) + "/bin/" + COMPILER_NAME() ) else: - print("No toolchain version specfied\n") + print("No toolchain version specified\n") sys.exit(-1) projectRoot = Path(os.getcwd()) if not args.projectRoot else Path(args.projectRoot) diff --git a/src/commands/switchSDK.mts b/src/commands/switchSDK.mts index 12b54931..d023b35c 100644 --- a/src/commands/switchSDK.mts +++ b/src/commands/switchSDK.mts @@ -208,7 +208,7 @@ export default class SwitchSDKCommand extends Command { toolchain: toolchain, })), { - placeHolder: "Select ARM/RISCV Embeded Toolchain version", + placeHolder: "Select ARM/RISCV Embedded Toolchain version", } ); } catch { diff --git a/src/utils/cmakeUtil.mts b/src/utils/cmakeUtil.mts index 0b986f1a..0ee8b5cc 100644 --- a/src/utils/cmakeUtil.mts +++ b/src/utils/cmakeUtil.mts @@ -256,7 +256,7 @@ export async function cmakeUpdateBoard( folder: Uri, newBoard: string ): Promise { - // TODO: support for scaning for seperate locations of the CMakeLists.txt file in the project + // TODO: support for scanning for separate locations of the CMakeLists.txt file in the project const cmakeFilePath = join(folder.fsPath, "CMakeLists.txt"); const picoBoardRegex = /^set\(PICO_BOARD\s+([^)]+)\)$/m; @@ -311,8 +311,8 @@ export async function cmakeUpdateBoard( * Updates the sdk and toolchain relay paths in the CMakeLists.txt file. * * @param folder The root folder of the workspace to configure. - * @param newSDKVersion The verison in "$HOME/.picosdk/sdk/${newSDKVersion}" - * @param newToolchainVersion The verison in "$HOME/.picosdk/toolchain/${newToolchainVersion}" + * @param newSDKVersion The version in "$HOME/.picosdk/sdk/${newSDKVersion}" + * @param newToolchainVersion The version in "$HOME/.picosdk/toolchain/${newToolchainVersion}" */ export async function cmakeUpdateSDK( folder: Uri, @@ -321,7 +321,7 @@ export async function cmakeUpdateSDK( newPicotoolVersion: string, reconfigure: boolean = true ): Promise { - // TODO: support for scaning for seperate locations of the CMakeLists.txt file in the project + // TODO: support for scanning for separate locations of the CMakeLists.txt file in the project const cmakeFilePath = join(folder.fsPath, "CMakeLists.txt"); // This regex requires multiline (m) and dotall (s) flags to work const updateSectionRegex = new RegExp( @@ -437,7 +437,7 @@ export async function cmakeUpdateSDK( * Extracts the sdk and toolchain versions from the CMakeLists.txt file. * * @param cmakeFilePath The path to the CMakeLists.txt file. - * @returns An tupple with the [sdk, toolchain, picotool] versions or null if the file could not + * @returns A tuple with the [sdk, toolchain, picotool] versions or null if the file could not * be read or the versions could not be extracted. */ export async function cmakeGetSelectedToolchainAndSDKVersions( diff --git a/src/utils/download.mts b/src/utils/download.mts index 5be48ed8..4ec8a171 100644 --- a/src/utils/download.mts +++ b/src/utils/download.mts @@ -994,7 +994,7 @@ export async function downloadAndInstallNinja( /// by reading /proc/cpuinfo and /etc/os-release // async function isRaspberryPi(): Promise { // try { -// // TODO: imporove detection speed +// // TODO: improve detection speed // const cpuInfo = await readFile("/proc/cpuinfo", "utf8"); // const osRelease = await readFile("/etc/os-release", "utf8"); // const versionId = osRelease.match(/VERSION_ID="?(\d+)"?/)?.[1] ?? "0"; @@ -1046,7 +1046,7 @@ export async function downloadAndInstallOpenOCD( const extraCallback = (): void => { if (process.platform !== "win32") { // on darwin and linux platforms create windows compatible alias - // so confiuration works on all platforms + // so configuration works on all platforms symlinkSync( join(targetDirectory, "openocd"), join(targetDirectory, "openocd.exe"), @@ -1264,10 +1264,10 @@ export async function downloadEmbedPython( rmSync(archiveFilePath, { recursive: true, force: true }); return success ? `${settingsTargetDirectory}/python.exe` : undefined; - } catch (errror) { + } catch (error) { Logger.error( LoggerSource.downloader, - `Extracting Embed Python failed: ${unknownErrorToString(errror)}` + `Extracting Embed Python failed: ${unknownErrorToString(error)}` ); return; diff --git a/src/utils/downloadGit.mts b/src/utils/downloadGit.mts index 9487328b..f18227c0 100644 --- a/src/utils/downloadGit.mts +++ b/src/utils/downloadGit.mts @@ -79,7 +79,7 @@ export async function downloadGit( Logger.error( LoggerSource.gitDownloader, "Downloading git failed:", - response.statusMessage ?? "{No status message vailable}." + response.statusMessage ?? "{No status message available}." ); resolve(undefined); @@ -112,7 +112,7 @@ export async function downloadGit( if (success) { // remove include section from gitconfig included in MiniGit - // which hardcodes the a path in Programm Files to be used by this git executable + // which hardcodes the a path in Program Files to be used by this git executable exec( `${ process.env.ComSpec === "powershell.exe" ? "&" : "" diff --git a/src/utils/githubREST.mts b/src/utils/githubREST.mts index bc86c6f7..0883564e 100644 --- a/src/utils/githubREST.mts +++ b/src/utils/githubREST.mts @@ -109,7 +109,7 @@ interface AuthorizationHeaders { */ export function getAuthorizationHeaders(): AuthorizationHeaders { const headers: AuthorizationHeaders = {}; - // takes some time to execute (noticable in UI) + // takes some time to execute (noticeable in UI) const githubPAT = Settings.getInstance()?.getString(SettingsKey.githubToken); if (githubPAT && githubPAT.length > 0) { Logger.info( @@ -248,7 +248,7 @@ async function getReleases(repository: GithubRepository): Promise { return getReleases(repository); } else if (response.status === HTTP_STATUS_FORBIDDEN) { // return the default response as without a PAT - // ther is no way a rerun will succeed in the near future + // there is no way a rerun will succeed in the near future throw new Error("GitHub API Code 403 Forbidden. Rate limit exceeded."); } else if (response.status !== 200) { throw new Error("Error http status code: " + response.status); @@ -364,7 +364,7 @@ export async function getGithubReleaseByTag( return getGithubReleaseByTag(repository, tag); } else if (response.status === HTTP_STATUS_FORBIDDEN) { // return the default response as without a PAT - // ther is no way a rerun will succeed in the near future + // there is no way a rerun will succeed in the near future throw new Error("GitHub API Code 403 Forbidden. Rate limit exceeded."); } else if (response.status !== 200) { throw new Error("Error http status code: " + response.status); diff --git a/src/utils/macOSUtils.mts b/src/utils/macOSUtils.mts index 467e332c..c834be5f 100644 --- a/src/utils/macOSUtils.mts +++ b/src/utils/macOSUtils.mts @@ -72,9 +72,10 @@ export default class MacOSPythonPkgExtractor { try { execSync(command); } catch (error) { - const mesage = error instanceof Error ? error.message : (error as string); + const message = + error instanceof Error ? error.message : (error as string); this._logger.error( - `Error executing command: ${command} Error: ${mesage}` + `Error executing command: ${command} Error: ${message}` ); throw error; } diff --git a/src/utils/requirementsUtil.mts b/src/utils/requirementsUtil.mts index 80820b0b..c2a5603a 100644 --- a/src/utils/requirementsUtil.mts +++ b/src/utils/requirementsUtil.mts @@ -25,7 +25,7 @@ export async function showRequirementsNotMetErrorMessage( } /** - * Checks if a git executable is avialable or try to install if possible. + * Checks if a git executable is available or try to install if possible. * * @returns True if git is available, false otherwise. */ diff --git a/src/webview/newProjectPanel.mts b/src/webview/newProjectPanel.mts index c75efbb6..974b5d44 100644 --- a/src/webview/newProjectPanel.mts +++ b/src/webview/newProjectPanel.mts @@ -1493,7 +1493,7 @@ export class NewProjectPanel { this._versionBundlesLoader = new VersionBundlesLoader(this._extensionUri); - // construct auxiliar html + // construct auxiliary html // TODO: add offline handling - only load installed ones let toolchainsHtml = ""; let picoSDKsHtml = ""; @@ -1883,7 +1883,7 @@ export class NewProjectPanel {