diff --git a/.ecrc b/.ecrc index 2f208ee..dbcae21 100644 --- a/.ecrc +++ b/.ecrc @@ -9,6 +9,7 @@ "\\.cache$", "\\.css\\.map$", "\\.dcignore$", + "\\.ecrc$", "\\.eot$", "\\.example$", "\\.gif$", @@ -34,9 +35,11 @@ "\\.snap$", "\\.svg$", "\\.tar$", + "\\.terraform-docs\\.yml$", "\\.terraform\\.lock\\.hcl$", "\\.ttf$", "\\.txt$", + "\\.vscode/.*?\\.json$", "\\.webp$", "\\.wmv$", "\\.woff$", diff --git a/.editorconfig b/.editorconfig index dce4e45..b614d1b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,7 +22,7 @@ max_line_length = 20000 indent_size = 2 # Configuration formats -[*.{hcl,json,jsonc,toml,yaml,yml}] +[*.{hcl,json,jsonc,toml,yaml,yml}, .ecrc] indent_size = 2 [*.go] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1a4af23..78a32bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,6 @@ repos: - --maxkb=500 - --enforce-all - id: check-case-conflict - - id: check-json - id: check-merge-conflict - id: check-toml - id: check-xml @@ -99,31 +98,6 @@ repos: - --space-redirects # goplicate-end:shell - # ---------------------------------------------------------------------------- - # goplicate-start:python - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 - hooks: - - id: fix-encoding-pragma - args: - - --remove - - id: requirements-txt-fixer - - - repo: https://github.com/asottile/pyupgrade - rev: c21b4c4d153be0633357686c7697f539ac194868 - hooks: - - id: pyupgrade - args: - - --py311-plus - - - repo: https://github.com/asottile/reorder_python_imports - rev: c4fe43d9809f1507508b3aba24ad1a72b5407f58 - hooks: - - id: reorder-python-imports - args: - - --py311-plus - # goplicate-end:python - # ---------------------------------------------------------------------------- # goplicate-start:golang - repo: https://github.com/skyzyx/git-hooks @@ -131,14 +105,13 @@ repos: hooks: - id: gofumpt - id: golangci-lint - - id: gomodupdate - repo: local hooks: - id: go-consistent name: 'Go: Consistent Patterns' description: Analyzes Go packages to identify unnecessary type conversions. - entry: bash -c 'go-consistent ./corefunc/...; go-consistent ./corefuncprovider/...' + entry: bash -c 'go-consistent ./...' language: system stages: [commit, push] diff --git a/__first_time.sh b/__first_time.sh index be284fa..b3a4c88 100755 --- a/__first_time.sh +++ b/__first_time.sh @@ -37,13 +37,13 @@ TYPES=() # Pass GO=true when calling the script. # shellcheck disable=2154 -if [[ "${GO}" == "true" ]]; then +if [[ ${GO} == "true" ]]; then TYPES+=("go") fi # Pass TF=true when calling the script. # shellcheck disable=2154 -if [[ "${TF}" == "true" ]]; then +if [[ ${TF} == "true" ]]; then TYPES+=("tf") fi @@ -78,13 +78,13 @@ TYPES=() # Pass GO=true when calling the script. # shellcheck disable=2154 -if [[ "${GO}" == "true" ]]; then +if [[ ${GO} == "true" ]]; then TYPES+=("go") fi # Pass TF=true when calling the script. # shellcheck disable=2154 -if [[ "${TF}" == "true" ]]; then +if [[ ${TF} == "true" ]]; then TYPES+=("tf") fi @@ -106,7 +106,7 @@ cp -vf "${RUNNER_TEMP}/updates/.vscode/settings.tmpl.jsonc" "${PWD}/.vscode/sett goplicate run --allow-dirty --confirm --stash-changes # Generate .ecrc -tomljson ecrc.toml >.ecrc +tomljson ecrc.toml > .ecrc # Make shell scripts executable find "${PWD}" -type f -name "*.sh" -print0 | diff --git a/__update.sh b/__update.sh index 47d7bd8..fbb64e0 100755 --- a/__update.sh +++ b/__update.sh @@ -31,7 +31,7 @@ for FILE in ${FILES[@]}; do # Otherwise, as long as the copied file is not the ignored file, go # ahead and copy it (no restricton) - elif [[ "${FILE}" != "${RUNNER_TEMP}/full-copy/${IGNORE}" ]]; then + elif [[ ${FILE} != "${RUNNER_TEMP}/full-copy/${IGNORE}" ]]; then cp -Rfv "${FILE}" "${PWD}" fi done @@ -56,13 +56,13 @@ TYPES=() # Pass GO=true when calling the script. # shellcheck disable=2154 -if [[ "${GO}" == "true" ]]; then +if [[ ${GO} == "true" ]]; then TYPES+=("go") fi # Pass TF=true when calling the script. # shellcheck disable=2154 -if [[ "${TF}" == "true" ]]; then +if [[ ${TF} == "true" ]]; then TYPES+=("tf") fi @@ -78,7 +78,7 @@ done goplicate run --allow-dirty --confirm --stash-changes # Generate .ecrc -tomljson ecrc.toml >.ecrc +tomljson ecrc.toml > .ecrc # Make shell scripts executable find "${PWD}" -type f -name "*.sh" -print0 | diff --git a/ecrc.toml b/ecrc.toml index 09e0067..f54d301 100644 --- a/ecrc.toml +++ b/ecrc.toml @@ -21,6 +21,7 @@ Exclude = [ "\\.cache$", "\\.css\\.map$", "\\.dcignore$", + "\\.ecrc$", "\\.eot$", "\\.example$", "\\.gif$", @@ -46,9 +47,11 @@ Exclude = [ "\\.snap$", "\\.svg$", "\\.tar$", + "\\.terraform-docs\\.yml$", "\\.terraform\\.lock\\.hcl$", "\\.ttf$", "\\.txt$", + "\\.vscode/.*?\\.json$", "\\.webp$", "\\.wmv$", "\\.woff$",