-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Checks - spelling | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
push: | ||
|
||
jobs: | ||
spelling_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install python3 | ||
run: | | ||
apt update | ||
apt install -y --no-install-recommends python3-pip | ||
- name: Install codespell | ||
run: pip install codespell | ||
|
||
- name: Print codespell version | ||
run: codespell --version | ||
|
||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Run codespell | ||
run: | | ||
./scripts/spelling.sh | ||
- name: Run git diff to see if anything changed | ||
run: /usr/bin/git diff --name-only --exit-code | ||
|
||
- name: Run git diff if we failed | ||
if: failure() | ||
run: /usr/bin/git diff > spelling.patch | ||
|
||
- name: Archive diff as a patch if we failed | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: spelling.patch | ||
path: | | ||
${{ github.workspace }}/spelling.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
# --------------------------------------------------------------------------------- | ||
# SUNDIALS Copyright Start | ||
# Copyright (c) 2002-2024, Lawrence Livermore National Security | ||
# and Southern Methodist University. | ||
# All rights reserved. | ||
# | ||
# See the top-level LICENSE and NOTICE files for details. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# SUNDIALS Copyright End | ||
# --------------------------------------------------------------------------------- | ||
# This script will use codespell to check for common misspellings | ||
# --------------------------------------------------------------------------------- | ||
|
||
codespell \ | ||
--skip="*.git,*.bib,*.eps,*.pdf,*/fmod_int*,*/_themes" \ | ||
-L "inout,ans" \ | ||
--write-changes |