Skip to content

Commit eb74c87

Browse files
authored
Add typos GHA integration (#803)
1 parent 88825f6 commit eb74c87

File tree

11 files changed

+39
-12
lines changed

11 files changed

+39
-12
lines changed

.github/workflows/ci-base.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ jobs:
6565

6666
- name: Run ameba
6767
run: bin/ameba
68+
69+
- name: Check for typos
70+
uses: crate-ci/typos@v1

_typos.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[default]
2+
extend-ignore-re = [
3+
# numeric literals
4+
'0x[0-9a-fA-F_\.\+]+([fiu](8|16|32|64|128))?',
5+
'\\u\{[0-9a-fA-F]+\}',
6+
# words including a number are likely some kind of identifier
7+
"[A-z]+[0-9]+",
8+
]
9+
10+
[default.extend-words]
11+
iif = "iif"
12+
nd = "nd"
13+
14+
[files]
15+
extend-exclude = [
16+
# git and dependencies
17+
".git/**",
18+
"lib/**",
19+
# individual files to exclude
20+
"src/assets/runtime.js",
21+
"src/assets/runtime_test.js",
22+
"core/source/Time/Languages/*.mint",
23+
"!core/source/Time/Languages/English.mint",
24+
]

core/tests/tests/SearchParams.mint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ suite "SearchParams.get" {
1919
|> SearchParams.get("a")) == Maybe.just("b")
2020
}
2121

22-
test "returns nothig if key does not exists" {
22+
test "returns nothing if key does not exists" {
2323
("a=b&c=d"
2424
|> SearchParams.fromString()
2525
|> SearchParams.get("x")) == Maybe.nothing()

core/tests/tests/Set.mint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ suite "Set.has" {
3737
|> Set.has(Maybe.just("value"))) == true
3838
}
3939

40-
test "it returns false if the itme does not exists in the set" {
40+
test "it returns false if the item does not exists in the set" {
4141
(Set.empty()
4242
|> Set.has("x")) == false
4343
}

runtime/tests/equality.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ describe("FormData", () => {
227227
expect(compare(a, null)).toBe(false);
228228
});
229229

230-
test("empty form datas are equal", () => {
230+
test("empty form data objects are equal", () => {
231231
expect(compare(new FormData(), new FormData())).toBe(true);
232232
});
233233

234-
test("same data form datas are equal", () => {
234+
test("same data form data objects are equal", () => {
235235
const a = new FormData();
236236
a.append("a", "a");
237237

@@ -241,7 +241,7 @@ describe("FormData", () => {
241241
expect(compare(a, b)).toBe(true);
242242
});
243243

244-
test("different datas are not equal", () => {
244+
test("different data objects are not equal", () => {
245245
const a = new FormData();
246246
a.append("a", "a");
247247

@@ -251,7 +251,7 @@ describe("FormData", () => {
251251
expect(compare(a, b)).toBe(false);
252252
});
253253

254-
test("different datas are not equal", () => {
254+
test("different data objects are not equal", () => {
255255
const a = new FormData();
256256
a.append("a", "b");
257257

@@ -261,7 +261,7 @@ describe("FormData", () => {
261261
expect(compare(a, b)).toBe(false);
262262
});
263263

264-
test("same multiple data form datas are equal", () => {
264+
test("same multiple data form data objects are equal", () => {
265265
const a = new FormData();
266266
a.append("a", "a");
267267
a.append("a", "b");
@@ -273,7 +273,7 @@ describe("FormData", () => {
273273
expect(compare(a, b)).toBe(true);
274274
});
275275

276-
test("same multiple data form datas with different order are equal", () => {
276+
test("same multiple data form data objects with different order are equal", () => {
277277
const a = new FormData();
278278
a.append("a", "b");
279279
a.append("x", "y");

src/installer.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Mint
1010
@dependencies =
1111
{} of Package => Hash(String, Constraint)
1212

13-
# This holds the elimiated packages, which package elminiated it
13+
# This holds the eliminated packages, which package elminiated it
1414
# and with which constraint
1515
@eliminated =
1616
[] of Tuple(Package, Package, Constraint, String)

src/parsers/html_attribute.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Mint
22
class Parser
33
def html_attribute(with_dashes : Bool = true) : Ast::HtmlAttribute?
44
parse do |start_position|
5-
# Dash (-) is maily for data attributes (data-value), colon (`:`) is
5+
# Dash (-) is mainly for data attributes (data-value), colon (`:`) is
66
# for namespaces (xlink:actuate) and we only parse them for HTML
77
# attributes not component attributes (`with_dashes`).
88
name = variable track: false, extra_chars: with_dashes ? ['-', ':'] : [] of Char

src/references_tracker.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Mint
77
# bundles to construct. To do that we track back each node to it's root
88
# node(s) through the links.
99
#
10-
# Asnyc components and deferred code got their on bundles
10+
# Async components and deferred code got their on bundles
1111
# and any other code which is referenced from multiple sources will
1212
# get their own bundle.
1313
class ReferencesTracker

0 commit comments

Comments
 (0)