Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
# 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 =
# 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
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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**
Expand Down
2 changes: 1 addition & 1 deletion NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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

```
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion assets/database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions lc.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ 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{
// 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,
// },
Expand Down
2 changes: 1 addition & 1 deletion what-we-look-at.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
Loading