Skip to content

Commit

Permalink
ci: switch from codespell to cspell
Browse files Browse the repository at this point in the history
  • Loading branch information
andyholmes committed Apr 11, 2024
1 parent 9cc47fc commit f967713
Show file tree
Hide file tree
Showing 5 changed files with 408 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ permissions:
contents: read

jobs:
codespell:
name: Codespell
cspell:
name: CSpell
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Spell Check
uses: codespell-project/actions-codespell@master
with:
ignore_words_list: doubleclick,inout,onlyonce,sav
skip: ./LICENSES,./po,./subprojects,./tests/fixtures/data
uses: streetsidesoftware/cspell-action@v6

commitlint:
name: Commitlint
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*~
_build*
.cspellcache
.flatpak-builder

# meson wraps
Expand Down
92 changes: 92 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"version": "0.2",
"cache": {
"cacheLocation": "./.cspellcache",
"cacheStrategy": "content",
"useCache": true
},
"useGitignore": true,
"language": "en_US",
"import": [
"./tests/extra/cspell.gnome.json"
],
"dictionaries": ["en-US", "valent"],
"dictionaryDefinitions": [
{
"name": "valent",
"path": "./tests/extra/cspell-valent.txt"
}
],
"words": [],
"ignorePaths": [
".gitignore",
".github/workflows/**",
"build-aux/**",
"doc/sdk/**",
"LICENSES/**",
"po/**",
"subprojects/**",
"tests/extra/**",
"tests/fixtures/data/**",
"cspell.json",
"*.gresource.xml",
"*.oga",
"*.py",
"*.svg",
"*.toml",
"**/meson.build",
"meson_options.txt"
],
"ignoreRegExpList": [
"cli-option",
"noun-abbreviation",
"noun-library",
"noun-proper"
],
"patterns": [
{
"name": "cli-option",
"pattern": "/--(\\w+)/gi"
},
{
"name": "presentation-mimetype",
"pattern": "/application/vnd\\..*/g"
},
{
"name": "markdown-block-code",
"pattern": "/```[\\s\\S]*?```(?=\\n|$)/gi"
},
{
"name": "markdown-inline-code",
"pattern": "/`[^`]*`/gi"
},
{
"name": "noun-library",
"pattern": "/\\b(lib[a-z]+)\\b/g"
},
{
"name": "noun-abbreviation",
"pattern": "/\\b([A-Z]+)\\b/g"
},
{
"name": "noun-proper",
"pattern": "/(?:\\s*\\b([A-Z][a-z]+)\\b)+/g"
}
],
"languageSettings": [
{
"languageId": "c",
"dictionaries": ["cpp", "gnome"],
"ignoreRegExpList": [
"presentation-mimetype"
]
},
{
"languageId": "markdown",
"ignoreRegExpList": [
"markdown-block-code",
"markdown-inline-code"
]
}
]
}
131 changes: 131 additions & 0 deletions tests/extra/cspell-valent.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: No rights reserved

#
# Valent
#
valent
andyholmes
kdeconnect

addressbook
albumart
basepath
esource
gschema
gschemas
keysym
keysyms
libvalent
phonelink
privkey
pubkey
repliable
screencast
touchpad
touchpads
unexport
unexported
unexports
unmuted
unpair
unpairing

# variant formats
ssav
iiibiiay

# src/plugins/bluez
muxed
muxer
muxes
muxers
muxing
demux
demuxing

# src/plugins/connectivity_report
CDMA
hspa

# src/plugins/contacts
uids
vcard
vcards

# src/plugins/findmyphone
findmyphone
playbin
playbus

# src/plugins/mousepad
singleclick
doubleclick
middleclick
rightclick
singlehold
singlerelease
keyboardstate
longpress

# src/plugins/mpris
mpris
albumart
fullscreen
seeked
xesam

# src/plugins/runcommand
runcommand

# src/plugins/systemvolume
systemvolume
sinklist

# tests/fixtures
argcp
argvp
cmpfloat
cmpint
cmpstr
cmpuint
modemless
packetless
spoofer

# TODO
naddr
atarget
saddress
aprotocol
sprotocol
notificationv
targetv
vicon
vobject

# ...
cmplen
getcpu

# Names
asan
msan
tsan
ubsan

adwaita
alsa
avahi
bluez
dbusmock
lcov
libportal
logind
modemmanager
flatpak
freedesktop
pipewire
pulseaudio
sysprof
upower
Loading

0 comments on commit f967713

Please sign in to comment.