Skip to content

Commit 7f0eea9

Browse files
authored
Merge pull request #1523 from Earlopain/sync-spellcheck
Sync spellcheck
2 parents 9934f34 + 79f90e0 commit 7f0eea9

File tree

5 files changed

+22
-16
lines changed

5 files changed

+22
-16
lines changed

.codespellrc

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

.github/workflows/spell_checking.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,3 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v5
1818
- uses: codespell-project/actions-codespell@v2
19-
with:
20-
check_filenames: true
21-
check_hidden: true
22-
ignore_words_file: codespell.txt
23-
misspell:
24-
name: Check spelling of all files in commit with misspell
25-
runs-on: ubuntu-latest
26-
steps:
27-
- uses: actions/checkout@v5
28-
- name: Install
29-
run: wget -O - -q https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh | sh -s -- -b .
30-
- name: Misspell
31-
run: git ls-files --empty-directory | xargs ./misspell -i 'enviromnent' -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 spec prism_spec internal_investigation]
44+
task default: %i[codespell documentation_syntax_check spec prism_spec internal_investigation]
4545

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

codespell.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

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)