From 5666385b311189b52aa2599461ded19bc6ed456f Mon Sep 17 00:00:00 2001 From: Alejandro Santiago Date: Mon, 19 Feb 2024 15:08:14 +0000 Subject: [PATCH] ci: add spell_checker (#9) --- .github/.cspell/dart_dictionary.txt | 9 +++++++ .github/.cspell/dev_dictionary.txt | 12 +++++++++ .github/.cspell/people_usernames.txt | 2 ++ .github/.cspell/words_dictionary.txt | 27 +++++++++++++++++++ .github/cspell.json | 40 +++++++++++++++++++++++----- .github/workflows/spell_checker.yaml | 18 +++++++++++++ very_good_dart_cli/CHANGELOG.md | 4 +-- 7 files changed, 103 insertions(+), 9 deletions(-) create mode 100644 .github/.cspell/dart_dictionary.txt create mode 100644 .github/.cspell/dev_dictionary.txt create mode 100644 .github/.cspell/people_usernames.txt create mode 100644 .github/.cspell/words_dictionary.txt create mode 100644 .github/workflows/spell_checker.yaml diff --git a/.github/.cspell/dart_dictionary.txt b/.github/.cspell/dart_dictionary.txt new file mode 100644 index 0000000..2050b1e --- /dev/null +++ b/.github/.cspell/dart_dictionary.txt @@ -0,0 +1,9 @@ +# Keywords or terms specific to the Dart or Flutter ecosystem: +audioplayers # A Flutter plugin to play multiple simultaneously audio files. +cupertino # Flutter module containing iOS-style widgets. +endtemplate # Dart doc macro used to end a reusable piece of documentation. +LTWH # From Flutter, abbreviation left, top, width and height. +mockingjay # A Flutter package for mocking navigation. +mocktail # A Dart mock package. +pubspec # File name where all the package metadata goes in. +unawaited # A Dart function to explicitly ignore a future. \ No newline at end of file diff --git a/.github/.cspell/dev_dictionary.txt b/.github/.cspell/dev_dictionary.txt new file mode 100644 index 0000000..9a8403a --- /dev/null +++ b/.github/.cspell/dev_dictionary.txt @@ -0,0 +1,12 @@ +# Other phrases that are not words but are getting flagged. Typically contained in localization files or URLs: +aplicación # "Application" in Spanish. +botón # "Button" in Spanish. +buen # "Good" in Spanish. +contador # "Counter" in Spanish. +empieza # "Begin" in Spanish. +inicial # "Initial" in Spanish. +inicio # "Start" in Spanish. +juego # "Game" in Spanish. +mostrado # "Shown" in Spanish. +página # "Page" in Spanish. +texto # "Text" in Spanish. \ No newline at end of file diff --git a/.github/.cspell/people_usernames.txt b/.github/.cspell/people_usernames.txt new file mode 100644 index 0000000..6a96e56 --- /dev/null +++ b/.github/.cspell/people_usernames.txt @@ -0,0 +1,2 @@ +# Specific people's names and/or usernames: +luan # Maintainer of the Flutter `audioplayers` plugin. \ No newline at end of file diff --git a/.github/.cspell/words_dictionary.txt b/.github/.cspell/words_dictionary.txt new file mode 100644 index 0000000..b8d5cc9 --- /dev/null +++ b/.github/.cspell/words_dictionary.txt @@ -0,0 +1,27 @@ +# Actual english words (or common abbreviations) missing from CSpell: +CLI # Abbreviation for Command Line Interface. +CLIs # Plural of the abbreviation for Command Line Interface. +CLI's # Belonging to a CLI. +dependabot # Automated dependency updates built into GitHub. +docusaurs # An optimized site generator in React. +genhtml # Tool to generate an HTML view from LCOV coverage data files. +gradlew # Wrapper tool that uses Gradle. +lcov # Graphical tool for displaying coverage reports. +localizable # Capable of being localized. +negatable # Capable of being negated. +nojekyll # File to bypass Jekyll processing on GitHub. +pngs # Abbreviation for an image format named Portable Network Graphics. +preload # Put information onto a system before it is used. +prettierignore # Ignore file name for Prettier. +prettierrc # Configuration file name for Prettier. +recase # Casing once again. +roadmap # A plan or strategy intended to achieve a particular goal. +routable # Capable of being routed. +theming # Give a particular theme or setting. +unicorn # A mythical animal. +nicorn # "unicorn", but without the "u". +unmutes # To allow to produce sound again. +verygood # Very Good, but without a space. +xcode # Apple's integrated development environment. +xcworkspace # Abbreviation for Xcode workspace. +xcassets # Abbreviation for Xcode assets. \ No newline at end of file diff --git a/.github/cspell.json b/.github/cspell.json index f82ee7e..6898300 100644 --- a/.github/cspell.json +++ b/.github/cspell.json @@ -1,7 +1,16 @@ { "version": "0.2", "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", - "dictionaries": ["vgv_allowed", "vgv_forbidden"], + "enabled": true, + "language": "en", + "dictionaries": [ + "vgv_allowed", + "vgv_forbidden", + "dart_dictionary", + "dev_dictionary", + "people_usernames", + "words_dictionary" + ], "dictionaryDefinitions": [ { "name": "vgv_allowed", @@ -12,14 +21,31 @@ "name": "vgv_forbidden", "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt", "description": "Forbidden VGV Spellings" + }, + { + "name": "dart_dictionary", + "path": "./.cspell/dart_dictionary.txt", + "addWords": true + }, + { + "name": "dev_dictionary", + "path": "./.cspell/dev_dictionary.txt", + "addWords": true + }, + { + "name": "people_usernames", + "path": "./.cspell/people_usernames.txt", + "addWords": true + }, + { + "name": "words_dictionary", + "path": "./.cspell/words_dictionary.txt", + "addWords": true } ], "useGitignore": true, - "words": [ - "Contador", - "localizable", - "mostrado", - "página", - "Texto" + "ignorePaths": [ + "very_good_docs_site/__brick__/*/docs/overview.md", + "very_good_docs_site/__brick__/*/src/pages/index.tsx" ] } diff --git a/.github/workflows/spell_checker.yaml b/.github/workflows/spell_checker.yaml new file mode 100644 index 0000000..2f529a9 --- /dev/null +++ b/.github/workflows/spell_checker.yaml @@ -0,0 +1,18 @@ +name: spell_checker + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: zwaldowski/cspell-action@v1 + with: + paths: "**/*.{md,dart}" + config: .github/cspell.json + exclude: ".gitignore **.gen.dart **.g.dart" diff --git a/very_good_dart_cli/CHANGELOG.md b/very_good_dart_cli/CHANGELOG.md index c0121e7..a0d3a54 100644 --- a/very_good_dart_cli/CHANGELOG.md +++ b/very_good_dart_cli/CHANGELOG.md @@ -18,7 +18,7 @@ # 0.3.2 - feat: update workflows, add spellcheck -- fix: remove unused pub updater from test +- fix: remove unused pub updater from test # 0.3.1 @@ -34,7 +34,7 @@ # 0.2.2 -- fix: update silently fails when the sdk doesnt support most recent version +- fix: update silently fails when the sdk doesn't support most recent version # 0.2.1