Skip to content

Commit

Permalink
Rebase to main, fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldouglas92 committed Feb 29, 2024
2 parents 4484971 + 545bb15 commit 9b0baa0
Show file tree
Hide file tree
Showing 143 changed files with 75,508 additions and 19,481 deletions.
38 changes: 38 additions & 0 deletions .clang-tidy
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: '*'
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ jobs:
run: |
sudo apt install lcov;
lcov --capture --directory ${{github.workspace}}/build --output-file coverage.info;
lcov --remove coverage.info '${{github.workspace}}/build/*' '${{github.workspace}}/source/gwb-grid/*' '${{github.workspace}}/include/*' '${{github.workspace}}/tests/*' '/usr/*' -o coverage_filtered.info
lcov --remove coverage.info '${{github.workspace}}/build/*' '${{github.workspace}}/include/*' '${{github.workspace}}/tests/*' '/usr/*' -o coverage_filtered.info
ls;
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/typos.yml
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"
45 changes: 45 additions & 0 deletions .typos.toml
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
]



8 changes: 6 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ The Geodynamic World Builder is currently maintained and developed by Menno Frat
There have been contributions on the development from:
Wolfgang Bangerth,
Magali Billen,
Juliane Dannberg,
Daniel Douglas,
Rebecca Fildes,
Rene Gassmoeller,
Timo Heister,
Lorraine Hwang,
Haoyuan Li,
Chris Mills,
Arushi Saxena,
Wim Spakman
and
Wim Spakman,
Cedric Thieulot
and
Yijun Wang
Loading

0 comments on commit 9b0baa0

Please sign in to comment.