Skip to content

Commit 83a1a67

Browse files
committed
lint: Cleaned up the YAML files.
1 parent f4278de commit 83a1a67

File tree

4 files changed

+107
-123
lines changed

4 files changed

+107
-123
lines changed

.github/workflows/release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# This GitHub action can publish assets for release when a tag is created.
23
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
34
#
@@ -13,7 +14,7 @@ name: release
1314
on:
1415
push:
1516
tags:
16-
- "v*"
17+
- v*
1718
jobs:
1819
goreleaser:
1920
runs-on: ubuntu-latest

.goreleaser.yml

+26-44
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
---
12
# Pro License
23
variables:
3-
SourceOrg: ""
4+
SourceOrg: ''
45
SourceRepo: terraform-provider-corefunc
5-
Description: "Utilities that should have been Terraform_core functions."
6+
Description: Utilities that should have been Terraform_core functions.
67
MaintainerName: Northwood Labs
7-
MaintainerEmail: ""
8-
AppleCertificateID: ""
9-
GPGKeyID: ""
8+
MaintainerEmail: ''
9+
AppleCertificateID: ''
10+
GPGKeyID: ''
1011

1112
project_name: terraform-provider-corefunc
1213
dist: ./dist
@@ -15,35 +16,35 @@ changelog:
1516
skip: false
1617

1718
archives:
18-
- id: "linux-archive"
19+
- id: linux-archive
1920
builds:
2021
- linux
2122
allow_different_binary_count: false
2223
wrap_in_directory: false
2324
format: zip
2425
files:
2526
- none*
26-
name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
27+
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}'
2728

28-
- id: "windows-archive"
29+
- id: windows-archive
2930
builds:
3031
- windows
3132
allow_different_binary_count: false
3233
wrap_in_directory: false
3334
format: zip
3435
files:
3536
- none*
36-
name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
37+
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}'
3738

38-
- id: "macos-archive"
39+
- id: macos-archive
3940
builds:
4041
- macos-universal
4142
allow_different_binary_count: false
4243
wrap_in_directory: false
4344
format: zip
4445
files:
4546
- none*
46-
name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_universal"
47+
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_universal'
4748

4849
builds:
4950
#-----------------------------------------------------------------------------
@@ -52,7 +53,7 @@ builds:
5253
- id: linux
5354
dir: .
5455
main: .
55-
binary: "{{ .ProjectName }}_v{{ .Version }}"
56+
binary: '{{ .ProjectName }}_v{{ .Version }}'
5657
skip: false
5758
ldflags:
5859
- -s -w
@@ -84,7 +85,7 @@ builds:
8485
- id: windows
8586
dir: .
8687
main: .
87-
binary: "{{ .ProjectName }}_v{{ .Version }}"
88+
binary: '{{ .ProjectName }}_v{{ .Version }}'
8889
skip: false
8990
ldflags:
9091
- -s -w
@@ -116,7 +117,7 @@ builds:
116117
- id: macos
117118
dir: .
118119
main: .
119-
binary: "{{ .ProjectName }}_v{{ .Version }}"
120+
binary: '{{ .ProjectName }}_v{{ .Version }}'
120121
skip: false
121122
ldflags:
122123
- -s -w
@@ -144,63 +145,44 @@ universal_binaries:
144145
- id: macos-universal
145146
ids:
146147
- macos
147-
name_template: "{{ .ProjectName }}_v{{ .Version }}"
148+
name_template: '{{ .ProjectName }}_v{{ .Version }}'
148149
replace: true
149150
hooks:
150151
post:
151152
# Apple Account
152153
# https://developer.apple.com/account/resources/certificates/
153-
- codesign -s {{.Var.AppleCertificateID}} -o runtime -v './dist/macos-universal_darwin_all/{{.ProjectName}}_v{{ .Version }}'
154+
- codesign -s {{.Var.AppleCertificateID}} -o runtime -v './dist/macos-universal_darwin_all/{{.ProjectName}}_v{{ .Version
155+
}}'
154156

155157
checksum:
156-
name_template: "{{ .ProjectName }}-checksums.txt"
158+
name_template: '{{ .ProjectName }}-checksums.txt'
157159
algorithm: sha256
158160

159161
signs:
160162
- id: gpg
161163
ids:
162164
- linux-archive
163165
- windows-archive
164-
signature: "${artifact}.sig"
166+
signature: ${artifact}.sig
165167
cmd: gpg2
166-
args:
167-
[
168-
"-u",
169-
"{{ .Var.GPGKeyID }}",
170-
"--output",
171-
"${signature}",
172-
"--detach-sign",
173-
"${artifact}",
174-
]
168+
args: [-u, '{{ .Var.GPGKeyID }}', --output, '${signature}', --detach-sign, '${artifact}']
175169
artifacts: all
176170

177171
- id: gatekeeper
178172
ids:
179173
- macos-archive
180-
signature: "${artifact}"
174+
signature: ${artifact}
181175
cmd: xcrun
182-
args:
183-
[
184-
"notarytool",
185-
"submit",
186-
"./dist/{{ .ProjectName }}_v{{ .Version }}_darwin_universal.zip",
187-
"--apple-id",
188-
"{{ .Env.AC_APPLE_ID }}",
189-
"--password",
190-
"{{ .Env.AC_PASSWORD }}",
191-
"--team-id",
192-
"{{ .Env.AC_TEAM_ID }}",
193-
"--progress",
194-
"--wait",
195-
]
176+
args: [notarytool, submit, './dist/{{ .ProjectName }}_v{{ .Version }}_darwin_universal.zip', --apple-id, '{{ .Env.AC_APPLE_ID
177+
}}', --password, '{{ .Env.AC_PASSWORD }}', --team-id, '{{ .Env.AC_TEAM_ID }}', --progress, --wait]
196178
artifacts: all
197179

198180
release:
199181
# Repo in which the release will be created.
200182
# Default is extracted from the origin remote URL or empty if its private hosted.
201183
github:
202-
owner: "{{ .Var.SourceOrg }}"
203-
name: "{{ .Var.SourceRepo }}"
184+
owner: '{{ .Var.SourceOrg }}'
185+
name: '{{ .Var.SourceRepo }}'
204186

205187
# IDs of the archives to use.
206188
# Defaults to all.

.pre-commit-config.yaml

+10-9
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ repos:
5858
- repo: https://github.com/skyzyx/git-hooks
5959
rev: 4a2f0dc93e5c5353ed5e619599b0d15e34df88db
6060
hooks:
61-
- id: checkov
62-
args:
63-
- --directory=.
64-
- --framework=terraform
65-
- --quiet
66-
- --compact
67-
- --skip-check=CKV_AWS_50,CKV_AWS_116,CKV_AWS_173,CKV_AWS_115
61+
# - id: checkov
62+
# args:
63+
# - --directory=.
64+
# - --framework=terraform
65+
# - --quiet
66+
# - --compact
67+
# - --skip-check=CKV_AWS_50,CKV_AWS_116,CKV_AWS_173,CKV_AWS_115
6868
- id: git-check
6969
- id: gofumpt
7070
- id: golangci-lint
@@ -76,11 +76,12 @@ repos:
7676
- --ignore=.github
7777
- --ignore=.templates
7878
- --fix
79+
- '**/*.md'
7980
- id: script-must-have-extension
8081
- id: shellcheck
8182
- id: shfmt
8283
- id: terraform-fmt
83-
- id: terrascan
84-
- id: tfsec
84+
# - id: terrascan
85+
# - id: tfsec
8586
- id: yamlfmt
8687
- id: yapf

.yamllint

+69-69
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
11
---
22
# https://yamllint.readthedocs.io/en/stable/rules.html
33
yaml-files:
4-
- "*.yaml"
5-
- "*.yml"
6-
- .yamllint
4+
- '*.yaml'
5+
- '*.yml'
6+
- .yamllint
77

