Skip to content

Commit

Permalink
Format Go files using gofumpt to remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
johnboyes authored Feb 10, 2024
1 parent 7a85fff commit 17aa7ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions internal/github/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,9 @@ func (a *Action) pullRequestNumber() int {
func (a *Action) outputResult(result string) {
labelCheckOutput := fmt.Sprintf("label_check=%s", result)
gitHubOutputFileName := filepath.Clean(os.Getenv("GITHUB_OUTPUT"))
githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, 0644)
githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, 0o644)

Check failure on line 130 in internal/github/action.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] internal/github/action.go#L130

G302: Expect file permissions to be 0600 or less (gosec)
Raw output
internal/github/action.go:130:27: G302: Expect file permissions to be 0600 or less (gosec)
	githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, 0o644)
	                         ^
panic.IfError(err)
_, err = githubOutputFile.WriteString(labelCheckOutput)

if err != nil {

Check failure on line 133 in internal/github/action.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] internal/github/action.go#L133

only one cuddle assignment allowed before if statement (wsl)
Raw output
internal/github/action.go:133:2: only one cuddle assignment allowed before if statement (wsl)
	if err != nil {
	^
closingErr := githubOutputFile.Close()

Expand Down
6 changes: 3 additions & 3 deletions internal/github/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import (
"github.com/agilepathway/label-checker/internal/error/panic"
)

//nolint: gochecknoglobals
// nolint: gochecknoglobals
var integration = flag.Bool(
"integration",
false,
"Make calls to real external services. Requires INPUT_REPO_TOKEN environment variable.")

//nolint: gochecknoglobals
// nolint: gochecknoglobals
var enterpriseCloud = flag.Bool(
"enterprise-cloud",
false,
"Run the label checker against GitHub Enterprise Cloud instead of standard GitHub")

//nolint: gochecknoglobals
// nolint: gochecknoglobals
var enterpriseServer = flag.Bool(
"enterprise-server",
false,
Expand Down

0 comments on commit 17aa7ce

Please sign in to comment.