Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit ad5f790

Browse files
committed
Add typos pre-commit rule, fix findings
1 parent d583c2a commit ad5f790

File tree

10 files changed

+75
-10
lines changed

10 files changed

+75
-10
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ repos:
1616
- id: rst-backticks
1717
stages: ["pre-commit"]
1818
exclude: 'scripts/builtin-plugins/Zeek_JavaScript/__load__.zeek.rst'
19+
20+
- repo: https://github.com/crate-ci/typos
21+
rev: v1.30.1
22+
hooks:
23+
- id: typos

.typos.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[default]
2+
extend-ignore-re = [
3+
# seh too close to she
4+
"registered SEH to support IDL",
5+
# ALLO is a valid FTP command
6+
"\"ALLO\".*[0-9]{3}",
7+
"des-ede3-cbc-Env-OID",
8+
# On purpose
9+
"\"THE NETBIOS NAM\"",
10+
# NFS stuff.
11+
"commited: :zeek:type:`NFS3::stable_how_t`",
12+
"\\/fo\\(o",
13+
" nd\\.<br",
14+
"\"BaR\"",
15+
"Not-ECT",
16+
"Ninteenth: Ninteenth",
17+
18+
# Connecton and file UIDs
19+
"[CF][a-zA-Z0-9]{17}",
20+
21+
# Smoot
22+
"Smoot",
23+
]
24+
25+
extend-ignore-identifiers-re = [
26+
"TLS_.*_EDE.*_.*",
27+
"SSL.*_EDE.*_.*",
28+
"_3DES_EDE_CBC_SHA",
29+
"GOST_R_.*",
30+
"icmp6_nd_.*",
31+
"pn", # Use for `PoolNode` variables
32+
"complte_flag", # Existing use in exported record in base.
33+
"VidP(n|N)", # In SMB.
34+
"iin", # In DNP3.
35+
"(ScValidatePnPService|ScSendPnPMessage)", # In DCE-RPC.
36+
"snet", # Used as shorthand for subnet in base scripts.
37+
"typ",
38+
]
39+
40+
[default.extend-identifiers]
41+
MCA_OCCURED = "MCA_OCCURED"
42+
MNT3ERR_ACCES = "MNT3ERR_ACCES"
43+
ND_QUEUE_OVERFLOW = "ND_QUEUE_OVERFLOW"
44+
ND_REDIRECT = "ND_REDIRECT"
45+
NFS3ERR_ACCES = "NFS3ERR_ACCES"
46+
NO_SEH = "NO_SEH"
47+
RPC_NT_CALL_FAILED_DNE = "RPC_NT_CALL_FAILED_DNE"
48+
RpcAddPrintProvidor = "RpcAddPrintProvidor"
49+
RpcDeletePrintProvidor = "RpcDeletePrintProvidor"
50+
THA = "THA"
51+
tha = "tha"
52+
uses_seh = "uses_seh"
53+
54+
[default.extend-words]
55+
caf = "caf"
56+
helo = "helo"
57+
# Seems we use this in the management framework
58+
requestor = "requestor"
59+
# `inout` is used as a keyword in Spicy, but looks like a typo of `input`.
60+
inout = "inout"

cluster-setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ and user-space DNA (Direct NIC Access) for fast packet capture/transmission.
494494
.. note::
495495

496496
Unless you have evaluated to specifically require PF_RING, consider using
497-
AF_PACKET first and test if it fullfills your requirements. AF_PACKET has
497+
AF_PACKET first and test if it fulfills your requirements. AF_PACKET has
498498
been integrated into Zeek since version 5.2. It's a bit easier to get
499499
started with as it does not require an out of tree Linux kernel module.
500500

devel/spicy/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ finger;``.
4545

4646
.. note::
4747

48-
This documentation focusses on writing *external* Spicy analyzers
48+
This documentation focuses on writing *external* Spicy analyzers
4949
that you can load into Zeek at startup. Zeek also comes with the
5050
infrastructure to build Spicy analyzers directly into the
5151
executable itself, just like traditional built-in analyzers. We

devel/spicy/reference.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ Accessing Zeek Variables from Spicy
900900
You can access Zeek-side global variables from inside Spicy, which is
901901
particularly handy for configuring Spicy analyzers from Zeek script
902902
code. The :ref:`zeek <spicy_functions>` module facilitates this
903-
through a set of functions coverting the current value of Zeek
903+
through a set of functions converting the current value of Zeek
904904
variables into corresponding Spicy values. For example, let's say you
905905
would like to provide a Zeek script option with a ``count`` value that
906906
your Spicy analyzer can leverage. On the Zeek side, you'd define the

