From ab1e0a075e355c7151f041d8dc3df106b7cd55ae Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 20 Oct 2026 15:59:00 -0700 Subject: [PATCH 1/5] Add GitHub Actions workflow for codespell on master --- .github/workflows/codespell.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..9458b0c --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,23 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Codespell + uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2 From 68a653c3615623d82357c98fe420db563f264dc9 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 20 Oct 2026 15:59:00 -0700 Subject: [PATCH 2/5] Add rudimentary codespell config --- .codespellrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..62596c5 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git,.gitignore,.gitattributes,go.sum,vendor,*.lock,.codespellrc +check-hidden = true +# ignore-regex = +# ignore-words-list = From 2887a5cbc95121273f4ed85922f9d9bc98d90cc0 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 20 Oct 2026 19:00:51 -0400 Subject: [PATCH 3/5] Tune codespell config: skip license texts, whitelist intentional spellings - skip verbatim SPDX license texts (assets/database/licenses/, database_keywords.json and processor/constants.go which embeds them), plus .git-meta and .*cache - ignore "te" (loop variable) and "dependenices" (verbatim typo in a real-world license fixture in pkg/license_test.go) - inline pragma for intentionally misspelled license filenames in lc.go Co-Authored-By: Claude Code 2.1.305 / Claude Opus 5.5 --- .codespellrc | 13 ++++++++++--- lc.go | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.codespellrc b/.codespellrc index 62596c5..aa5188e 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,6 +1,13 @@ [codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file -skip = .git,.gitignore,.gitattributes,go.sum,vendor,*.lock,.codespellrc +# assets/database/licenses and database_keywords.json hold verbatim SPDX +# license texts (incl. non-English ones); processor/constants.go embeds them +skip = .git,.git-meta,.gitignore,.gitattributes,.*cache,go.sum,vendor,*.lock,.codespellrc,./assets/database/licenses,./database_keywords.json,./processor/constants.go check-hidden = true -# ignore-regex = -# ignore-words-list = +# ignore-regex = +ignore-words-list = + # loop variable for a license text in processor/detector_license.go + te, + # verbatim typo in honk's license text, used as a test fixture (raw string) + # in pkg/license_test.go + dependenices diff --git a/lc.go b/lc.go index 13f0bb9..14298c4 100644 --- a/lc.go +++ b/lc.go @@ -43,7 +43,7 @@ package main // cli.StringFlag{ // Name: "licensefiles, lf", // Usage: "Possible license files to inspect for over-arching license as comma separated list `copying,readme`", -// Value: "license,licence,lisence,lisense,copying,readme,legal,copyright,copyleft,gpl,bsd,mit,apache,unlicense,unlicence", +// Value: "license,licence,lisence,lisense,copying,readme,legal,copyright,copyleft,gpl,bsd,mit,apache,unlicense,unlicence", // codespell:ignore lisence,lisense // Destination: &parsers.PossibleLicenceFiles, // }, // cli.StringFlag{ From e8bf6475d10fe2b17513301146e9b5448b24db7f Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 20 Oct 2026 19:00:59 -0400 Subject: [PATCH 4/5] Fix typos not detected by codespell - altunate -> alternate (CONTRIBUTING.md) - SDPX -> SPDX (CONTRIBUTING.md, what-we-look-at.md) - "has has" -> "has" (NOTES.md) Co-Authored-By: Claude Code 2.1.305 / Claude Opus 5.5 --- CONTRIBUTING.md | 2 +- NOTES.md | 2 +- what-we-look-at.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c8bdae2..771a104 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ * Before submitting, please specify that you explicitly licence your contribution under MIT License AND UNLICENSE. -* If you include compatible code from a third party souce with an altunate license please add a SDPX tag to indicate this, see https://github.com/boyter/lc/blob/master/parsers/helpers.go bytesToHuman function as a reference exmaple. +* If you include compatible code from a third party souce with an alternate license please add a SPDX tag to indicate this, see https://github.com/boyter/lc/blob/master/parsers/helpers.go bytesToHuman function as a reference exmaple. #### **Always remember** diff --git a/NOTES.md b/NOTES.md index 6c52930..c89447d 100644 --- a/NOTES.md +++ b/NOTES.md @@ -27,7 +27,7 @@ could have multiple licenses in them. Example github.com/valkey/valkey/COPYING ".html", ".txt", -Where the file matchs the above patterns, where it has has no extention or +Where the file matchs the above patterns, where it has no extention or one of the others we should inspect it to see if it has a license. Its possible a licence exists here, but we cannot be sure. Note that its possible there are multiple licences in the file which needs to be dealt with. diff --git a/what-we-look-at.md b/what-we-look-at.md index 731e27d..22246fc 100644 --- a/what-we-look-at.md +++ b/what-we-look-at.md @@ -35,7 +35,7 @@ For individual files the file is scanned in the same way but in addition is scan Which will take precedence over any fuzzy matching. The indicators must match known SPDX licenses or they will be disregarded. -When finished the license determined is based on the SDPX identifiers if present, fuzzy matching if over the confidence value and then the root license(s). If multiples match they are treated as an `AND`. +When finished the license determined is based on the SPDX identifiers if present, fuzzy matching if over the confidence value and then the root license(s). If multiples match they are treated as an `AND`. Take for example, From 233d3323eea4f0ad80f7190b7e2ad80cb922473e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 20 Oct 2026 19:01:08 -0400 Subject: [PATCH 5/5] [DATALAD RUNCMD] chore: fix non-ambiguous typos with codespell Fixed typos: - seperated -> separated (README.md, lc.go) - souce -> source, exmaple -> example (CONTRIBUTING.md) - matchs -> matches, extention -> extension (NOTES.md) - ouput -> output, addtional -> additional (README.md) - resonable -> reasonable (assets/database/README.md) Co-Authored-By: Claude Code 2.1.305 / Claude Opus 5.5 === Do not change lines below === { "chain": [], "cmd": "uvx codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- CONTRIBUTING.md | 2 +- NOTES.md | 2 +- README.md | 10 +++++----- assets/database/README.md | 2 +- lc.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 771a104..d8304a0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ * Before submitting, please specify that you explicitly licence your contribution under MIT License AND UNLICENSE. -* If you include compatible code from a third party souce with an alternate license please add a SPDX tag to indicate this, see https://github.com/boyter/lc/blob/master/parsers/helpers.go bytesToHuman function as a reference exmaple. +* If you include compatible code from a third party source with an alternate license please add a SPDX tag to indicate this, see https://github.com/boyter/lc/blob/master/parsers/helpers.go bytesToHuman function as a reference example. #### **Always remember** diff --git a/NOTES.md b/NOTES.md index c89447d..2b83387 100644 --- a/NOTES.md +++ b/NOTES.md @@ -27,7 +27,7 @@ could have multiple licenses in them. Example github.com/valkey/valkey/COPYING ".html", ".txt", -Where the file matchs the above patterns, where it has no extention or +Where the file matches the above patterns, where it has no extension or one of the others we should inspect it to see if it has a license. Its possible a licence exists here, but we cannot be sure. Note that its possible there are multiple licences in the file which needs to be dealt with. diff --git a/README.md b/README.md index b65e11b..961320e 100644 --- a/README.md +++ b/README.md @@ -79,9 +79,9 @@ GLOBAL OPTIONS: --confidence 0.95, -c 0.95 Set required confidence level for licence matching between 0 and 1 E.G. 0.95 (default: "0.85") --deepguess true, --dg true Should attempt to deep guess the licence false or true true (default: "true") --filesize 50000, --fs 50000 How large a file in bytes should be processed 50000 (default: "50000") - --licensefiles copying,readme, --lf copying,readme Possible license files to inspect for over-arching license as comma seperated list copying,readme (default: "license,licence,copying,readme") - --pathblacklist .git,.hg,.svn, --pbl .git,.hg,.svn Which directories should be ignored as comma seperated list .git,.hg,.svn (default: ".git,.hg,.svn") - --extblacklist gif,jpg,png, --xbl gif,jpg,png Which file extensions should be ignored for deep analysis as comma seperated list E.G. gif,jpg,png (default: "woff,eot,cur,dm,xpm,emz,db,scc,idx, + --licensefiles copying,readme, --lf copying,readme Possible license files to inspect for over-arching license as comma separated list copying,readme (default: "license,licence,copying,readme") + --pathblacklist .git,.hg,.svn, --pbl .git,.hg,.svn Which directories should be ignored as comma separated list .git,.hg,.svn (default: ".git,.hg,.svn") + --extblacklist gif,jpg,png, --xbl gif,jpg,png Which file extensions should be ignored for deep analysis as comma separated list E.G. gif,jpg,png (default: "woff,eot,cur,dm,xpm,emz,db,scc,idx, mpp,dot,pspimage,stl,dml,wmf,rvm,resources,tlb,docx,doc,xls,xlsx,ppt,pptx,msg,vsd,chm,fm,book,dgn,blines,cab,lib,obj,jar,pdb,dll,bin,out,elf,so,msi,nupkg,pyc,ttf,woff2,jpg,jpeg,png,gif,bmp,psd,tif,tif f,yuv,ico,xls,xlsx,pdb,pdf,apk,com,exe,bz2,7z,tgz,rar,gz,zip,zipx,tar,rpm,bin,dmg,iso,vcd,mp3,flac,wma,wav,mid,m4a,3gp,flv,mov,mp4,mpg,rm,wmv,avi,m4v,sqlite,class,rlib,ncb,suo,opt,o,os,pch,pbm,pnm,ppm ,pyd,pyo,raw,uyv,uyvy,xlsm,swf") @@ -179,7 +179,7 @@ Directory File License Confide ### SPDX -The ouput of SPDX is a valid SPDX 2.1 document. Validation was checked against the tools supplied by the SPDX group. +The output of SPDX is a valid SPDX 2.1 document. Validation was checked against the tools supplied by the SPDX group. Running master against itself to produce a SPDX and the validating using the tools from https://github.com/spdx/tools ``` @@ -236,7 +236,7 @@ Rank Open Source License % * Add error handling for all the file operations and just in general. Most are currently ignored * Add logic to guess the file type for SPDX value FileType -* Add addtional unit and integration tests +* Add additional unit and integration tests * Investigate using "github.com/gosuri/uitable" for formatting https://github.com/gosuri/uitable * https://web.archive.org/web/20180822173147/https://blog.sourced.tech/post/gld/ * https://github.com/boyter/boyter.org/blob/01601a2cafc2b2788b29b6943ad45ad40316d9a8/content/posts/improving-lc-performance.md diff --git a/assets/database/README.md b/assets/database/README.md index 973c1fe..41b88be 100644 --- a/assets/database/README.md +++ b/assets/database/README.md @@ -59,4 +59,4 @@ indicates that it could be one of the above. Alturnate idea, pick one of them to be the defacto version for that. So in the case of GPL-3.0 go with GPL-3.0 because -that seems like a resonable guess. Should resolve it for most of them. +that seems like a reasonable guess. Should resolve it for most of them. diff --git a/lc.go b/lc.go index 14298c4..555a761 100644 --- a/lc.go +++ b/lc.go @@ -48,7 +48,7 @@ package main // }, // cli.StringFlag{ // Name: "pathblacklist, pbl", -// Usage: "Which directories should be ignored as comma seperated list `.git,.hg,.svn`", +// Usage: "Which directories should be ignored as comma separated list `.git,.hg,.svn`", // Value: ".git,.hg,.svn", // Destination: &parsers.PathBlacklist, // },