Skip to content

Commit 7c8240e

Browse files
authored
Add spell check (#1070)
Add cspell
1 parent 3cefff1 commit 7c8240e

33 files changed

+244
-39
lines changed

.circleci/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ jobs:
6161
- image: hexpm/elixir:<< parameters.image-tag >>
6262
steps:
6363
- checkout
64+
- run:
65+
name: Spell check
66+
command: |
67+
apk add --no-cache npm
68+
npm install -g cspell
69+
cspell --quiet .
6470
- <<: *install_hex_rebar
6571
- <<: *install_system_deps
6672
- restore_tagged_cache:

.cspell.json

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
3+
"version": "0.2",
4+
"language": "en",
5+
"useGitignore": true,
6+
"ignorePaths": [
7+
"**/*.yml",
8+
"mix.exs",
9+
"mix.lock",
10+
"resources/ZWave_custom_cmd_classes.xml"
11+
],
12+
"words": [
13+
"acks",
14+
"agclg",
15+
"agclr",
16+
"agig",
17+
"agir",
18+
"agng",
19+
"agnr",
20+
"asgr",
21+
"asgg",
22+
"Aidoo",
23+
"Airzone",
24+
"arrayattrib",
25+
"badrpc",
26+
"behaviour",
27+
"bitfield",
28+
"bitflag",
29+
"bitmask",
30+
"bitmasks",
31+
"bjyoungblood",
32+
"BTBS",
33+
"btus",
34+
"cbit",
35+
"ccitt",
36+
"cerlc",
37+
"charlists",
38+
"ciphertext",
39+
"CKDF",
40+
"ckdf",
41+
"Cloutier",
42+
"CMAC",
43+
"cmac",
44+
"coef",
45+
"coeffs",
46+
"codepoints",
47+
"Creditmeter",
48+
"datagram",
49+
"defmodule",
50+
"defp",
51+
"dialzyer",
52+
"djantea",
53+
"dtls",
54+
"dtlsv",
55+
"ecdh",
56+
"eeprom",
57+
"Emer",
58+
"encap",
59+
"encaptype",
60+
"epmd",
61+
"esac",
62+
"evaled",
63+
"fieldenum",
64+
"fieldmask",
65+
"firmwares",
66+
"flagmask",
67+
"flagname",
68+
"getopts",
69+
"getstat",
70+
"HANPREFIX",
71+
"hextet",
72+
"hocuspocus",
73+
"hostnames",
74+
"Hunleth",
75+
"hvac",
76+
"ifaddr",
77+
"imes",
78+
"impls",
79+
"INPROGRESS",
80+
"ints",
81+
"iolist",
82+
"jfcloutier",
83+
"joinin",
84+
"jwdotjs",
85+
"kbit",
86+
"kbps",
87+
"keepalive",
88+
"keepalives",
89+
"keyfob",
90+
"kiloohms",
91+
"kvar",
92+
"kvarh",
93+
"kvah",
94+
"LANIP",
95+
"lenmask",
96+
"lenoffs",
97+
"Leviton",
98+
"liedu",
99+
"lladdr",
100+
"lowpan",
101+
"MADR",
102+
"macroseismic",
103+
"manu",
104+
"mcag",
105+
"mcagg",
106+
"mcagr",
107+
"mcar",
108+
"mcas",
109+
"mdns",
110+
"mercalli",
111+
"mgrp",
112+
"milliamps",
113+
"milliwatts",
114+
"mkdsk",
115+
"moduledoc",
116+
"moretofollowmask",
117+
"moretofollowoffs",
118+
"mpan",
119+
"msecs",
120+
"mucr",
121+
"mucs",
122+
"multidevice",
123+
"multiposition",
124+
"nacked",
125+
"NLWR",
126+
"NMIM",
127+
"nodeid",
128+
"noproc",
129+
"NOROUTE",
130+
"noshell",
131+
"ntoa",
132+
"optionalmask",
133+
"optionaloffs",
134+
"Oscorp",
135+
"paramdesc",
136+
"paramdescloc",
137+
"paramoffs",
138+
"paramstart",
139+
"peercert",
140+
"peername",
141+
"pids",
142+
"picocuries",
143+
"postwalk",
144+
"powerlevel",
145+
"PPID",
146+
"pstring",
147+
"randfile",
148+
"Readback",
149+
"relock",
150+
"remsh",
151+
"rfid",
152+
"rootfs",
153+
"rssi",
154+
"sapi",
155+
"Schlage",
156+
"sendfile",
157+
"serialapi",
158+
"serlog",
159+
"setcookie",
160+
"setopts",
161+
"setpoint",
162+
"setpoints",
163+
"shindo",
164+
"Silabs",
165+
"singlecast",
166+
"sizechange",
167+
"sizemask",
168+
"sizeoffs",
169+
"skipfield",
170+
"smartstart",
171+
"snakecase",
172+
"sockname",
173+
"sslsocket",
174+
"sublocation",
175+
"Switchpoint",
176+
"taptun",
177+
"TUNDEV",
178+
"tuntap",
179+
"Typespec",
180+
"underheat",
181+
"unitless",
182+
"usbmodem",
183+
"waterflow",
184+
"wakeup",
185+
"whereis",
186+
"whereby",
187+
"wlan",
188+
"Yanagida",
189+
"zensor",
190+
"zipmessages",
191+
"ziprouter",
192+
"ZIPR",
193+
"zniffer",
194+
"zwave",
195+
"zwaveplus",
196+
"ZWRF"
197+
]
198+
}

