Skip to content

Commit

Permalink
Fix typos (#150)
Browse files Browse the repository at this point in the history
* Fix typos

Signed-off-by: tinyboxvk <[email protected]>
  • Loading branch information
tinyboxvk authored Jan 9, 2025
1 parent b40c5c4 commit 689ae35
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 32 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions scripts/pico_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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]):
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/commands/switchSDK.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions src/utils/cmakeUtil.mts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export async function cmakeUpdateBoard(
folder: Uri,
newBoard: string
): Promise<boolean> {
// 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;

Expand Down Expand Up @@ -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,
Expand All @@ -321,7 +321,7 @@ export async function cmakeUpdateSDK(
newPicotoolVersion: string,
reconfigure: boolean = true
): Promise<boolean> {
// 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(
Expand Down Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions src/utils/download.mts
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ export async function downloadAndInstallNinja(
/// by reading /proc/cpuinfo and /etc/os-release
// async function isRaspberryPi(): Promise<boolean> {
// 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";
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/downloadGit.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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" ? "&" : ""
Expand Down
6 changes: 3 additions & 3 deletions src/utils/githubREST.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -248,7 +248,7 @@ async function getReleases(repository: GithubRepository): Promise<string[]> {
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);
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions src/utils/macOSUtils.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/requirementsUtil.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/webview/newProjectPanel.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down Expand Up @@ -1883,7 +1883,7 @@ export class NewProjectPanel {
</div>
<div class="advanced-option" hidden>
<label for="sel-toolchain" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Select ARM/RISCV Embeded Toolchain version</label>
<label for="sel-toolchain" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Select ARM/RISCV Embedded Toolchain version</label>
<select id="sel-toolchain" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
${toolchainsHtml}
</select>
Expand Down Expand Up @@ -2212,7 +2212,7 @@ export class NewProjectPanel {
): Promise<void> {
const isWindows = process.platform === "win32";

// convert the selected board type to a vaild option
// convert the selected board type to a valid option
// for the project generator
let boardTypeFromEnum = "";
if ("boardType" in options) {
Expand Down
2 changes: 1 addition & 1 deletion web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ var exampleSupportedBoards = [];

// if cmake version is null or not a number, smaller than 0 or bigger than 3, set it to 0
if (cmakeMode === null || isNaN(cmakeMode) || cmakeMode < 0 || cmakeMode > 4) {
// TODO: first check if defaul is supported
// TODO: first check if default is supported
cmakeMode = 0;
console.debug('Invalid cmake version value: ' + cmakeMode.toString());
vscode.postMessage({
Expand Down
2 changes: 1 addition & 1 deletion web/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ window.toggleCreateFromExampleMode = function (forceOn, forceOff) {
word += isInputEmpty ? "" : "<b>" + i.substring(startIndex, startIndex + projectNameInput.value.length) + "</b>";
word += i.substring(startIndex + projectNameInput.value.length);

// set value of li elemetn
// set value of li element
listItem.innerHTML = word;
examplesList.appendChild(listItem);
}
Expand Down
6 changes: 3 additions & 3 deletions web/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class State {
}

function restoreState(state) {
console.debug("[raspbery-pi-pico - new project panel - state] Restoring state from previous session");
console.debug("[raspberry-pi-pico - new project panel - state] Restoring state from previous session");
// load state
if (state.projectName) {
document.getElementById('inp-project-name').value = state.projectName;
Expand All @@ -53,7 +53,7 @@ function restoreState(state) {
// TODO: currently must be restorted before board type because otherwise
// the change of board type would trigger the change listener sending version bundle message
// this would undisable the pico2 board type and it does not get disabled again in the loading
// So maybe restore the board type disable state after restoring the state to avaoid these conflicts
// So maybe restore the board type disable state after restoring the state to avoid these conflicts
if (state.selectedSDK) {
document.getElementById('sel-pico-sdk').value = state.selectedSDK;
}
Expand Down Expand Up @@ -201,7 +201,7 @@ function restoreState(state) {
document.getElementById('btn-advanced-options').click();
}
if (!forceCreateFromExample && !doProjectImport && state.manuallyFromExample) {
console.debug("[raspbery-pi-pico - new project panel - state] Manually triggering create from example");
console.debug("[raspberry-pi-pico - new project panel - state] Manually triggering create from example");

// will crash the webview to set it on disable and click create from example
/*const pni = document.getElementById('inp-project-name');
Expand Down

0 comments on commit 689ae35

Please sign in to comment.