Skip to content

Commit

Permalink
docs: Update cspell github action and configuration (#2325)
Browse files Browse the repository at this point in the history
I am on a crusade to improve our spellchecking. I have a big PR that I am now going to break down into very small chunks to for review.

zwaldowski's cspell-action has been deprecated in favor of streetsidesoftware/cspell-action.

This PR:

updates to use the new recommended cspell action
update to use checkout v3, because why not
fixes a few violations the new action caught
Note: I think we should make a distinction between things that should be in a dictionary (e.g. AABB, a standard industry acronym that we expect people to know what it is) and specific edge-cases/ignore rules for specific parts of specific files (e.g. something like fccc which is meaningless outside of the very specific context in which it is used). For the latter, I believe we should use case-by case exceptions.
  • Loading branch information
luanpotter committed Feb 6, 2023
1 parent cc1957e commit e0a4c07
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/.cspell/gamedev_dictionary.txt
@@ -1,3 +1,4 @@
AABB # axis-aligned bounding box
AHSL
AHSV
ARGB
Expand Down
7 changes: 6 additions & 1 deletion .github/cspell.json
Expand Up @@ -2,7 +2,12 @@
"version": "0.2",
"language": "en",
"flagWords": ["teh", "hte"],
"ignorePaths": ["**/media/**", "**/assets/**", "**/test/**"],
"ignorePaths": [
"**/media/**",
"**/assets/**",
"**/test/**",
"**/CHANGELOG.md"
],
"ignoreRegExpList": [
"@[\\w\\-]+",
"\\$\\w+",
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/spell_checker.yml
Expand Up @@ -15,9 +15,9 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: zwaldowski/cspell-action@v1
- uses: actions/checkout@v3
- uses: streetsidesoftware/cspell-action@v2
with:
paths: "**/*.{md,dart}"
config: .github/cspell.json
exclude: ".gitignore,CHANGELOG.md"
files: "**/*.{md,dart}"
incremental_files_only: false
config: .github/cspell.json
3 changes: 3 additions & 0 deletions packages/flame/lib/src/extensions/color.dart
Expand Up @@ -37,6 +37,9 @@ extension ColorExtension on Color {
);
}

// used as an example hex color code on the documentation below
// cSpell:ignore fccc

/// Parses an RGB color from a valid hex string (e.g. #1C1C1C).
///
/// The `#` is optional.
Expand Down
3 changes: 3 additions & 0 deletions packages/flame/lib/src/extensions/paint.dart
Expand Up @@ -42,6 +42,9 @@ extension PaintExtension on Paint {
return Paint()..color = color;
}

// used as an example hex color code on the documentation below
// cSpell:ignore fccc

/// Parses an ARGB color from a valid hex string (e.g. #1C1C1C).
///
/// The `#` is optional.
Expand Down

0 comments on commit e0a4c07

Please sign in to comment.