Skip to content

Commit

Permalink
Merge pull request #25 from mgandharva/spell-check-fix
Browse files Browse the repository at this point in the history
Spell-check-fix
  • Loading branch information
mgandharva authored Feb 4, 2025
2 parents f9628b7 + ceae172 commit b47f68d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Spell-check-autofix/codespell-autofix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ echo "$output" | while IFS= read -r line; do
echo "Skipping file not in target directory: $file"
fi
fi
done
done
2 changes: 1 addition & 1 deletion .github/workflows/Spell-check-autofix/codespell.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VAs
IAM
MKE
master
master
2 changes: 1 addition & 1 deletion .github/workflows/Spell-check-autofix/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
codespell
codespell
57 changes: 28 additions & 29 deletions .github/workflows/spellchecking.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
name: Spellchecking Final
# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

name: Spell Check

on:
workflow_dispatch:
push:
branches:
- test-spell2
pull_request:
branches:
- test-spell2
pull_request: # Trigger this workflow on pull request events

jobs:
codespell:
name: Check spelling with codespell
spell_check: # Job name for clarity
name: Spell Check with Codespell
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8] # Define the Python version here

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout Repository
uses: actions/checkout@v2 # Check out the repository code

- name: Set up Python
- name: Set Up Python Environment
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }} # Set up the specified Python version

- name: Install dependencies
- name: Install Codespell
run: |
python -m pip install --upgrade pip
pip install codespell
- name: Check spelling with codespell
run: find . -type f -name "*.md" -exec codespell --ignore-words=.github/workflows/codespell.txt {} +
python -m pip install --upgrade pip # Upgrade pip
pip install codespell # Install codespell
misspell:
name: Check spelling with misspell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install
run: wget -O - -q https://git.io/misspell | sh -s -- -b .
- name: Misspell
run: ./misspell -error $(find . -type f -name "*.md")
- name: Run Codespell on Markdown Files
run: |
find . -type f -name "*.md" -exec codespell \
--ignore-words=.github/spell-check-autofix/codespell.txt \
--builtin clear,rare,informal {} +
# 'find' command searches for all .md files and runs 'codespell' on them.
# The '--ignore-words' option specifies custom dictionary file.
# The '--builtin' option uses 'codespell' with built-in dictionaries: clear, rare, informal.

0 comments on commit b47f68d

Please sign in to comment.