Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ repos:
exclude_types: [python]
- id: check-yaml

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
exclude: |
(?x)^(
^.*libcudacxx/cmake/config\.guess$
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we exclude this specific cmake facility? in case shellcheck confused it as shell script we can add a comment about it still

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shellcheck recognizes it as a shell script (from the shebang), but it's vendored so we shouldn't touch it.

)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.7
Expand Down
20 changes: 20 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- conf -*-
enable=all
color=never
external-sources=true
severity=style
source-path=SCRIPTDIR
# Consider invoking this command separately to avoid masking its return value (or use '||
# true' to ignore).
#
# This just clutters up the code. We usually have `set -eo pipefail` enabled.
disable=SC2312
# This function is invoked in an 'if' condition so set -e will be disabled. Invoke
# separately if failures should cause the script to exit.
#
# We don't want to exit if errors happen inside an if, that's why we have the if
# statement...
disable=SC2310
# Don't suggest putting braces around all variable references
disable=SC2250
shell=bash