From a4e21f559aca45546d8c2e53a8373eeaa81f8658 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 23 Sep 2023 16:03:15 +0200 Subject: [PATCH] feat(tool): Setup cspell Signed-off-by: jld3103 --- .cspell/dart_flutter.txt | 9 ++++ .cspell/misc.txt | 11 +++++ .cspell/neon.txt | 20 +++++++++ .cspell/nextcloud.txt | 71 ++++++++++++++++++++++++++++++ .cspell/tools.txt | 60 +++++++++++++++++++++++++ .cspell/webdav.txt | 50 +++++++++++++++++++++ .github/workflows/spellcheck.yaml | 10 +++++ cspell.json | 60 +++++++++++++++++++++++++ tool/update-cspell-dictionaries.sh | 8 ++++ 9 files changed, 299 insertions(+) create mode 100644 .cspell/dart_flutter.txt create mode 100644 .cspell/misc.txt create mode 100644 .cspell/neon.txt create mode 100644 .cspell/nextcloud.txt create mode 100644 .cspell/tools.txt create mode 100644 .cspell/webdav.txt create mode 100644 .github/workflows/spellcheck.yaml create mode 100644 cspell.json create mode 100755 tool/update-cspell-dictionaries.sh diff --git a/.cspell/dart_flutter.txt b/.cspell/dart_flutter.txt new file mode 100644 index 00000000..0639e559 --- /dev/null +++ b/.cspell/dart_flutter.txt @@ -0,0 +1,9 @@ +autofocus +gapless +lerp +pubspec +sublist +todos +unawaited +unfocus +writeln diff --git a/.cspell/misc.txt b/.cspell/misc.txt new file mode 100644 index 00000000..94f59994 --- /dev/null +++ b/.cspell/misc.txt @@ -0,0 +1,11 @@ +browsable +cleartext +deeplinking +flathub +foss +fullscreen +playstore +postmarket +provokateurin +subroutes +uncategorized diff --git a/.cspell/neon.txt b/.cspell/neon.txt new file mode 100644 index 00000000..175b008f --- /dev/null +++ b/.cspell/neon.txt @@ -0,0 +1,20 @@ +crypton +exportables +fcmup +filesize +gotify +heckel +mocktail +nextpush +noprovider +ntfy +oled +oledas +rxdart +seti +siacs +sqflite +underspecified +updateshouldnotify +wakelock +zxing diff --git a/.cspell/nextcloud.txt b/.cspell/nextcloud.txt new file mode 100644 index 00000000..0880b4e9 --- /dev/null +++ b/.cspell/nextcloud.txt @@ -0,0 +1,71 @@ +apirequest +applist +apppassword +approximative +appstore +bigfilechunking +bools +bulkupload +commenters +csapi +datetime +deletedshares +displayname +etag +fediverse +getapppassword +groupid +hovercard +iscustomavatar +itemsperpage +keepalive +keypair +lastmod +licence +logfile +logoheader +mimetypes +mountpoint +navigations +nextcloud +nextcloud's +openlocaleditor +organisation +prio +productname +publicpreview +reshares +resharing +rgdnvw +r'sharebymail +r'updatenotification +r'uppush +shareapi +sharebymail +sharee +shareesapi +shareinfo +statuscode +stime +stylesheet +subadmin +subadmins +subfiles +subline +tasktypes +textprocessing +totalitems +transferownership +trashbin +undelete +unifiedpush +unsharing +unstar +updatenotification +uppush +usercount +usergroup +userid +userroom +versionstring +whatsnew diff --git a/.cspell/tools.txt b/.cspell/tools.txt new file mode 100644 index 00000000..35a57397 --- /dev/null +++ b/.cspell/tools.txt @@ -0,0 +1,60 @@ +aarch +allprojects +appindicator +autoptr +buildscript +buildsystem +buildx +cest +classpath +cloc +commitlint +dapplication +dists +endforeach +endfunction +endlegend +endswith +enduml +euxo +exiftool +extglob +freedesktop +fullpath +gboolean +gchar +genhtml +gradlew +hicolor +icudtl +inkscape +intellij +jetbrains +jvmargs +klass +lcov +libapp +libappindicator +libayatana +libflutter +libindicator +libsqlite +mipmap +ndebug +nproc +plantuml +precache +puml +rpath +startuml +stdlib +strconcat +strdupv +strfreev +subprojects +sysroot +tsvg +werror +workdir +xxxh +xxxhdpi diff --git a/.cspell/webdav.txt b/.cspell/webdav.txt new file mode 100644 index 00000000..8085aee1 --- /dev/null +++ b/.cspell/webdav.txt @@ -0,0 +1,50 @@ +copymove +dasl +davgetcontentlength +davgetcontenttype +davgetetag +davgetlastmodified +davresourcetype +fileid +getcontentlength +getcontenttype +getetag +getlastmodified +largefile +mkcol +multistatus +nccreationtime +ncdatafingerprint +nchaspreview +ncisencrypted +ncmetadataetag +ncmounttype +ncnote +ncrichworkspace +ncuploadtime +nodestcoll +noncoll +noparent +occommentscount +occommentshref +occommentsunread +ocdownloadurl +ocfavorite +ocfileid +ocid +ocmsharepermissions +ocownerdisplayname +ocownerid +ocpermissions +ocsize +ocssharepermissions +owncloud +propertyupdate +propfind +proppatch +propstat +propstats +resourcetype +sharees +systemtag +webdav diff --git a/.github/workflows/spellcheck.yaml b/.github/workflows/spellcheck.yaml new file mode 100644 index 00000000..65e0751b --- /dev/null +++ b/.github/workflows/spellcheck.yaml @@ -0,0 +1,10 @@ +name: 'Check spelling' +on: + pull_request: + +jobs: + spellcheck: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: streetsidesoftware/cspell-action@v3 diff --git a/cspell.json b/cspell.json new file mode 100644 index 00000000..eb3a04ff --- /dev/null +++ b/cspell.json @@ -0,0 +1,60 @@ +{ + "version": "0.2", + "language": "en", + "words": [ + "OpenAPI" + ], + "ignorePaths": [ + "**.iml", + "**.log", + "**.svg", + "**/assets/**", + "**/build/**", + "**/coverage/**", + "**/ephemeral/**", + "**/l10n/!(en.arb)", + "external", + "packages/app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java", + "packages/app/android/gradlew*", + "packages/file_icons/lib/src/data.dart", + "packages/neon_lints/lib", + "packages/nextcloud/test/files" + ], + "dictionaries": [ + "bash", + "dart_flutter", + "en_US", + "misc", + "neon", + "nextcloud", + "softwareTerms", + "tools", + "webdav" + ], + "dictionaryDefinitions": [ + { + "name": "dart_flutter", + "path": ".cspell/dart_flutter.txt" + }, + { + "name": "misc", + "path": ".cspell/misc.txt" + }, + { + "name": "neon", + "path": ".cspell/neon.txt" + }, + { + "name": "nextcloud", + "path": ".cspell/nextcloud.txt" + }, + { + "name": "tools", + "path": ".cspell/tools.txt" + }, + { + "name": "webdav", + "path": ".cspell/webdav.txt" + } + ] +} diff --git a/tool/update-cspell-dictionaries.sh b/tool/update-cspell-dictionaries.sh new file mode 100755 index 00000000..18dd4e78 --- /dev/null +++ b/tool/update-cspell-dictionaries.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -euxo pipefail +cd "$(dirname "$0")/.." + +for file in .cspell/*; do + rm "$file" + cspell lint --quiet --unique --words-only . | tr '[:upper:]' '[:lower:]' | sort -f | uniq > "$file" || true +done