Skip to content

Commit

Permalink
fix: spell checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Bricklou committed Dec 31, 2023
1 parent 829c00b commit 3cccdcb
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 52 deletions.
7 changes: 4 additions & 3 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Archipel
Bricklou
D3lta
ingame
screenshot
ecs
github
modding
bytecode
5 changes: 5 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
D3lta

Check warning

Code scanning / check-spelling

Non-alpha in dictionary Warning

Ignoring entry because it contains non-alpha characters. (non-alpha-in-dictionary)
Archipel
Bricklou
Modrinth
Microsoft
97 changes: 49 additions & 48 deletions .github/workflows/check-spells.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ name: Check Spelling
on:
push:
branches:
- "**"
- "**"
tags-ignore:
- "**"
- "**"
pull_request_target:
branches:
- "**"
- "**"
tags-ignore:
- "**"
- "**"
types:
- 'opened'
- 'reopened'
- 'synchronize'
- "opened"
- "reopened"
- "synchronize"
issue_comment:
types:
- 'created'
- "created"

jobs:
spelling:
Expand All @@ -69,24 +69,25 @@ jobs:
# note: If you use only_check_changed_files, you do not want cancel-in-progress
cancel-in-progress: true
steps:
- name: check-spelling
id: spelling
uses: check-spelling/check-spelling@main
with:
suppress_push_for_open_pull_request: 1
checkout: true
check_file_names: 1
spell_check_this: check-spelling/spell-check-this@prerelease
post_comment: 0
use_magic_file: 1
experimental_apply_changes_via_bot: 1
use_sarif: 1
extra_dictionary_limit: 10
unknown_word_limit: 2
extra_dictionaries:
cspell:software-terms/src/software-terms.txt
cspell:java/src/java-terms.txt

- name: check-spelling
id: spelling
uses: check-spelling/check-spelling@main
with:
suppress_push_for_open_pull_request: 1
checkout: true
check_file_names: 1
spell_check_this: check-spelling/spell-check-this@prerelease
post_comment: 0
use_magic_file: 1
experimental_apply_changes_via_bot: 1
use_sarif: 1
extra_dictionary_limit: 10
unknown_word_limit: 2
extra_dictionaries: |
cspell:software-terms/src/software-terms.txt
cspell:java/src/java-terms.txt
cspell:markdown/src/markdown.txt
cspell:gaming-terms/dict/gaming-terms.txt
comment-push:
name: Report (Push)
Expand All @@ -97,12 +98,12 @@ jobs:
contents: write
if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push'
steps:
- name: comment
uses: check-spelling/check-spelling@main
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
task: ${{ needs.spelling.outputs.followup }}
- name: comment
uses: check-spelling/check-spelling@main
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
task: ${{ needs.spelling.outputs.followup }}

comment-pr:
name: Report (PR)
Expand All @@ -113,13 +114,13 @@ jobs:
pull-requests: write
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
steps:
- name: comment
uses: check-spelling/check-spelling@main
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
task: ${{ needs.spelling.outputs.followup }}
experimental_apply_changes_via_bot: 1
- name: comment
uses: check-spelling/check-spelling@main
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
task: ${{ needs.spelling.outputs.followup }}
experimental_apply_changes_via_bot: 1

update:
name: Update PR
Expand All @@ -129,17 +130,17 @@ jobs:
actions: read
runs-on: ubuntu-latest
if: ${{
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '@check-spelling-bot apply')
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '@check-spelling-bot apply')
}}
concurrency:
group: spelling-update-${{ github.event.issue.number }}
cancel-in-progress: false
steps:
- name: apply spelling updates
uses: check-spelling/check-spelling@main
with:
experimental_apply_changes_via_bot: 1
checkout: true
ssh_key: "${{ secrets.CHECK_SPELLING }}"
- name: apply spelling updates
uses: check-spelling/check-spelling@main
with:
experimental_apply_changes_via_bot: 1
checkout: true
ssh_key: "${{ secrets.CHECK_SPELLING }}"
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Like java, C# run a VM: a single binary can be run everywhere as long as .NET is
| Cross-plugins symbols imports | 5/5 | Allow symbol resolution at runtime, which means symbols cross-importation out of the box. This is our best solution we have seen so far |

C# have "unmanaged struct" (struct with a fixed size, and no reference), which is very good for ECS and cache coherency.
Unfortunatly, C# suffers from the same issue as Java: native function pointer are hard to get, but existent. A function can be declared as `[UnmanagedCallersOnly]` and can be called from a function pointer. This is not very ergonomic, and require a lot of boilerplate code.
Unfortunately, C# suffers from the same issue as Java: native function pointer are hard to get, but existent. A function can be declared as `[UnmanagedCallersOnly]` and can be called from a function pointer. This is not very ergonomic, and require a lot of boilerplate code.

I didn't find any way to use references from `hostfxr`, it might be tricky to iterate over ECS without any copy.

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

hostfxr is not a recognized word. (unrecognized-spelling)
Threading doesn't work out of the box but should be doable with some work!
Expand Down

0 comments on commit 3cccdcb

Please sign in to comment.