frameworks/management.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ Compatibility
491491
Zeek 5.2 switched client/controller communication from Broker's native wire
492492
format to the newer `WebSocket data transport
493493
<https://docs.zeek.org/projects/broker/en/current/web-socket.html>`_, with
494-
``zeek-client`` 1.2.0 being the first version to exlusively use WebSockets.
494+
``zeek-client`` 1.2.0 being the first version to exclusively use WebSockets.
495495
This has a few implications:
496496

497497
* Since Broker dedicates separate ports to the respective wire formats, the
@@ -659,7 +659,7 @@ Configuration of the Telemetry framework
659659
----------------------------------------
660660

661661
By default, the framework will enable Prometheus metrics exposition ports,
662-
including a service discovery endpoint on the mananger (refer to the
662+
including a service discovery endpoint on the manager (refer to the
663663
:ref:`Telemetry Framework <framework-telemetry>` for details), and
664664
auto-assign them for you. Specifically, the controller will enumerate ports
665665
starting from

install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ To install these, you can use:
294294
Note: By default, Windows links against the standard libpcap library from
295295
vcpkg. This version of libpcap does not support packet capture on Windows,
296296
unlike other platforms. In order to capture packets from live interfaces on
297-
Windows, you will need to link against the Npcap_ libary. This library is free
297+
Windows, you will need to link against the Npcap_ library. This library is free
298298
for personal use, but requires a paid license for commercial use or
299299
redistribution. To link against Npcap, download the SDK from their website,
300300
unzip it, and then pass ``-DPCAP_ROOT_DIR="<path to npcap sdk>"`` to the

script-reference/operators.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ For :zeek:type:`table` and :zeek:type:`set` values,
202202
each of the RHS elements are added to the
203203
table or set. For :zeek:type:`vector`, the RHS elements are appended to
204204
the end of the vector. For :zeek:type:`pattern` values, the pattern is
205-
modified to include the RHS pattern as an alterantive (regular expression ``|``
205+
modified to include the RHS pattern as an alternative (regular expression ``|``
206206
operator).
207207

208208
The ``-=`` operator provides analogous functionality for :zeek:type:`table`

script-reference/statements.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ the ``&log`` attribute.
308308
.. note::
309309

310310
The :ref:`logging framework <framework-logging>` provides a separate
311-
mechanism to exlude columns from logs by means of the ``exclude`` field
311+
mechanism to exclude columns from logs by means of the ``exclude`` field
312312
on :zeek:see:`Log::Filter` instances.
313313

314314
Examples:

troubleshooting.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ has it enabled while Fedora 38 does not. You're advised to verify the
5353
5454
You can either build Zeek from source and pass the ``--enable-jemalloc`` flag
5555
(possibly with ``--with-jemalloc=/usr/local/`` for a custom build) to always
56-
use the jemalloc allocater (recommended), or set ``LD_PRELOAD`` as shown above.
56+
use the jemalloc allocator (recommended), or set ``LD_PRELOAD`` as shown above.
5757
Using ``LD_PRELOAD`` can be convenient if you're not
5858
in a position to rebuild Zeek or you're consuming upstream binary packages that
5959
did not use ``--enable-jemalloc``, or you want to use a custom ad-hoc/patched
@@ -381,7 +381,7 @@ The following provides an example of :file:`prof.log` content:
381381
1684828262.344351 TCP-States:Rst. 16 64
382382
1684828262.344351 Connections expired due to inactivity: 2426
383383
1684828262.344351 Timers: current=47708 max=47896 lag=0.00s
384-
1684828262.344351 DNS_Mgr: requests=1596 succesful=1596 failed=0 pending=0 cached_hosts=0 cached_addrs=1207
384+
1684828262.344351 DNS_Mgr: requests=1596 successful=1596 failed=0 pending=0 cached_hosts=0 cached_addrs=1207
385385
1684828262.344351 Triggers: total=4900 pending=0
386386
1684828262.344351 ConnectionDeleteTimer = 905
387387
1684828262.344351 ConnectionInactivityTimer = 6759

0 commit comments

Comments
 (0)