From 52f333ae042cbd88276f197fe1f7d7f53db76430 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 16 Oct 2024 15:06:27 +0100 Subject: [PATCH] ci: add codespell action, fix all typos v2: - ignore NEWS, omit suppressions - split off style changes Signed-off-by: Emil Velikov --- .codespellignore | 8 ++++++++ .github/workflows/codespell.yml | 24 ++++++++++++++++++++++++ ccan/list/list.h | 2 +- desc-dump.c | 4 ++-- lsusb.c | 2 +- usb-spec.h | 8 ++++---- usbhid-dump/NEWS | 2 +- 7 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 .codespellignore create mode 100644 .github/workflows/codespell.yml diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 0000000..ce2ebbf --- /dev/null +++ b/.codespellignore @@ -0,0 +1,8 @@ +# SPDX-FileCopyrightText: 2024 Emil Velikov +# +# SPDX-License-Identifier: LGPL-2.1-or-later + +bridg +iIF +ser +wHeight diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..9a7e35f --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: 2024 Emil Velikov +# +# SPDX-License-Identifier: LGPL-2.1-or-later + +name: Check spelling with codespell + +on: + push: + branches: [master, ci-test] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + spellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2.1 + with: + ignore_words_file: .codespellignore + skip: NEWS diff --git a/ccan/list/list.h b/ccan/list/list.h index 37f7208..c8a1092 100644 --- a/ccan/list/list.h +++ b/ccan/list/list.h @@ -717,7 +717,7 @@ static inline void list_prepend_list_(struct list_head *to, * @off: offset(relative to @i) at which list node data resides. * * This is a low-level wrapper to iterate @i over the entire list, used to - * implement all oher, more high-level, for-each constructs. It's a for loop, + * implement all other, more high-level, for-each constructs. It's a for loop, * so you can break and continue as normal. * * WARNING! Being the low-level macro that it is, this wrapper doesn't know diff --git a/desc-dump.c b/desc-dump.c index db81f79..a8aed5c 100644 --- a/desc-dump.c +++ b/desc-dump.c @@ -205,7 +205,7 @@ static void number_renderer( /** * Render a field's value to stdout. * - * The manner of rendering the value is dependant on the value type. + * The manner of rendering the value is dependent on the value type. * * \param[in] dev LibUSB device handle. * \param[in] current Descriptor definition field to render. @@ -320,7 +320,7 @@ static void value_renderer( const struct desc *ext_desc; const struct desc_ext *ext; - /* Lookup the extention descriptor definitions to use, */ + /* Lookup the extension descriptor definitions to use, */ for (ext = current->extension.d; ext->desc != NULL; ext++) { if (ext->type == type) { ext_desc = ext->desc; diff --git a/lsusb.c b/lsusb.c index 9943c57..0b74182 100644 --- a/lsusb.c +++ b/lsusb.c @@ -118,7 +118,7 @@ unsigned int verblevel = VERBLEVEL_DEFAULT; static int do_report_desc = 1; static const char *const encryption_type[] = { - "UNSECURE", "WIRED", "CCM_1", "RSA_1", "RESERVED", + "INSECURE", "WIRED", "CCM_1", "RSA_1", "RESERVED", }; static const char *const vconn_power[] = { diff --git a/usb-spec.h b/usb-spec.h index 48118c9..56f5643 100644 --- a/usb-spec.h +++ b/usb-spec.h @@ -292,7 +292,7 @@ static const struct genericstrtable hutus[] = { { (0x02 << 16) + 0x006, "Sailing Simulation Device" }, { (0x02 << 16) + 0x007, "Motorcycle Simulation Device" }, { (0x02 << 16) + 0x008, "Sports Simulation Device" }, - { (0x02 << 16) + 0x009, "Airplane Simualtion Device" }, + { (0x02 << 16) + 0x009, "Airplane Simulation Device" }, { (0x02 << 16) + 0x00a, "Helicopter Simulation Device" }, { (0x02 << 16) + 0x00b, "Magic Carpet Simulation Device" }, { (0x02 << 16) + 0x00c, "Bicycle Simulation Device" }, @@ -896,7 +896,7 @@ static const struct genericstrtable hutus[] = { { (0x0c << 16) + 0x18d, "AL Contacts/Address Book" }, { (0x0c << 16) + 0x18e, "AL Calendar/Schedule" }, { (0x0c << 16) + 0x18f, "AL Task/Project Manager" }, - { (0x0c << 16) + 0x190, "AL Log/Jounal/Timecard" }, + { (0x0c << 16) + 0x190, "AL Log/Journal/Timecard" }, { (0x0c << 16) + 0x191, "AL Checkbook/Finance" }, { (0x0c << 16) + 0x192, "AL Calculator" }, { (0x0c << 16) + 0x193, "AL A/V Capture/Playback" }, @@ -1192,7 +1192,7 @@ static const struct genericstrtable hutus[] = { { (0x82 << 16) + 0x06e, "Green Video Black Level" }, { (0x82 << 16) + 0x070, "Blue Video Black Level" }, { (0x82 << 16) + 0x0a2, "Auto Size Center" }, - { (0x82 << 16) + 0x0a4, "Polarity Horizontal Sychronization" }, + { (0x82 << 16) + 0x0a4, "Polarity Horizontal Synchronization" }, { (0x82 << 16) + 0x0a6, "Polarity Vertical Synchronization" }, { (0x82 << 16) + 0x0aa, "Screen Orientation" }, { (0x82 << 16) + 0x0ac, "Horizontal Frequency in Hz" }, @@ -1424,7 +1424,7 @@ static const struct genericstrtable langids[] = { { 0x0009 + (0x06 << 10), "Ireland" }, { 0x0009 + (0x07 << 10), "South Africa" }, { 0x0009 + (0x08 << 10), "Jamaica" }, - { 0x0009 + (0x09 << 10), "Carribean" }, + { 0x0009 + (0x09 << 10), "Caribbean" }, { 0x0009 + (0x0a << 10), "Belize" }, { 0x0009 + (0x0b << 10), "Trinidad" }, { 0x0009 + (0x0c << 10), "Zimbabwe" }, diff --git a/usbhid-dump/NEWS b/usbhid-dump/NEWS index 4c7e40d..24bc824 100644 --- a/usbhid-dump/NEWS +++ b/usbhid-dump/NEWS @@ -24,7 +24,7 @@ * Added interface number limiting option -i, --interface=NUMBER. * Added stream interrupt transfer timeout option -t, --stream-timeout=NUMBER, which is set to 1 minute by default to - allow recovery of accidentially captured terminal input device. + allow recovery of accidentally captured terminal input device. This timeout is printed on the start of stream dumping. 2010-08-24: 1.1