diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..35b4e2f45 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +ignore-words-list: crate,everytime +skip: **/target,node_modules,build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c31491ea1..947b428b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -222,6 +222,11 @@ jobs: if: matrix.os == 'ubuntu-latest' run: xvfb-run yarn test:e2e + typos: # Edit .codespellrc to change this CI job's configuration. + runs-on: ubuntu-latest + steps: + - name: Check for typos + uses: codespell-project/actions-codespell@v2 publish-apps-release: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 1698fc229..781e9dd55 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ To spin up up tauri dev, `yarn install` and `yarn build:wasm-dev` need to have b yarn tauri dev ``` -Will spin up the web app before opening up the tauri dev desktop app. Note that it's probably a good idea to close the browser tab that gets opened since at the time of writting they can conflict. +Will spin up the web app before opening up the tauri dev desktop app. Note that it's probably a good idea to close the browser tab that gets opened since at the time of writing they can conflict. The dev instance automatically opens up the browser devtools which can be disabled by [commenting it out](https://github.com/KittyCAD/modeling-app/blob/main/src-tauri/src/main.rs#L92.) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index f8e358ac8..b454eeb2c 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -68,7 +68,7 @@ async fn login(app: tauri::AppHandle, host: &str) -> Result }; // Open the system browser with the auth_uri. - // We do this in the browser and not a seperate window because we want 1password and + // We do this in the browser and not a separate window because we want 1password and // other crap to work well. tauri::api::shell::open(&app.shell_scope(), auth_uri.secret(), None) .map_err(|e| InvokeError::from_anyhow(e.into()))?; diff --git a/src/components/TextEditor.tsx b/src/components/TextEditor.tsx index 24d32d351..70d8ec22f 100644 --- a/src/components/TextEditor.tsx +++ b/src/components/TextEditor.tsx @@ -92,7 +92,7 @@ export const TextEditor = ({ // Here we initialize the plugin which will start the client. // When we have multi-file support the name of the file will be a dep of // this use memo, as well as the directory structure, which I think is - // a good setup becuase it will restart the client but not the server :) + // a good setup because it will restart the client but not the server :) // We do not want to restart the server, its just wasteful. const kclLSP = useMemo(() => { let plugin = null diff --git a/src/editor/lsp/codec.ts b/src/editor/lsp/codec.ts index 9feb0f1ed..2a9353d34 100644 --- a/src/editor/lsp/codec.ts +++ b/src/editor/lsp/codec.ts @@ -26,7 +26,7 @@ export class Codec { } } -// FIXME: tracing effiency +// FIXME: tracing efficiency export class IntoServer extends Queue implements AsyncGenerator diff --git a/src/lang/KclSinglton.tsx b/src/lang/KclSinglton.tsx index 81b160a07..ac967e7f9 100644 --- a/src/lang/KclSinglton.tsx +++ b/src/lang/KclSinglton.tsx @@ -120,7 +120,7 @@ class KclManager { constructor(engineCommandManager: EngineCommandManager) { this.engineCommandManager = engineCommandManager const storedCode = localStorage.getItem(PERSIST_CODE_TOKEN) - // TODO #819 remove zustand persistance logic in a few months + // TODO #819 remove zustand persistence logic in a few months // short term migration, shouldn't make a difference for tauri app users // anyway since that's filesystem based. const zustandStore = JSON.parse(localStorage.getItem('store') || '{}') @@ -262,7 +262,7 @@ class KclManager { format() { this.code = recast(parse(kclManager.code)) } - // There's overlapping resposibility between updateAst and executeAst. + // There's overlapping responsibility between updateAst and executeAst. // updateAst was added as it was used a lot before xState migration so makes the port easier. // but should probably have think about which of the function to keep async updateAst( diff --git a/src/lang/abstractSyntaxTree.test.ts b/src/lang/abstractSyntaxTree.test.ts index 322757665..01b125be5 100644 --- a/src/lang/abstractSyntaxTree.test.ts +++ b/src/lang/abstractSyntaxTree.test.ts @@ -1345,7 +1345,7 @@ describe('nests binary expressions correctly', () => { ], }) }) - it('should nest properly with two opperators of equal precedence', () => { + it('should nest properly with two operators of equal precedence', () => { const code = `const yo = 1 + 2 - 3` const { body } = parse(code) expect((body[0] as any).declarations[0].init).toEqual({ @@ -1382,7 +1382,7 @@ describe('nests binary expressions correctly', () => { }, }) }) - it('should nest properly with two opperators of equal (but higher) precedence', () => { + it('should nest properly with two operators of equal (but higher) precedence', () => { const code = `const yo = 1 * 2 / 3` const { body } = parse(code) expect((body[0] as any).declarations[0].init).toEqual({ diff --git a/src/lang/std/README.md b/src/lang/std/README.md index b33dd9d8b..e11026d9d 100644 --- a/src/lang/std/README.md +++ b/src/lang/std/README.md @@ -2,5 +2,5 @@ The std is as expected, tools that are provided with the language. For this language that means functions. -However because programatically changing the source code is a first class citizen in this lang, there needs to be helpes for adding and modifying these function calls, +However because programmatically changing the source code is a first class citizen in this lang, there needs to be helpers for adding and modifying these function calls, So it makes sense to group some of these together. diff --git a/src/lang/std/engineConnection.ts b/src/lang/std/engineConnection.ts index bbb5e80a2..265a2aa54 100644 --- a/src/lang/std/engineConnection.ts +++ b/src/lang/std/engineConnection.ts @@ -664,7 +664,7 @@ export class EngineCommandManager { }, }) - // Inisialize the planes. + // Initialize the planes. this.initPlanes().then(() => { // We execute the code here to make sure if the stream was to // restart in a session, we want to make sure to execute the code. @@ -887,7 +887,7 @@ export class EngineCommandManager { } endSession() { // TODO: instead of sending a single command with `object_ids: Object.keys(this.artifactMap)` - // we need to loop over them each individualy because if the engine doesn't recognise a single + // we need to loop over them each individually because if the engine doesn't recognise a single // id the whole command fails. Object.entries(this.artifactMap).forEach(([id, artifact]) => { const artifactTypesToDelete: ArtifactMap[string]['commandType'][] = [ diff --git a/src/lang/std/sketchConstraints.test.ts b/src/lang/std/sketchConstraints.test.ts index fe2ab71f5..b125522e2 100644 --- a/src/lang/std/sketchConstraints.test.ts +++ b/src/lang/std/sketchConstraints.test.ts @@ -50,7 +50,7 @@ async function testingSwapSketchFnCall({ } } -describe('testing swaping out sketch calls with xLine/xLineTo', () => { +describe('testing swapping out sketch calls with xLine/xLineTo', () => { const bigExampleArr = [ `const part001 = startSketchOn('XY')`, ` |> startProfileAt([0, 0], %)`, @@ -178,7 +178,7 @@ describe('testing swaping out sketch calls with xLine/xLineTo', () => { constraintType: 'horizontal', }) const expectedLine = "xLine({ length: -0.86, tag: 'abc4' }, %)" - // hmm "-0.86" is correct since the angle is 104, but need to make sure this is compatiable `-myVar` + // hmm "-0.86" is correct since the angle is 104, but need to make sure this is compatible `-myVar` expect(newCode).toContain(expectedLine) // new line should start at the same place as the old line expect(originalRange[0]).toBe(newCode.indexOf(expectedLine)) @@ -268,7 +268,7 @@ describe('testing swaping out sketch calls with xLine/xLineTo', () => { }) }) -describe('testing swaping out sketch calls with xLine/xLineTo while keeping variable/identifiers intact', () => { +describe('testing swapping out sketch calls with xLine/xLineTo while keeping variable/identifiers intact', () => { // Enable rotations #152 const variablesExampleArr = [ `const lineX = -1`, diff --git a/src/lang/std/sketchcombos.test.ts b/src/lang/std/sketchcombos.test.ts index b8ae743d9..34920ffdd 100644 --- a/src/lang/std/sketchcombos.test.ts +++ b/src/lang/std/sketchcombos.test.ts @@ -108,7 +108,7 @@ const part001 = startSketchOn('XY') |> line([myVar, 1], %) // ln-should use legLen for y |> line([myVar, -1], %) // ln-legLen but negative |> line([-0.62, -1.54], %) // ln-should become angledLine - |> angledLine([myVar, 1.04], %) // ln-use segLen for secound arg + |> angledLine([myVar, 1.04], %) // ln-use segLen for second arg |> angledLine([45, 1.04], %) // ln-segLen again |> angledLineOfXLength([54, 2.35], %) // ln-should be transformed to angledLine |> angledLineOfXLength([50, myVar], %) // ln-should use legAngX to calculate angle @@ -163,7 +163,7 @@ const part001 = startSketchOn('XY') -legLen(segLen('seg01', %), myVar) ], %) // ln-legLen but negative |> angledLine([-112, segLen('seg01', %)], %) // ln-should become angledLine - |> angledLine([myVar, segLen('seg01', %)], %) // ln-use segLen for secound arg + |> angledLine([myVar, segLen('seg01', %)], %) // ln-use segLen for second arg |> angledLine([45, segLen('seg01', %)], %) // ln-segLen again |> angledLine([54, segLen('seg01', %)], %) // ln-should be transformed to angledLine |> angledLineOfXLength([ @@ -471,7 +471,7 @@ async function helperThing( } describe('testing getConstraintLevelFromSourceRange', () => { - it('should devide up lines into free, partial and fully contrained', () => { + it('should divide up lines into free, partial and fully contrained', () => { const code = `const baseLength = 3 const baseThick = 1 const armThick = 0.5 diff --git a/src/lib/selections.ts b/src/lib/selections.ts index 46f00fc93..275ef0540 100644 --- a/src/lib/selections.ts +++ b/src/lib/selections.ts @@ -15,7 +15,7 @@ app needs these selections to be based on cursors, therefore the app must be in control of selections. On top of that because we need to set cursor positions in code-mirror for selections, both from app logic, and still allow the user to add multiple cursors like a normal editor, it's best to -let code mirror control cursor positions and assosiate those source ranges +let code mirror control cursor positions and associate those source ranges with entity ids from code-mirror events later. So it's a lot of back and forth. conceptually the back and forth is: @@ -43,7 +43,7 @@ In detail: 1) Click commands are mostly sent in stream.tsx search for "select_with_point" -2) The handler for when the engine sends back entitiy ids calls +2) The handler for when the engine sends back entity ids calls getEventForSelectWithPoint, it fires an XState event to update our selections is xstate context 3 and 4) The XState handler for the above uses handleSelectionBatch and @@ -303,7 +303,7 @@ export function resetAndSetEngineEntitySelectionCmds( selections: SelectionToEngine[] ): Models['WebSocketRequest_type'][] { if (!engineCommandManager.engineConnection?.isReady()) { - console.log('engine connection isnt ready') + console.log('engine connection is not ready') return [] } return [ diff --git a/src/machines/modelingMachine.ts b/src/machines/modelingMachine.ts index 63c298d8b..0b96ab7a2 100644 --- a/src/machines/modelingMachine.ts +++ b/src/machines/modelingMachine.ts @@ -664,8 +664,8 @@ export const modelingMachine = createMachine( on: { Cancel: { target: 'idle', - // TODO what if we're existing extrude equiped, should these actions still be fired? - // mabye cancel needs to have a guard for if else logic? + // TODO what if we're existing extrude equipped, should these actions still be fired? + // maybe cancel needs to have a guard for if else logic? actions: [ 'edit_mode_exit', 'default_camera_disable_sketch_mode', diff --git a/src/wasm-lib/kcl/src/ast/types.rs b/src/wasm-lib/kcl/src/ast/types.rs index 1a0c57b7c..9d2598118 100644 --- a/src/wasm-lib/kcl/src/ast/types.rs +++ b/src/wasm-lib/kcl/src/ast/types.rs @@ -784,7 +784,7 @@ pub enum NonCodeValue { /// 1 + 1 /// ``` /// Now this is important. The block comment is attached to the next line. - /// This is always the case. Also the block comment doesnt have a new line above it. + /// This is always the case. Also the block comment doesn't have a new line above it. /// If it did it would be a `NewLineBlockComment`. BlockComment { value: String, diff --git a/src/wasm-lib/kcl/src/docs.rs b/src/wasm-lib/kcl/src/docs.rs index d9167d3e8..cde2b860b 100644 --- a/src/wasm-lib/kcl/src/docs.rs +++ b/src/wasm-lib/kcl/src/docs.rs @@ -193,7 +193,7 @@ pub trait StdLibFn: std::fmt::Debug + Send + Sync { } fn to_signature_help(&self) -> SignatureHelp { - // Fill this in based on the current positon of the cursor. + // Fill this in based on the current position of the cursor. let active_parameter = None; SignatureHelp { diff --git a/src/wasm-lib/tests/executor/outputs/angled_line.png b/src/wasm-lib/tests/executor/outputs/angled_line.png index f2f896d8c..109d842f9 100644 Binary files a/src/wasm-lib/tests/executor/outputs/angled_line.png and b/src/wasm-lib/tests/executor/outputs/angled_line.png differ diff --git a/src/wasm-lib/tests/executor/outputs/close_arc.png b/src/wasm-lib/tests/executor/outputs/close_arc.png index ee28a12cb..4ff0cbac1 100644 Binary files a/src/wasm-lib/tests/executor/outputs/close_arc.png and b/src/wasm-lib/tests/executor/outputs/close_arc.png differ diff --git a/src/wasm-lib/tests/executor/outputs/different_planes_same_drawing.png b/src/wasm-lib/tests/executor/outputs/different_planes_same_drawing.png index 0e87f030d..ec8bfdc48 100644 Binary files a/src/wasm-lib/tests/executor/outputs/different_planes_same_drawing.png and b/src/wasm-lib/tests/executor/outputs/different_planes_same_drawing.png differ diff --git a/src/wasm-lib/tests/executor/outputs/function_sketch.png b/src/wasm-lib/tests/executor/outputs/function_sketch.png index 75dd0218f..e2c176ca1 100644 Binary files a/src/wasm-lib/tests/executor/outputs/function_sketch.png and b/src/wasm-lib/tests/executor/outputs/function_sketch.png differ diff --git a/src/wasm-lib/tests/executor/outputs/function_sketch_with_position.png b/src/wasm-lib/tests/executor/outputs/function_sketch_with_position.png index 75dd0218f..e2c176ca1 100644 Binary files a/src/wasm-lib/tests/executor/outputs/function_sketch_with_position.png and b/src/wasm-lib/tests/executor/outputs/function_sketch_with_position.png differ diff --git a/src/wasm-lib/tests/executor/outputs/holes.png b/src/wasm-lib/tests/executor/outputs/holes.png index 1a68b7d05..aeb1ee246 100644 Binary files a/src/wasm-lib/tests/executor/outputs/holes.png and b/src/wasm-lib/tests/executor/outputs/holes.png differ diff --git a/src/wasm-lib/tests/executor/outputs/lots_of_planes.png b/src/wasm-lib/tests/executor/outputs/lots_of_planes.png index fe31b9d55..221e46584 100644 Binary files a/src/wasm-lib/tests/executor/outputs/lots_of_planes.png and b/src/wasm-lib/tests/executor/outputs/lots_of_planes.png differ diff --git a/src/wasm-lib/tests/executor/outputs/member_expression_sketch_group.png b/src/wasm-lib/tests/executor/outputs/member_expression_sketch_group.png index 1ec2a329f..0bd10db12 100644 Binary files a/src/wasm-lib/tests/executor/outputs/member_expression_sketch_group.png and b/src/wasm-lib/tests/executor/outputs/member_expression_sketch_group.png differ diff --git a/src/wasm-lib/tests/executor/outputs/negative_args.png b/src/wasm-lib/tests/executor/outputs/negative_args.png index 19e8d0cb4..75fe1256f 100644 Binary files a/src/wasm-lib/tests/executor/outputs/negative_args.png and b/src/wasm-lib/tests/executor/outputs/negative_args.png differ diff --git a/src/wasm-lib/tests/executor/outputs/parametric.png b/src/wasm-lib/tests/executor/outputs/parametric.png index 95c97429f..f2ad44a44 100644 Binary files a/src/wasm-lib/tests/executor/outputs/parametric.png and b/src/wasm-lib/tests/executor/outputs/parametric.png differ diff --git a/src/wasm-lib/tests/executor/outputs/parametric_with_tan_arc.png b/src/wasm-lib/tests/executor/outputs/parametric_with_tan_arc.png index 848b0cff1..8bf3b2271 100644 Binary files a/src/wasm-lib/tests/executor/outputs/parametric_with_tan_arc.png and b/src/wasm-lib/tests/executor/outputs/parametric_with_tan_arc.png differ diff --git a/src/wasm-lib/tests/executor/outputs/rounded_with_holes.png b/src/wasm-lib/tests/executor/outputs/rounded_with_holes.png index c0c163c15..5ca9d0195 100644 Binary files a/src/wasm-lib/tests/executor/outputs/rounded_with_holes.png and b/src/wasm-lib/tests/executor/outputs/rounded_with_holes.png differ diff --git a/src/wasm-lib/tests/executor/outputs/tangential_arc.png b/src/wasm-lib/tests/executor/outputs/tangential_arc.png index aa01dca05..5c8709a5f 100644 Binary files a/src/wasm-lib/tests/executor/outputs/tangential_arc.png and b/src/wasm-lib/tests/executor/outputs/tangential_arc.png differ diff --git a/src/wasm-lib/tests/executor/outputs/tangential_arc_to.png b/src/wasm-lib/tests/executor/outputs/tangential_arc_to.png index aa01dca05..5c8709a5f 100644 Binary files a/src/wasm-lib/tests/executor/outputs/tangential_arc_to.png and b/src/wasm-lib/tests/executor/outputs/tangential_arc_to.png differ diff --git a/src/wasm-lib/tests/executor/outputs/tangential_arc_with_point.png b/src/wasm-lib/tests/executor/outputs/tangential_arc_with_point.png index aa01dca05..5c8709a5f 100644 Binary files a/src/wasm-lib/tests/executor/outputs/tangential_arc_with_point.png and b/src/wasm-lib/tests/executor/outputs/tangential_arc_with_point.png differ