Skip to content

Commit

Permalink
fix: Smooth out some rough edges in the dev flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzyx committed Nov 10, 2024
1 parent f18a595 commit edbf6d9
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 11 deletions.
1 change: 1 addition & 0 deletions .ecrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"^Cargo\\.lock$",
"^composer\\.lock$",
"^package-lock\\.json$",
"^poetry\\.lock$",
"^yarn\\.lock$",
"cliff\\.toml$",
"go\\.mod$",
Expand Down
8 changes: 4 additions & 4 deletions .lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ pre-commit:
trivy-vuln:
tags: "always,secrets"
run: >-
trivy fs --config trivy-vuln.yaml --ignorefile .trivyignore.yaml .
trivy fs --config trivy-vuln.yaml --ignorefile .trivyignore .
stage_fixed: false

trivy-license:
tags: "always,secrets"
run: >-
trivy fs --config trivy-license.yaml --ignorefile .trivyignore.yaml .
trivy fs --config trivy-license.yaml --ignorefile .trivyignore .
stage_fixed: false

trufflehog:
Expand All @@ -84,11 +84,11 @@ pre-commit:

# File MUST always end with a trailing linebreak.
"end_of_file.py":
runner: python3.10
runner: poetry run

# Remove trailing whitespace from lines.
"remove_trailing_whitespace.py":
runner: python3.10
runner: poetry run

commit-msg:
commands:
Expand Down
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BINARY_NAME=terraform-provider-corefunc
#-------------------------------------------------------------------------------
# Global stuff.

HOMEBREW_PACKAGES=bash bats-core coreutils editorconfig-checker findutils git git-cliff git-lfs go grep jq librsvg nodejs pre-commit [email protected] shellcheck tfschema trivy trufflesecurity/trufflehog/trufflehog
HOMEBREW_PACKAGES=bash bats-core coreutils editorconfig-checker findutils git git-cliff git-lfs go grep jq librsvg nodejs poetry pre-commit [email protected] shellcheck tfschema trivy trufflesecurity/trufflehog/trufflehog
NEXT_VERSION ?= $(shell git cliff --bump --unreleased --context | jq -r .[0].version)

#-------------------------------------------------------------------------------
Expand All @@ -25,6 +25,7 @@ install-tools-go:
@ $(HEADER) "=====> Installing Go packages..."
$(GO) install github.com/antham/gommit@latest
$(GO) install github.com/charmbracelet/gum@latest
$(GO) install github.com/evilmartians/lefthook@latest
$(GO) install github.com/google/osv-scanner/cmd/osv-scanner@v1
$(GO) install github.com/goph/licensei/cmd/licensei@latest
$(GO) install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@latest
Expand Down Expand Up @@ -142,12 +143,8 @@ docs-provider: clean-ds
find docs/ -type f -name "*.md" | xargs -I% sed -i 's|<!-- variadic argument generated by tfplugindocs -->||g' "%"

@ echo " "
# Will probably fail.
- pre-commit run --all-files markdownlint

@ echo " "
# Will probably succeed. If not, there's a bigger issue.
pre-commit run --all-files markdownlint
# If this fails, there's a bigger issue.
lefthook run pre-commit --commands markdownlint

.PHONY: docs-cli
## docs-cli: [docs] Preview the Go library documentation on the CLI.
Expand Down
1 change: 1 addition & 0 deletions ecrc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Exclude = [
"^Cargo\\.lock$",
"^composer\\.lock$",
"^package-lock\\.json$",
"^poetry\\.lock$",
"^yarn\\.lock$",
"cliff\\.toml$",
"go\\.mod$",
Expand Down
21 changes: 21 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,25 @@ require (
)

require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/ProtonMail/go-crypto v1.1.2 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bits-and-blooms/bitset v1.14.3 // indirect
github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect
github.com/cloudflare/circl v1.5.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/go-test/deep v1.0.7 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/cli v1.1.6 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
Expand All @@ -48,15 +58,19 @@ require (
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.23.0 // indirect
github.com/hashicorp/terraform-plugin-docs v0.20.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
Expand All @@ -65,13 +79,19 @@ require (
github.com/oklog/run v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/yuin/goldmark v1.7.7 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.15.0 // indirect
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.22.0 // indirect
Expand All @@ -84,5 +104,6 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect
google.golang.org/grpc v1.68.0 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit edbf6d9

Please sign in to comment.