88
rules:
9-
braces:
10-
forbid: non-empty
11-
min-spaces-inside: 0
12-
max-spaces-inside: 0
13-
min-spaces-inside-empty: 0
14-
max-spaces-inside-empty: 0
15-
brackets:
16-
forbid: non-empty
17-
min-spaces-inside: 0
18-
max-spaces-inside: 0
19-
min-spaces-inside-empty: 0
20-
max-spaces-inside-empty: 0
21-
colons:
22-
max-spaces-before: 0
23-
max-spaces-after: 1
24-
commas:
25-
max-spaces-before: 0
26-
min-spaces-after: 1
27-
max-spaces-after: 1
28-
comments:
29-
require-starting-space: true
30-
ignore-shebangs: true
31-
min-spaces-from-content: 1
32-
comments-indentation: false
33-
document-end:
34-
present: false
35-
document-start:
36-
present: true
37-
empty-lines:
38-
max: 1
39-
max-start: 0
40-
max-end: 0
41-
empty-values:
42-
forbid-in-block-mappings: true
43-
forbid-in-flow-mappings: true
44-
hyphens:
45-
max-spaces-after: 1
46-
indentation:
47-
spaces: 2
48-
indent-sequences: true
49-
check-multi-line-strings: true
50-
key-duplicates: enable
51-
key-ordering: disable
52-
line-length:
53-
max: 120
54-
allow-non-breakable-words: true
55-
allow-non-breakable-inline-mappings: false
56-
level: warning
57-
new-line-at-end-of-file: enable
58-
new-lines:
59-
type: unix
60-
octal-values:
61-
forbid-implicit-octal: true
62-
forbid-explicit-octal: false
63-
quoted-strings:
64-
quote-type: any
65-
required: only-when-needed
66-
extra-required: []
67-
extra-allowed: []
68-
trailing-spaces: enable
69-
truthy:
70-
allowed-values:
71-
- "true"
72-
- "false"
73-
check-keys: true
74-
level: warning
9+
braces:
10+
forbid: non-empty
11+
min-spaces-inside: 0
12+
max-spaces-inside: 0
13+
min-spaces-inside-empty: 0
14+
max-spaces-inside-empty: 0
15+
brackets:
16+
forbid: non-empty
17+
min-spaces-inside: 0
18+
max-spaces-inside: 0
19+
min-spaces-inside-empty: 0
20+
max-spaces-inside-empty: 0
21+
colons:
22+
max-spaces-before: 0
23+
max-spaces-after: 1
24+
commas:
25+
max-spaces-before: 0
26+
min-spaces-after: 1
27+
max-spaces-after: 1
28+
comments:
29+
require-starting-space: true
30+
ignore-shebangs: true
31+
min-spaces-from-content: 1
32+
comments-indentation: false
33+
document-end:
34+
present: false
35+
document-start:
36+
present: true
37+
empty-lines:
38+
max: 1
39+
max-start: 0
40+
max-end: 0
41+
empty-values:
42+
forbid-in-block-mappings: true
43+
forbid-in-flow-mappings: true
44+
hyphens:
45+
max-spaces-after: 1
46+
indentation:
47+
spaces: 2
48+
indent-sequences: true
49+
check-multi-line-strings: true
50+
key-duplicates: enable
51+
key-ordering: disable
52+
line-length:
53+
max: 120
54+
allow-non-breakable-words: true
55+
allow-non-breakable-inline-mappings: false
56+
level: warning
57+
new-line-at-end-of-file: enable
58+
new-lines:
59+
type: unix
60+
octal-values:
61+
forbid-implicit-octal: true
62+
forbid-explicit-octal: false
63+
quoted-strings:
64+
quote-type: any
65+
required: only-when-needed
66+
extra-required: []
67+
extra-allowed: []
68+
trailing-spaces: enable
69+
truthy:
70+
allowed-values:
71+
- 'true'
72+
- 'false'
73+
check-keys: true
74+
level: warning

0 commit comments

Comments
 (0)