mirror of
https://github.com/cisagov/log4j-affected-db.git
synced 2024-11-23 00:50:48 +00:00
Merge pull request #84 from cisagov/improvement/replace_beautysh_with_shfmt
Replace beautysh hook with cisagov/pre-commit-shfmt
This commit is contained in:
commit
81cdb4da94
3 changed files with 21 additions and 10 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -86,6 +86,8 @@ jobs:
|
||||||
${{ env.CURL_CACHE_DIR }}/"${TERRAFORM_ZIP}"
|
${{ env.CURL_CACHE_DIR }}/"${TERRAFORM_ZIP}"
|
||||||
sudo mv /usr/local/bin/terraform /usr/local/bin/terraform-default
|
sudo mv /usr/local/bin/terraform /usr/local/bin/terraform-default
|
||||||
sudo ln -s /opt/terraform/terraform /usr/local/bin/terraform
|
sudo ln -s /opt/terraform/terraform /usr/local/bin/terraform
|
||||||
|
- name: Install shfmt
|
||||||
|
run: go install mvdan.cc/sh/v3/cmd/shfmt@${SHFMT_VERSION}
|
||||||
- name: Install Terraform-docs
|
- name: Install Terraform-docs
|
||||||
run: |
|
run: |
|
||||||
go install \
|
go install \
|
||||||
|
|
|
@ -54,13 +54,20 @@ repos:
|
||||||
- id: validate_manifest
|
- id: validate_manifest
|
||||||
|
|
||||||
# Shell script hooks
|
# Shell script hooks
|
||||||
- repo: https://github.com/lovesegfault/beautysh
|
- repo: https://github.com/cisagov/pre-commit-shfmt
|
||||||
rev: v6.1.0
|
rev: v0.0.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: beautysh
|
- id: shfmt
|
||||||
args:
|
args:
|
||||||
- --indent-size
|
# Indent by two spaces
|
||||||
|
- -i
|
||||||
- '2'
|
- '2'
|
||||||
|
# Binary operators may start a line
|
||||||
|
- -bn
|
||||||
|
# Switch cases are indented
|
||||||
|
- -ci
|
||||||
|
# Redirect operators are followed by a space
|
||||||
|
- -sr
|
||||||
- repo: https://github.com/detailyang/pre-commit-shell
|
- repo: https://github.com/detailyang/pre-commit-shell
|
||||||
rev: 1.0.5
|
rev: 1.0.5
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
@ -4,7 +4,8 @@ set -o nounset
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
USAGE=$(cat << 'END_OF_LINE'
|
USAGE=$(
|
||||||
|
cat << 'END_OF_LINE'
|
||||||
Configure a developement environment for this repository.
|
Configure a developement environment for this repository.
|
||||||
|
|
||||||
It does the following:
|
It does the following:
|
||||||
|
@ -160,7 +161,8 @@ pre-commit install ${INSTALL_HOOKS:+"--install-hooks"}
|
||||||
# This could fail if the remotes are already setup, but that is ok.
|
# This could fail if the remotes are already setup, but that is ok.
|
||||||
set +o errexit
|
set +o errexit
|
||||||
|
|
||||||
eval "$(python3 << 'END_OF_LINE'
|
eval "$(
|
||||||
|
python3 << 'END_OF_LINE'
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import yaml
|
import yaml
|
||||||
import sys
|
import sys
|
||||||
|
|
Loading…
Reference in a new issue