-
Notifications
You must be signed in to change notification settings - Fork 28
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
143 changed files
with
75,508 additions
and
19,481 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,38 @@ | ||
# | ||
# Rationale for disabling warnings: | ||
# | ||
# - selected modernize-* warnings: | ||
# Some of these produce a lot of noise for limited utility. | ||
# | ||
# - performance-inefficient-string-concatenation: | ||
# We don't care about "a"+to_string(5)+... | ||
# | ||
# - performance-no-automatic-move: | ||
# All modern compilers perform the return value optimization and we prefer | ||
# to keep things const. | ||
# | ||
|
||
Checks: > | ||
-*, | ||
cppcoreguidelines-pro-type-static-cast-downcast, | ||
concurrency-*, | ||
modernize-*, | ||
-modernize-avoid-c-arrays, | ||
-modernize-concat-nested-namespaces, | ||
-modernize-pass-by-value, | ||
-modernize-raw-string-literal, | ||
-modernize-return-braced-init-list, | ||
-modernize-use-auto, | ||
-modernize-use-default-member-init, | ||
-modernize-use-nodiscard, | ||
-modernize-use-override, | ||
-modernize-use-trailing-return-type, | ||
-modernize-use-transparent-functors, | ||
mpi-*, | ||
performance-*, | ||
-performance-inefficient-string-concatenation, | ||
-performance-no-automatic-move, | ||
-performance-avoid-endl, | ||
readability-qualified-auto | ||
#WarningsAsErrors: '*' |
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
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,55 @@ | ||
name: Spell Check with Typos | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'GWB-*' | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.actor }}-${{ github.ref }}-typos | ||
cancel-in-progress: true | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
typos-check: | ||
name: Check for new typos | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout the Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Check spelling with typos | ||
#uses: crate-ci/typos@master | ||
env: | ||
GH_TOKEN: "${{ github.token }}" | ||
run: | | ||
mkdir -p "${{ runner.temp }}/typos" | ||
RELEASE_ASSET_URL="$( | ||
gh api /repos/crate-ci/typos/releases/latest \ | ||
--jq '."assets"[] | select(."name" | test("^typos-.+-x86_64-unknown-linux-musl\\.tar\\.gz$")) | ."browser_download_url"' | ||
)" | ||
wget --secure-protocol=TLSv1_3 --max-redirect=1 --retry-on-host-error --retry-connrefused --tries=3 \ | ||
--quiet --output-document=- "${RELEASE_ASSET_URL}" \ | ||
| tar -xz -C "${{ runner.temp }}/typos" ./typos | ||
"${{ runner.temp }}/typos/typos" --version | ||
"${{ runner.temp }}/typos/typos" --config .typos.toml --format json >> ${{ runner.temp }}/typos.jsonl || true | ||
python -c ' | ||
import sys, json | ||
old = set() | ||
clean = True | ||
with open(sys.argv[1]) as file: | ||
for line in file: | ||
new = json.loads(line) | ||
if new["type"] == "typo": | ||
clean = False | ||
print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( | ||
new["path"], new["line_num"], new["byte_offset"], | ||
new["typo"], " or ".join(new["corrections"]))) | ||
sys.exit(1 if not clean else 0)' "${{ runner.temp }}/typos.jsonl" |
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 @@ | ||
[default] | ||
# Don't check text that matches the following regexes' | ||
extend-ignore-re = [ | ||
'\\cite\{.*\}', # citations contain arbitrary keys | ||
] | ||
|
||
locale = "en" | ||
|
||
[default.extend-words] | ||
# Don't correct abbreviations of the Boussinesq approximation | ||
BA = "BA" | ||
ba = "ba" | ||
|
||
# Don't correct some other abbreviations | ||
FOT = "FOT" | ||
GWB = "GWB" | ||
NWO = "NWO" | ||
SEH = "SEH" | ||
mak = "mak" # CMakeLists readability-mak* | ||
|
||
# Don't check the following files | ||
[files] | ||
extend-exclude = [ | ||
"/include/glm", | ||
"/include/ApprovalTests/*", | ||
"/include/vtu11/*", | ||
"/include/rapidjson/*", | ||
"/include/doctest/doctest.h", | ||
"*.svg", | ||
"*.pvsm", | ||
"*.vtu", | ||
"*.js", | ||
"*.json", # should be corrected in the original source | ||
"*.schema.json", # should be corrected in the original source | ||
"*.tex", # should be corrected in the original source | ||
"/doc/world_builder_declarations_closed.md", # should be corrected in the original source | ||
"/doc/world_builder_declarations_open.md", # should be corrected in the original source | ||
"contrib/catch/*", | ||
"contrib/world_builder/*", | ||
"*.bib", # bib entries contain many arbitrary abbreviations | ||
"tests/prmbackslash*", # this test purposefully breaks words on different lines | ||
] | ||
|
||
|
||
|
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
Oops, something went wrong.