Skip to content

Commit c47ff6b

Browse files
authored
Merge pull request #339 from Earlopain/sync-spellcheck
Sync spellcheck
2 parents aafebda + 6b3d7a4 commit c47ff6b

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

.codespellrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[codespell]
2+
# Intentionally left empty, these are passed as command-line switches
3+
check-hidden =
4+
check-filenames =
5+
# ignore-words-list =

.github/workflows/spell_checking.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,3 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v5
1515
- uses: codespell-project/actions-codespell@v2
16-
with:
17-
ignore_words_file: codespell.txt
18-
misspell:
19-
name: Check spelling of all files in commit with misspell
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v5
23-
- name: Install
24-
run: wget -O - -q https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh | sh -s -- -b .
25-
- name: Misspell
26-
run: git ls-files --empty-directory | xargs ./misspell -error

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ end
4141
desc 'Run RuboCop over itself'
4242
RuboCop::RakeTask.new(:internal_investigation)
4343

44-
task default: %i[documentation_syntax_check test prism_test internal_investigation]
44+
task default: %i[codespell documentation_syntax_check test prism_test internal_investigation]
4545

4646
desc 'Generate a new cop template'
4747
task :new_cop, [:cop] do |_task, args|

codespell.txt

Whitespace-only changes.

tasks/codespell.rake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
desc 'Run codespell if available'
4+
task :codespell do |_task|
5+
next if Gem.win_platform?
6+
next if ENV['CI'] # CI has its own workflow for this
7+
8+
sh 'which codespell', verbose: false, out: File::NULL, err: File::NULL do |ok, _res|
9+
if ok
10+
sh 'git ls-files --empty-directory | xargs codespell'
11+
else
12+
puts 'Skipping `codespell` since it is not installed'
13+
end
14+
end
15+
end

0 commit comments

Comments
 (0)