example/config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ config :nerves, :firmware, rootfs_overlay: "rootfs_overlay"
1717

1818
config :nerves, source_date_epoch: "1589811415"
1919

20-
# Use Ringlogger as the logger backend and remove :console.
20+
# Use RingLogger as the logger backend and remove :console.
2121
# See https://hexdocs.pm/ring_logger/readme.html for more information on
2222
# configuring ring_logger.
2323

lib/grizzly/associations.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ defmodule Grizzly.Associations do
165165
associations =
166166
file_path
167167
|> read_all_associations()
168-
|> Enum.reduce([], fn {groupind_id, node_ids}, assocs ->
169-
assoc = %Association{grouping_id: groupind_id, node_ids: node_ids}
168+
|> Enum.reduce([], fn {grouping_id, node_ids}, assocs ->
169+
assoc = %Association{grouping_id: grouping_id, node_ids: node_ids}
170170

171171
assocs ++ [assoc]
172172
end)

lib/grizzly/firmware_update_handler.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defmodule Grizzly.FirmwareUpdateHandler do
88
99
The report this callback function will most want to handle is:
1010
11-
- `Grizzly.ZWave.Commands.FirmwareUpdateMDRequestReport` It indicates whether the formware update was initiated successfully.
11+
- `Grizzly.ZWave.Commands.FirmwareUpdateMDRequestReport` It indicates whether the firmware update was initiated successfully.
1212
- `Grizzly.ZWave.Commands.FirmwareUpdateMDStatusReport` It is sent by the target device once the firmware update completes, successfully or in failure.
1313
1414
The callback might also want to be aware of:

lib/grizzly/firmware_updates.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ defmodule Grizzly.FirmwareUpdates do
44
55
Required options:
66
7-
* `manufacturer_id` - The unique id indentifying the manufacturer of the target device
7+
* `manufacturer_id` - The unique id identifying the manufacturer of the target device
88
* `firmware_id` - The id of the current firmware
99
1010
Other options:
1111
1212
* `device_id` - Node id of the device to be updated. Defaults to 1 (controller)
13-
* `firmware_target` - The firwmare target id. Defaults to 0 (the ZWave chip)
13+
* `firmware_target` - The firmware target id. Defaults to 0 (the ZWave chip)
1414
* `max_fragment_size` - The maximum number of bytes that will be transmitted at a time. Defaults to 2048.
1515
* `hardware_version` - The current hardware version of the device to be updated. Defaults to 0.
1616
* `activation_may_be_delayed?` - Whether it is permitted for the device may delay the actual firmware update. Defaults to false.

lib/grizzly/firmware_updates/firmware_update_runner/firmware_update.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule Grizzly.FirmwareUpdates.FirmwareUpdateRunner.FirmwareUpdate do
22
@moduledoc false
33

44
# This module holds the state of the FirmwareUpdateRunner and
5-
# knows how to move the process along (which commmand follows which)
5+
# knows how to move the process along (which command follows which)
66

77
alias Grizzly.FirmwareUpdates
88
alias Grizzly.FirmwareUpdates.FirmwareUpdateRunner.Image
@@ -57,7 +57,7 @@ defmodule Grizzly.FirmwareUpdates.FirmwareUpdateRunner.FirmwareUpdate do
5757
activation_may_be_delayed?: false,
5858
state: :started,
5959
fragments_wanted: 0,
60-
# first frgament has index 1
60+
# first fragment has index 1
6161
fragment_index: 1,
6262
transmission_delay: nil,
6363
last_transmission_speed: {40, :kbit_sec}

lib/grizzly/network.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ defmodule Grizzly.Network do
281281
end
282282

283283
@doc """
284-
Request a node to peform a neighbor update operation.
284+
Request a node to perform a neighbor update operation.
285285
"""
286286
@spec node_neighbor_update_request(Grizzly.node_id(), [Grizzly.command_opt()]) ::
287287
Grizzly.send_command_response()

lib/grizzly/transports/DTLS.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ defmodule Grizzly.Transports.DTLS do
207207
end
208208

209209
@doc false
210-
def user_lookup(:psk, _username, userstate) do
211-
{:ok, userstate}
210+
def user_lookup(:psk, _username, user_state) do
211+
{:ok, user_state}
212212
end
213213

214214
defp dtls_opts(ifaddr, opts \\ []) do

lib/grizzly/unsolicited_server/dtls_transport.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ defmodule Grizzly.UnsolicitedServer.DTLSTransport do
4141
@impl ThousandIsland.Transport
4242
defdelegate upgrade(socket, options), to: ThousandIsland.Transports.SSL
4343

44-
defp user_lookup(:psk, _username, userstate) do
45-
{:ok, userstate}
44+
defp user_lookup(:psk, _username, user_state) do
45+
{:ok, user_state}
4646
end
4747

4848
defp do_listen(port, opts, attempts) do

0 commit comments

Comments
 (0)