Skip to content

Commit

Permalink
lint: Ran consistency scan and fixed stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzyx committed Nov 20, 2023
1 parent a09d7cb commit a156bb3
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,10 @@ repos:
entry: bash -c 'osv-scanner -r .'
language: system
stages: [commit, push]

- id: trivy-vuln
name: Trivy (Vulnerabilities)
description: Check for security vulnerabilities. (https://trivy.dev)
entry: bash -c 'trivy fs --config trivy-vuln.yaml .'
language: system
stages: [commit, push]
2 changes: 1 addition & 1 deletion corefuncprovider/env_ensure_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestAccEnvEnsureDataSource(t *testing.T) {
log.Fatalln(err)
}

buf := new(bytes.Buffer)
buf := &bytes.Buffer{}
tmpl := template.Must(
template.ParseFiles("env_ensure_data_source_fixture.tftpl"),
)
Expand Down
2 changes: 1 addition & 1 deletion corefuncprovider/str_camel_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestAccStrCamelDataSource(t *testing.T) {
strings.TrimSpace(name),
)

buf := new(bytes.Buffer)
buf := &bytes.Buffer{}
tmpl := template.Must(
template.ParseFiles("str_camel_data_source_fixture.tftpl"),
)
Expand Down
2 changes: 1 addition & 1 deletion corefuncprovider/str_constant_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestAccStrConstantDataSource(t *testing.T) {
strings.TrimSpace(name),
)

buf := new(bytes.Buffer)
buf := &bytes.Buffer{}
tmpl := template.Must(
template.ParseFiles("str_constant_data_source_fixture.tftpl"),
)
Expand Down
2 changes: 1 addition & 1 deletion corefuncprovider/str_iterative_replace_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestAccStrIterativeReplaceDataSource(t *testing.T) {
strings.TrimSpace(name),
)

buf := new(bytes.Buffer)
buf := &bytes.Buffer{}
tmpl := template.Must(
template.ParseFiles("str_iterative_replace_data_source_fixture.tftpl"),
)
Expand Down
2 changes: 1 addition & 1 deletion corefuncprovider/str_kebab_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestAccStrKebabDataSource(t *testing.T) {
strings.TrimSpace(name),
)

buf := new(bytes.Buffer)
buf := &bytes.Buffer{}
tmpl := template.Must(
template.ParseFiles("str_kebab_data_source_fixture.tftpl"),
)
Expand Down
2 changes: 1 addition & 1 deletion corefuncprovider/str_pascal_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestAccStrPascalDataSource(t *testing.T) {
strings.TrimSpace(name),
)

buf := new(bytes.Buffer)
buf := &bytes.Buffer{}
tmpl := template.Must(
template.ParseFiles("str_pascal_data_source_fixture.tftpl"),
)
Expand Down
2 changes: 1 addition & 1 deletion corefuncprovider/str_snake_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestAccStrSnakeDataSource(t *testing.T) {
strings.TrimSpace(name),
)

buf := new(bytes.Buffer)
buf := &bytes.Buffer{}
tmpl := template.Must(
template.ParseFiles("str_snake_data_source_fixture.tftpl"),
)
Expand Down
4 changes: 2 additions & 2 deletions corefuncprovider/truncate_label_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

func TestAccTruncateLabelDataSourceDefaultMaxLength64(t *testing.T) {
buf := new(bytes.Buffer)
buf := &bytes.Buffer{}
tmpl := template.Must(
template.ParseFiles("truncate_label_data_source_fixture_default64.tftpl"),
)
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestAccTruncateLabelDataSource(t *testing.T) {
strings.TrimSpace(name),
)

buf := new(bytes.Buffer)
buf := &bytes.Buffer{}
tmpl := template.Must(
template.ParseFiles("truncate_label_data_source_fixture_maxlength.tftpl"),
)
Expand Down
7 changes: 4 additions & 3 deletions trivy-vuln.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
cache:
backend: fs
clear: false
Expand All @@ -14,7 +15,7 @@ db:
dependency-tree: true
exit-code: 1
format: table
ignore-policy: ""
ignore-policy: ''
ignorefile: .trivyignore
include-dev-deps: false
insecure: false
Expand All @@ -23,12 +24,12 @@ misconfiguration:
include-non-failures: false
policy-bundle-repository: ghcr.io/aquasecurity/defsec:0
reset-policy-bundle: false
output: ""
output: ''
quiet: true
report: all
reset: false
scan:
compliance: ""
compliance: ''
file-patterns: []
offline: false
rekor-url: https://rekor.sigstore.dev
Expand Down

0 comments on commit a156bb3

Please sign in to comment.