Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run 'lint-install', address lint issues #14

Merged
merged 3 commits into from
Sep 10, 2021
Merged

Conversation

tstromberg
Copy link
Contributor

See tinkerbell/lint-install#9 for more info.

This now includes a healthy dose of gofumpt -s -w, and addresses the following lint errors:

src/assets/main.go:9:6: var-naming: type AssetsDns should be AssetsDNS (revive)
type AssetsDns struct {
     ^
src/assets/main.go:13:6: var-naming: func CreateAssetsDns should be CreateAssetsDNS (revive)
func CreateAssetsDns(ctx *pulumi.Context, infrastructure internal.Infrastructure) (AssetsDns, error) {
     ^
src/assets/main.go:25: File is not `gofumpt`-ed (gofumpt)

src/assets/main.go:44: File is not `gofumpt`-ed (gofumpt)

src/dns/tinkerbell.org/main.go:8:6: var-naming: func ManageDns should be ManageDNS (revive)
func ManageDns(ctx *pulumi.Context) (ns1.LookupZoneResult, error) {
     ^
src/dns/tinkerbell.org/main.go:12: File is not `gofumpt`-ed (gofumpt)

src/github-actions/cloud-init.go:10:2: var-naming: struct field MasterIp should be MasterIP (revive)
	MasterIp string
	^
src/github-actions/cloud-init.go:16: File is not `gofumpt`-ed (gofumpt)

src/github-actions/cloud-init.go:35: File is not `gofumpt`-ed (gofumpt)
  role: github-action-runner`, 0644)
src/github-actions/cloud-init.go:42: File is not `gofumpt`-ed (gofumpt)
		c.AddRunTextFile(fmt.Sprintf("/etc/salt/minion.d/gha_runner_state_%s.conf", state), fmt.Sprintf("grains:\n  gha_runner_states:\n    - %s", state), 0644)
src/github-actions/cloud-init.go:51: File is not `gofumpt`-ed (gofumpt)

src/github-actions/cloud-init.go:57: File is not `gofumpt`-ed (gofumpt)

src/github-actions/main.go:17:51: Comment should end in a period (godot)
// to describe the GitHubActionRunner we provision
                                                  ^
src/github-actions/main.go:24:64: Comment should end in a period (godot)
// GitHubActionRunner is the return struct for CreateSaltMaster
                                                               ^
src/github-actions/main.go:29:62: Comment should end in a period (godot)
// CreateGitHubActionRunner Provisions a GitHub Action Runner
                                                             ^
src/github-actions/main.go:62: File is not `gofumpt`-ed (gofumpt)

src/internal/main.go:13:2: var-naming: struct field SaltMasterIp should be SaltMasterIP (revive)
	SaltMasterIp pulumi.StringOutput
	^
src/main.go:24: File is not `gofumpt`-ed (gofumpt)

src/saltstack/master/cloud-init.go:24: File is not `gofumpt`-ed (gofumpt)

src/saltstack/master/cloud-init.go:57: File is not `gofumpt`-ed (gofumpt)
          - env: main`, 0644)
src/saltstack/master/cloud-init.go:69: File is not `gofumpt`-ed (gofumpt)
  role: master`, 0644)
src/saltstack/master/cloud-init.go:87: File is not `gofumpt`-ed (gofumpt)
`, 0644)
src/saltstack/master/cloud-init.go:90: File is not `gofumpt`-ed (gofumpt)
	c.AddRunTextFile("/srv/pillar/teleport/init.sls", fmt.Sprintf("teleport:\n  domain: %s\n  clientId: %s\n  clientSecret: %s\n", config.teleportDomain, config.teleportClientID, config.teleportClientSecret), 0400)
	c.AddRunTextFile("/srv/pillar/teleport/node.sls", fmt.Sprintf("teleport:\n  peerToken: %s\n", config.teleportPeerToken), 0400)
	c.AddRunTextFile("/srv/pillar/github.sls", fmt.Sprintf("github:\n  username: %s\n  accessToken: %s\n", config.githubUsername, config.githubAccessToken), 0400)
	c.AddRunTextFile("/srv/pillar/aws.sls", fmt.Sprintf("s3:\n  keyid: %s\n  key: %s\n  location: %s\n  bucketName: %s\n", config.awsAccessKeyID, config.awsSecretAccessKey, config.awsBucketLocation, config.awsBucketName), 0400)
src/saltstack/master/cloud-init.go:96: File is not `gofumpt`-ed (gofumpt)
	c.AddRunTextFile("/srv/pillar/aws-eurgh.sls", fmt.Sprintf("s3.keyid: %s\ns3.key: %s\ns3.location: %s\ns3.bucketName: %s\n", config.awsAccessKeyID, config.awsSecretAccessKey, config.awsBucketLocation, config.awsBucketName), 0400)
src/saltstack/master/cloud-init.go:109: File is not `gofumpt`-ed (gofumpt)

src/saltstack/master/cloud-init.go:115: File is not `gofumpt`-ed (gofumpt)

src/saltstack/master/main.go:15:43: Comment should end in a period (godot)
// to describe the SaltMaster we provision
                                          ^
src/saltstack/master/main.go:21:56: Comment should end in a period (godot)
// SaltMaster is the return struct for CreateSaltMaster
                                                       ^
src/saltstack/master/main.go:44:44: Comment should end in a period (godot)
// CreateSaltMaster Provisions a SaltMaster
                                           ^
src/saltstack/master/main.go:53:13: ineffectual assignment to err (ineffassign)
	elasticIP, err := equinix.NewReservedIpBlock(ctx, "salt-master", &equinix.ReservedIpBlockArgs{
	           ^
src/saltstack/master/main.go:65: File is not `gofumpt`-ed (gofumpt)

src/utils.go:9:6: `StackName` is unused (deadcode)
func StackName(ctx *pulumi.Context, name string) string {
     ^
src/utils.go:10: File is not `gofumpt`-ed (gofumpt)

Signed-off-by: Thomas Stromberg <[email protected]>
@tstromberg tstromberg merged commit 4a5a970 into tinkerbell:main Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants