From e988c7ff59c4e181e049952e08827f9cf1241e59 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Thu, 20 Nov 2025 03:45:54 +0100 Subject: [PATCH 1/4] Use `typos` GHA integration --- .github/workflows/ci-base.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-base.yml b/.github/workflows/ci-base.yml index 89475a0bd..e5811bbc4 100644 --- a/.github/workflows/ci-base.yml +++ b/.github/workflows/ci-base.yml @@ -65,3 +65,6 @@ jobs: - name: Run ameba run: bin/ameba + + - name: Check for typos + uses: crate-ci/typos@v1 From 7dca3b758070051e5c1335a581dd43f39c7bfb5b Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Thu, 20 Nov 2025 04:08:30 +0100 Subject: [PATCH 2/4] Add `typos` config file --- _typos.toml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 _typos.toml diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 000000000..43f409d95 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,24 @@ +[default] +extend-ignore-re = [ + # numeric literals + '0x[0-9a-fA-F_\.\+]+([fiu](8|16|32|64|128))?', + '\\u\{[0-9a-fA-F]+\}', + # words including a number are likely some kind of identifier + "[A-z]+[0-9]+", +] + +[default.extend-words] +iif = "iif" +nd = "nd" + +[files] +extend-exclude = [ + # git and dependencies + ".git/**", + "lib/**", + # individual files to exclude + "src/assets/runtime.js", + "src/assets/runtime_test.js", + "core/source/Time/Languages/*.mint", + "!core/source/Time/Languages/English.mint", +] From 669e6ba4ba9186e2166b7a5982251db5860a752d Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Thu, 20 Nov 2025 04:08:53 +0100 Subject: [PATCH 3/4] Rename: `form datas` -> `form data objects` --- runtime/tests/equality.test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/tests/equality.test.js b/runtime/tests/equality.test.js index 3a5e2f533..1f306e54f 100644 --- a/runtime/tests/equality.test.js +++ b/runtime/tests/equality.test.js @@ -227,11 +227,11 @@ describe("FormData", () => { expect(compare(a, null)).toBe(false); }); - test("empty form datas are equal", () => { + test("empty form data objects are equal", () => { expect(compare(new FormData(), new FormData())).toBe(true); }); - test("same data form datas are equal", () => { + test("same data form data objects are equal", () => { const a = new FormData(); a.append("a", "a"); @@ -241,7 +241,7 @@ describe("FormData", () => { expect(compare(a, b)).toBe(true); }); - test("different datas are not equal", () => { + test("different data objects are not equal", () => { const a = new FormData(); a.append("a", "a"); @@ -251,7 +251,7 @@ describe("FormData", () => { expect(compare(a, b)).toBe(false); }); - test("different datas are not equal", () => { + test("different data objects are not equal", () => { const a = new FormData(); a.append("a", "b"); @@ -261,7 +261,7 @@ describe("FormData", () => { expect(compare(a, b)).toBe(false); }); - test("same multiple data form datas are equal", () => { + test("same multiple data form data objects are equal", () => { const a = new FormData(); a.append("a", "a"); a.append("a", "b"); @@ -273,7 +273,7 @@ describe("FormData", () => { expect(compare(a, b)).toBe(true); }); - test("same multiple data form datas with different order are equal", () => { + test("same multiple data form data objects with different order are equal", () => { const a = new FormData(); a.append("a", "b"); a.append("x", "y"); From 03787c1dfedcbb53e7a4a4441d1b3584dbee2d70 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Thu, 20 Nov 2025 04:09:14 +0100 Subject: [PATCH 4/4] Fix remaining typos (sic!) --- core/tests/tests/SearchParams.mint | 2 +- core/tests/tests/Set.mint | 2 +- ...n => string_literal_with_interpolation_and_js_interpolation} | 0 ...ith_js_iterpolation => string_literal_with_js_interpolation} | 0 src/installer.cr | 2 +- src/parsers/html_attribute.cr | 2 +- src/references_tracker.cr | 2 +- src/type_checkers/decode.cr | 2 +- 8 files changed, 6 insertions(+), 6 deletions(-) rename spec/compilers/{string_literal_with_interpolation_and_js_iterpolation => string_literal_with_interpolation_and_js_interpolation} (100%) rename spec/compilers/{string_literal_with_js_iterpolation => string_literal_with_js_interpolation} (100%) diff --git a/core/tests/tests/SearchParams.mint b/core/tests/tests/SearchParams.mint index 1e6ea780b..8e9a351b1 100644 --- a/core/tests/tests/SearchParams.mint +++ b/core/tests/tests/SearchParams.mint @@ -19,7 +19,7 @@ suite "SearchParams.get" { |> SearchParams.get("a")) == Maybe.just("b") } - test "returns nothig if key does not exists" { + test "returns nothing if key does not exists" { ("a=b&c=d" |> SearchParams.fromString() |> SearchParams.get("x")) == Maybe.nothing() diff --git a/core/tests/tests/Set.mint b/core/tests/tests/Set.mint index 12c1daf7e..17967475c 100644 --- a/core/tests/tests/Set.mint +++ b/core/tests/tests/Set.mint @@ -37,7 +37,7 @@ suite "Set.has" { |> Set.has(Maybe.just("value"))) == true } - test "it returns false if the itme does not exists in the set" { + test "it returns false if the item does not exists in the set" { (Set.empty() |> Set.has("x")) == false } diff --git a/spec/compilers/string_literal_with_interpolation_and_js_iterpolation b/spec/compilers/string_literal_with_interpolation_and_js_interpolation similarity index 100% rename from spec/compilers/string_literal_with_interpolation_and_js_iterpolation rename to spec/compilers/string_literal_with_interpolation_and_js_interpolation diff --git a/spec/compilers/string_literal_with_js_iterpolation b/spec/compilers/string_literal_with_js_interpolation similarity index 100% rename from spec/compilers/string_literal_with_js_iterpolation rename to spec/compilers/string_literal_with_js_interpolation diff --git a/src/installer.cr b/src/installer.cr index 632dbca1f..150a44415 100644 --- a/src/installer.cr +++ b/src/installer.cr @@ -10,7 +10,7 @@ module Mint @dependencies = {} of Package => Hash(String, Constraint) - # This holds the elimiated packages, which package elminiated it + # This holds the eliminated packages, which package elminiated it # and with which constraint @eliminated = [] of Tuple(Package, Package, Constraint, String) diff --git a/src/parsers/html_attribute.cr b/src/parsers/html_attribute.cr index 2a6d1d161..f1e2ddb9f 100644 --- a/src/parsers/html_attribute.cr +++ b/src/parsers/html_attribute.cr @@ -2,7 +2,7 @@ module Mint class Parser def html_attribute(with_dashes : Bool = true) : Ast::HtmlAttribute? parse do |start_position| - # Dash (-) is maily for data attributes (data-value), colon (`:`) is + # Dash (-) is mainly for data attributes (data-value), colon (`:`) is # for namespaces (xlink:actuate) and we only parse them for HTML # attributes not component attributes (`with_dashes`). name = variable track: false, extra_chars: with_dashes ? ['-', ':'] : [] of Char diff --git a/src/references_tracker.cr b/src/references_tracker.cr index cead3ae62..1794e9385 100644 --- a/src/references_tracker.cr +++ b/src/references_tracker.cr @@ -7,7 +7,7 @@ module Mint # bundles to construct. To do that we track back each node to it's root # node(s) through the links. # - # Asnyc components and deferred code got their on bundles + # Async components and deferred code got their on bundles # and any other code which is referenced from multiple sources will # get their own bundle. class ReferencesTracker diff --git a/src/type_checkers/decode.cr b/src/type_checkers/decode.cr index a05d2010f..ded73cbf3 100644 --- a/src/type_checkers/decode.cr +++ b/src/type_checkers/decode.cr @@ -45,7 +45,7 @@ module Mint if definition = ast.type_definitions.find(&.name.value.==(type.name)) case definition.fields in Array(Ast::TypeDefinitionField) - unreachable! "Tried to check if type #{type.to_mint} is decodeable!" + unreachable! "Tried to check if type #{type.to_mint} is decodable!" in Array(Ast::TypeVariant) definition_type = resolve(definition)