From 5f90886ee714347c281bf1d68b5f1af0eca1f69f Mon Sep 17 00:00:00 2001 From: Pete Moore Date: Thu, 23 Feb 2017 19:44:42 +0100 Subject: [PATCH] Use gometalinter --- .taskcluster.yml | 55 ++++++-- build.sh | 5 +- results | 331 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 378 insertions(+), 13 deletions(-) create mode 100644 results diff --git a/.taskcluster.yml b/.taskcluster.yml index 26a62cb5..f28150aa 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -10,7 +10,45 @@ tasks: ########################################################## - ##################### linux 64 build ##################### + ##################### Linter - Linux ##################### + ########################################################## + + - provisionerId: "{{ taskcluster.docker.provisionerId }}" + workerType: "{{ taskcluster.docker.workerType }}" + metadata: + name: "Lint generic-worker (platform independent)" + description: "This lints the source code of generic-worker" + owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here + source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here + extra: + github: + # Events that will trigger this task + events: + - pull_request.* + - push + payload: + maxRunTime: 3600 + image: golang + command: + - /bin/bash + - -vxec + - | + go get -d "github.com/taskcluster/generic-worker" + cd "${GOPATH}/src/github.com/taskcluster/generic-worker" + git remote add user '{{ event.head.repo.url }}' + git fetch --tags user + git checkout '{{ event.head.sha }}' + go get github.com/alecthomas/gometalinter + cd gw-codegen + go get -v + cd .. + go generate + go get -d -v -t ./... + "${GOPATH}/bin/gometalinter" --install + "${GOPATH}/bin/gometalinter" --deadline 10m $(go list ./... | grep -v /vendor/ | sed 's/github.com\/taskcluster\/generic-worker/./') + + ########################################################## + ##################### Linux 64 build ##################### ########################################################## - provisionerId: "{{ taskcluster.docker.provisionerId }}" @@ -44,7 +82,7 @@ tasks: git remote add user '{{ event.head.repo.url }}' git fetch --tags user git checkout '{{ event.head.sha }}' - go get github.com/taskcluster/livelog github.com/gordonklaus/ineffassign + go get github.com/taskcluster/livelog cd gw-codegen go get -v cd .. @@ -52,7 +90,6 @@ tasks: go get -v -t ./... test "$(git status --porcelain | wc -l)" == 0 GORACE=history_size=7 go test -v ./... - "${GOPATH}/bin/ineffassign" . artifacts: public/build/generic-worker-linux-amd64: path: "/go/bin/generic-worker" @@ -90,7 +127,7 @@ tasks: - git remote add user {{ event.head.repo.url }} - git fetch --tags user - git checkout {{ event.head.sha }} - - go get github.com/taskcluster/livelog github.com/gordonklaus/ineffassign + - go get github.com/taskcluster/livelog - cd gw-codegen - go get -v - cd .. @@ -111,7 +148,6 @@ tasks: - go test -v ./... - set GW_TESTS_GENERATE_USERS=true - go test -v - - ineffassign . artifacts: - path: public/build/generic-worker-windows-amd64.exe expires: "{{ '2 weeks' | $fromNow }}" @@ -157,7 +193,7 @@ tasks: - git remote add user {{ event.head.repo.url }} - git fetch --tags user - git checkout {{ event.head.sha }} - - go get github.com/taskcluster/livelog github.com/gordonklaus/ineffassign + - go get github.com/taskcluster/livelog - cd gw-codegen - go get -v - cd .. @@ -178,7 +214,6 @@ tasks: - go test -v ./... - set GW_TESTS_GENERATE_USERS=true - go test -v - - ineffassign . artifacts: - path: public/build/generic-worker-windows-386.exe expires: "{{ '2 weeks' | $fromNow }}" @@ -224,7 +259,7 @@ tasks: - git remote add user {{ event.head.repo.url }} - git fetch --tags user - git checkout {{ event.head.sha }} - - go get github.com/taskcluster/livelog github.com/gordonklaus/ineffassign + - go get github.com/taskcluster/livelog - cd gw-codegen - go get -v - cd .. @@ -245,7 +280,6 @@ tasks: - go test -v ./... - set GW_TESTS_GENERATE_USERS=true - go test -v - - ineffassign . artifacts: - path: public/build/generic-worker-windows-amd64.exe expires: "{{ '2 weeks' | $fromNow }}" @@ -295,7 +329,7 @@ tasks: git fetch --tags git checkout -f '{{ event.head.sha }}' git clean -fdx - go get -u github.com/taskcluster/livelog github.com/gordonklaus/ineffassign + go get -u github.com/taskcluster/livelog cd gw-codegen go get cd .. @@ -305,7 +339,6 @@ tasks: # output of wc command can contain spaces on darwin, so no quotes around expression test $(git status --porcelain | wc -l) == 0 GORACE=history_size=7 go test -v ./... - "${GOPATH}/bin/ineffassign" . artifacts: - path: public/build/generic-worker-darwin-amd64 expires: "{{ '2 weeks' | $fromNow }}" diff --git a/build.sh b/build.sh index 8f46709a..61b29913 100755 --- a/build.sh +++ b/build.sh @@ -77,8 +77,9 @@ git clean -fdX CGO_ENABLED=1 GORACE="history_size=7" go test -v -race -timeout 1h ./... go vet ./... golint ./... -go get github.com/gordonklaus/ineffassign -ineffassign . +go get github.com/alecthomas/gometalinter +gometalinter --install +gometalinter --deadline 10m $(go list ./... | grep -v /vendor/ | sed 's/github.com\/taskcluster\/generic-worker/./') echo "Build successful!" git status diff --git a/results b/results new file mode 100644 index 00000000..908a69f9 --- /dev/null +++ b/results @@ -0,0 +1,331 @@ +artifacts_test.go:222::warning: cyclomatic complexity 36 of function TestUpload() is high (> 10) (gocyclo) +main.go:1037::warning: cyclomatic complexity 18 of function (*TaskRun).Run() is high (> 10) (gocyclo) +chain_of_trust.go:76::warning: cyclomatic complexity 13 of function (*ChainOfTrustTaskFeature).Stop() is high (> 10) (gocyclo) +main.go:428::warning: cyclomatic complexity 13 of function runWorker() is high (> 10) (gocyclo) +plat_windows.go:182::warning: cyclomatic complexity 12 of function (*TaskRun).prepareCommand() is high (> 10) (gocyclo) +main.go:582::warning: cyclomatic complexity 12 of function (SignedURLPair).Poll() is high (> 10) (gocyclo) +os_groups_test.go:43::warning: cyclomatic complexity 11 of function TestOSGroupsRespected() is high (> 10) (gocyclo) +mounts.go:597::warning: cyclomatic complexity 11 of function (*TaskMount).purgeCaches() is high (> 10) (gocyclo) +aws.go:170::warning: cyclomatic complexity 11 of function (*Config).updateConfigWithAmazonSettings() is high (> 10) (gocyclo) +show-workers/main.go:21::warning: cyclomatic complexity 26 of function main() is high (> 10) (gocyclo) +update-worker-type/update-worker-type.go:18::warning: cyclomatic complexity 21 of function main() is high (> 10) (gocyclo) +update-worker-type/update-worker-type.go:61::warning: declaration of "err" shadows declaration at update-worker-type.go:24 (vetshadow) +livelog/livelog_test.go:30::warning: declaration of "err" shadows declaration at livelog_test.go:20 (vetshadow) +artifacts.go:146::warning: declaration of "err" shadows declaration at artifacts.go:132 (vetshadow) +artifacts_test.go:345::warning: declaration of "err" shadows declaration at artifacts_test.go:308 (vetshadow) +aws.go:147::warning: declaration of "err" shadows declaration at aws.go:142 (vetshadow) +aws.go:208::warning: declaration of "err" shadows declaration at aws.go:173 (vetshadow) +config_test.go:35::warning: declaration of "config" shadows declaration at main.go:55 (vetshadow) +config_test.go:91::warning: declaration of "config" shadows declaration at main.go:55 (vetshadow) +aws.go:123::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +diskspace_windows.go:14::warning: Use of unsafe calls should be audited,LOW,HIGH (gas) +diskspace_windows.go:15::warning: Use of unsafe calls should be audited,LOW,HIGH (gas) +diskspace_windows.go:44::warning: Use of unsafe calls should be audited,LOW,HIGH (gas) +diskspace_windows.go:45::warning: Use of unsafe calls should be audited,LOW,HIGH (gas) +diskspace_windows.go:46::warning: Use of unsafe calls should be audited,LOW,HIGH (gas) +diskspace_windows.go:47::warning: Use of unsafe calls should be audited,LOW,HIGH (gas) +main.go:1241::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +mounts.go:112::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +mounts.go:363::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +mounts.go:400::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +mounts.go:445::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +mounts.go:493::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +mounts.go:572::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +plat_all-unix-style.go:33::warning: Subprocess launching with variable.,HIGH,HIGH (gas) +plat_all-unix-style.go:107::warning: Expect chmod permissions to be 0600 or less,MEDIUM,HIGH (gas) +plat_all-unix-style.go:111::warning: Expect chmod permissions to be 0600 or less,MEDIUM,HIGH (gas) +plat_darwin.go:36::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +plat_darwin.go:63::warning: Subprocess launching with variable.,HIGH,HIGH (gas) +plat_windows.go:35::warning: Subprocess launching with variable.,HIGH,HIGH (gas) +plat_windows.go:55::warning: Subprocess launching with variable.,HIGH,HIGH (gas) +plat_windows.go:109::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +artifacts.go:33:1:warning: AzureArtifact is unused (deadcode) +diskspace_windows.go:28:1:warning: freeDiskSpaceBytes2 is unused (deadcode) +generated_windows.go:12:1:warning: Var1 is unused (deadcode) +generated_windows.go:12:1:warning: Var is unused (deadcode) +generated_windows.go:12:1:warning: Var2 is unused (deadcode) +plat_darwin.go:15:1:warning: createNewTaskContext is unused (deadcode) +plat_windows.go:43:1:warning: exceptionOrFailure is unused (deadcode) +powershell_windows.go:12:1:warning: createRunAsUserScript is unused (deadcode) +taskstatus.go:29:1:warning: InternalError is unused (deadcode) +taskstatus.go:29:1:warning: ReousrceUnavailable is unused (deadcode) +taskstatus.go:29:1:warning: MalformedPayload is unused (deadcode) +taskstatus.go:29:1:warning: Superseded is unused (deadcode) +taskstatus.go:29:1:warning: IntermittentTask is unused (deadcode) +taskstatus.go:29:1:warning: WorkerShutdown is unused (deadcode) +gw-codegen/main.go:133::warning: Errors unhandled.,LOW,HIGH (gas) +livelog/livelog.go:55::warning: Subprocess launching with variable.,HIGH,HIGH (gas) +livelog/livelog.go:127::warning: Errors unhandled.,LOW,HIGH (gas) +process/process_all-unix-style.go:47::warning: Subprocess launching with variable.,HIGH,HIGH (gas) +worker_types/all-worker-types/main.go:28::warning: Expect directory permissions to be 0700 or less,MEDIUM,HIGH (gas) +model.go:16:2:warning: struct Config could have size 440 (currently 464) (aligncheck) +config_test.go:47::warning: duplicate of config_test.go:61-73 (dupl) +config_test.go:61::warning: duplicate of config_test.go:109-121 (dupl) +config_test.go:109::warning: duplicate of config_test.go:47-59 (dupl) +artifacts_test.go:103::warning: duplicate of artifacts_test.go:133-160 (dupl) +artifacts_test.go:133::warning: duplicate of artifacts_test.go:103-130 (dupl) +payload_test.go:115::warning: duplicate of payload_test.go:136-154 (dupl) +payload_test.go:136::warning: duplicate of payload_test.go:115-133 (dupl) +generated_all-unix-style.go:189::warning: duplicate of generated_windows.go:189-399 (dupl) +generated_windows.go:189::warning: duplicate of generated_all-unix-style.go:189-451 (dupl) +process/process_all-unix-style.go:15:6:warning: exported type Command should have comment or be unexported (golint) +process/process_all-unix-style.go:20:6:warning: exported type Result should have comment or be unexported (golint) +process/process_all-unix-style.go:26:1:warning: exported method Result.Succeeded should have comment or be unexported (golint) +process/process_all-unix-style.go:30:1:warning: exported method Result.Failed should have comment or be unexported (golint) +process/process_all-unix-style.go:34:1:warning: exported method Result.CrashCause should have comment or be unexported (golint) +process/process_all-unix-style.go:38:1:warning: exported method Result.FailureCause should have comment or be unexported (golint) +process/process_all-unix-style.go:42:1:warning: exported method Result.Crashed should have comment or be unexported (golint) +process/process_all-unix-style.go:46:1:warning: exported function NewCommand should have comment or be unexported (golint) +process/process_all-unix-style.go:55:1:warning: comment on exported method Result.ExitCode should be of the form "ExitCode ..." (golint) +process/process_all-unix-style.go:72:1:warning: exported method Command.Execute should have comment or be unexported (golint) +process/process_all-unix-style.go:103:1:warning: exported method Command.DirectOutput should have comment or be unexported (golint) +process/process_all-unix-style.go:108:1:warning: exported method Command.Kill should have comment or be unexported (golint) +yamltojson/main.go:29:1:warning: comment on exported function FormatJSON should be of the form "FormatJSON ..." (golint) +artifacts.go:213:8:warning: 2 other occurrence(s) of "directory" found in: artifacts.go:284:21 artifacts.go:291:21 (goconst) +artifacts.go:284:21:warning: 2 other occurrence(s) of "directory" found in: artifacts.go:213:8 artifacts.go:291:21 (goconst) +artifacts.go:291:21:warning: 2 other occurrence(s) of "directory" found in: artifacts.go:213:8 artifacts.go:284:21 (goconst) +artifacts.go:211:8:warning: 2 other occurrence(s) of "file" found in: artifacts.go:277:21 aws.go:78:7 (goconst) +artifacts.go:277:21:warning: 2 other occurrence(s) of "file" found in: artifacts.go:211:8 aws.go:78:7 (goconst) +aws.go:78:7:warning: 2 other occurrence(s) of "file" found in: artifacts.go:211:8 artifacts.go:277:21 (goconst) +artifacts.go:25:21:warning: should omit type map[string]string from declaration of var customMimeMappings; it will be inferred from the right-hand side (golint) +artifacts.go:34:2:warning: exported type Artifact should have comment or be unexported (golint) +artifacts.go:41:2:warning: exported type BaseArtifact should have comment or be unexported (golint) +artifacts.go:46:2:warning: exported type S3Artifact should have comment or be unexported (golint) +artifacts.go:52:2:warning: exported type AzureArtifact should have comment or be unexported (golint) +artifacts.go:57:2:warning: exported type RedirectArtifact should have comment or be unexported (golint) +artifacts.go:63:2:warning: exported type ErrorArtifact should have comment or be unexported (golint) +artifacts.go:70:1:warning: exported method BaseArtifact.Base should have comment or be unexported (golint) +artifacts.go:74:1:warning: exported method RedirectArtifact.ProcessResponse should have comment or be unexported (golint) +artifacts.go:79:1:warning: exported method RedirectArtifact.RequestObject should have comment or be unexported (golint) +artifacts.go:79:1:warning: receiver name redirectArtifact should be consistent with previous receiver name artifact for RedirectArtifact (golint) +artifacts.go:88:1:warning: exported method RedirectArtifact.ResponseObject should have comment or be unexported (golint) +artifacts.go:88:1:warning: receiver name redirectArtifact should be consistent with previous receiver name artifact for RedirectArtifact (golint) +artifacts.go:92:1:warning: exported method ErrorArtifact.ProcessResponse should have comment or be unexported (golint) +artifacts.go:97:1:warning: exported method ErrorArtifact.RequestObject should have comment or be unexported (golint) +artifacts.go:97:1:warning: receiver name errArtifact should be consistent with previous receiver name artifact for ErrorArtifact (golint) +artifacts.go:106:1:warning: exported method ErrorArtifact.ResponseObject should have comment or be unexported (golint) +artifacts.go:106:1:warning: receiver name errArtifact should be consistent with previous receiver name artifact for ErrorArtifact (golint) +artifacts.go:132:1:warning: exported method S3Artifact.ProcessResponse should have comment or be unexported (golint) +artifacts.go:189:1:warning: exported method S3Artifact.RequestObject should have comment or be unexported (golint) +artifacts.go:189:1:warning: receiver name s3Artifact should be consistent with previous receiver name artifact for S3Artifact (golint) +artifacts.go:197:1:warning: exported method S3Artifact.ResponseObject should have comment or be unexported (golint) +artifacts.go:197:1:warning: receiver name s3Artifact should be consistent with previous receiver name artifact for S3Artifact (golint) +artifacts.go:201:1:warning: comment on exported method TaskRun.PayloadArtifacts should be of the form "PayloadArtifacts ..." (golint) +artifacts.go:204:2:warning: can probably use "var artifacts []Artifact" instead (golint) +artifacts.go:357:11:warning: if block ends with a return statement, so drop this else and outdent its block (golint) +artifacts_test.go:28:14:warning: should omit type string from declaration of var taskGroupID; it will be inferred from the right-hand side (golint) +aws.go:48:6:warning: exported type UserData should have comment or be unexported (golint) +aws.go:61:6:warning: exported type Secrets should have comment or be unexported (golint) +aws.go:68:6:warning: exported type File should have comment or be unexported (golint) +aws.go:76:1:warning: exported method File.Extract should have comment or be unexported (golint) +aws.go:87:1:warning: exported method File.ExtractFile should have comment or be unexported (golint) +aws.go:100:1:warning: exported method File.ExtractZip should have comment or be unexported (golint) +aws.go:113:1:warning: comment on exported function Unzip should be of the form "Unzip ..." (golint) +chain_of_trust.go:19:6:warning: exported type ChainOfTrustFeature should have comment or be unexported (golint) +chain_of_trust.go:22:6:warning: exported type ArtifactHash should have comment or be unexported (golint) +chain_of_trust.go:26:6:warning: exported type CoTEnvironment should have comment or be unexported (golint) +chain_of_trust.go:34:6:warning: exported type ChainOfTrustData should have comment or be unexported (golint) +chain_of_trust.go:45:6:warning: exported type ChainOfTrustTaskFeature should have comment or be unexported (golint) +chain_of_trust.go:49:1:warning: exported method ChainOfTrustFeature.Name should have comment or be unexported (golint) +chain_of_trust.go:53:1:warning: exported method ChainOfTrustFeature.Initialise should have comment or be unexported (golint) +chain_of_trust.go:57:1:warning: exported method ChainOfTrustFeature.IsEnabled should have comment or be unexported (golint) +chain_of_trust.go:61:1:warning: exported method ChainOfTrustFeature.NewTaskFeature should have comment or be unexported (golint) +chain_of_trust.go:67:1:warning: exported method ChainOfTrustTaskFeature.RequiredScopes should have comment or be unexported (golint) +chain_of_trust.go:72:1:warning: exported method ChainOfTrustTaskFeature.Start should have comment or be unexported (golint) +chain_of_trust.go:76:1:warning: exported method ChainOfTrustTaskFeature.Stop should have comment or be unexported (golint) +feature.go:6:2:warning: exported type Feature should have comment or be unexported (golint) +feature.go:13:2:warning: exported type TaskFeature should have comment or be unexported (golint) +feature.go:19:2:warning: exported type EnabledFeatures should have comment or be unexported (golint) +garbagecollector.go:5:1:warning: comment on exported type Resource should be of the form "Resource ..." (with optional leading article) (golint) +garbagecollector.go:17:1:warning: exported method Resources.Empty should have comment or be unexported (golint) +garbagecollector.go:21:1:warning: exported method Resources.ExpungeNext should have comment or be unexported (golint) +generated_all-unix-style.go:14:2:warning: comment on exported type ArtifactContent should be of the form "ArtifactContent ..." (with optional leading article) (golint) +generated_all-unix-style.go:24:2:warning: exported type Content should have comment or be unexported (golint) +generated_all-unix-style.go:26:2:warning: exported type FileMount should have comment or be unexported (golint) +generated_all-unix-style.go:35:2:warning: comment on exported type GenericWorkerPayload should be of the form "GenericWorkerPayload ..." (with optional leading article) (golint) +generated_all-unix-style.go:89:2:warning: exported type Mount should have comment or be unexported (golint) +generated_all-unix-style.go:91:2:warning: exported type ReadOnlyDirectory should have comment or be unexported (golint) +generated_all-unix-style.go:109:2:warning: comment on exported type URLContent should be of the form "URLContent ..." (with optional leading article) (golint) +generated_all-unix-style.go:116:2:warning: exported type Var should have comment or be unexported (golint) +generated_all-unix-style.go:118:2:warning: exported type Var1 should have comment or be unexported (golint) +generated_all-unix-style.go:120:2:warning: exported type Var2 should have comment or be unexported (golint) +generated_all-unix-style.go:122:2:warning: exported type WritableDirectoryCache should have comment or be unexported (golint) +generated_all-unix-style.go:146:1:warning: receiver name should be a reflection of its identity; don't use generic names such as "me", "this", or "self" (golint) +generated_all-unix-style.go:152:1:warning: receiver name should be a reflection of its identity; don't use generic names such as "me", "this", or "self" (golint) +generated_all-unix-style.go:162:1:warning: receiver name should be a reflection of its identity; don't use generic names such as "me", "this", or "self" (golint) +generated_all-unix-style.go:168:1:warning: receiver name should be a reflection of its identity; don't use generic names such as "me", "this", or "self" (golint) +livelog.go:18:6:warning: exported type LiveLogFeature should have comment or be unexported (golint) +livelog.go:21:1:warning: exported method LiveLogFeature.Name should have comment or be unexported (golint) +livelog.go:25:1:warning: exported method LiveLogFeature.Initialise should have comment or be unexported (golint) +livelog.go:29:1:warning: comment on exported method LiveLogFeature.IsEnabled should be of the form "IsEnabled ..." (golint) +livelog.go:34:6:warning: exported type LiveLogTask should have comment or be unexported (golint) +livelog.go:42:1:warning: exported method LiveLogFeature.NewTaskFeature should have comment or be unexported (golint) +livelog.go:48:1:warning: exported method LiveLogTask.RequiredScopes should have comment or be unexported (golint) +livelog.go:53:1:warning: exported method LiveLogTask.Start should have comment or be unexported (golint) +livelog.go:71:1:warning: exported method LiveLogTask.Stop should have comment or be unexported (golint) +main.go:42:14:warning: should omit type *TaskContext from declaration of var taskContext; it will be inferred from the right-hand side (golint) +main.go:46:2:warning: exported var Provisioner should have comment or be unexported (golint) +main.go:57:25:warning: should omit type []Feature from declaration of var Features; it will be inferred from the right-hand side (golint) +main.go:326:6:warning: exported type MissingConfigError should have comment or be unexported (golint) +main.go:580:1:warning: comment on exported method SignedURLPair.Poll should be of the form "Poll ..." (golint) +main.go:637:2:warning: var detokeniseUri should be detokeniseURI (golint) +main.go:725:22:warning: func parameter deleteUrl should be deleteURL (golint) +main.go:876:6:warning: exported type CommandExecutionError should have comment or be unexported (golint) +main.go:893:1:warning: exported function ResourceUnavailable should have comment or be unexported (golint) +main.go:897:1:warning: exported function MalformedPayloadError should have comment or be unexported (golint) +main.go:901:1:warning: exported function Failure should have comment or be unexported (golint) +main.go:905:1:warning: exported method TaskRun.Logf should have comment or be unexported (golint) +main.go:909:1:warning: exported method TaskRun.Log should have comment or be unexported (golint) +main.go:921:1:warning: exported method TaskRun.ExecuteCommand should have comment or be unexported (golint) +main.go:967:1:warning: receiver name err should be consistent with previous receiver name e for executionErrors (golint) +main.go:978:1:warning: receiver name err should be consistent with previous receiver name e for executionErrors (golint) +main.go:1037:1:warning: exported method TaskRun.Run should have comment or be unexported (golint) +main.go:1037:33:warning: exported method Run returns unexported type *main.executionErrors, which can be annoying to use (golint) +main.go:1227:1:warning: exported function PrepareTaskEnvironment should have comment or be unexported (golint) +model.go:15:2:warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint) +model.go:54:2:warning: comment on exported type QueueMessagesList should be of the form "QueueMessagesList ..." (with optional leading article) (golint) +model.go:60:2:warning: comment on exported type QueueMessage should be of the form "QueueMessage ..." (with optional leading article) (golint) +model.go:63:3:warning: struct field MessageId should be MessageID (golint) +model.go:72:2:warning: comment on exported type TaskRun should be of the form "TaskRun ..." (with optional leading article) (golint) +model.go:101:2:warning: exported type SignedURLPair should have comment or be unexported (golint) +model.go:106:2:warning: exported type S3ArtifactResponse should have comment or be unexported (golint) +model.go:113:2:warning: exported type TaskStatus should have comment or be unexported (golint) +model.go:114:2:warning: exported type TaskUpdateReason should have comment or be unexported (golint) +mounts.go:30:13:warning: should omit type CacheMap from declaration of var fileCaches; it will be inferred from the right-hand side (golint) +mounts.go:34:18:warning: should omit type CacheMap from declaration of var directoryCaches; it will be inferred from the right-hand side (golint) +mounts.go:37:5:warning: should omit type *purgecache.PurgeCache from declaration of var pc; it will be inferred from the right-hand side (golint) +mounts.go:43:6:warning: exported type CacheMap should have comment or be unexported (golint) +mounts.go:45:1:warning: exported method CacheMap.SortedResources should have comment or be unexported (golint) +mounts.go:56:6:warning: exported type Cache should have comment or be unexported (golint) +mounts.go:81:1:warning: exported method Cache.Expunge should have comment or be unexported (golint) +mounts.go:92:1:warning: comment on exported type MountsFeature should be of the form "MountsFeature ..." (with optional leading article) (golint) +mounts.go:96:1:warning: exported method MountsFeature.Name should have comment or be unexported (golint) +mounts.go:99:1:warning: exported method MountsFeature.Initialise should have comment or be unexported (golint) +mounts.go:129:1:warning: comment on exported type TaskMount should be of the form "TaskMount ..." (with optional leading article) (golint) +mounts.go:139:1:warning: comment on exported type MountEntry should be of the form "MountEntry ..." (with optional leading article) (golint) +mounts.go:165:1:warning: comment on exported method URLContent.RequiredScopes should be of the form "RequiredScopes ..." (golint) +mounts.go:170:1:warning: comment on exported method ArtifactContent.RequiredScopes should be of the form "RequiredScopes ..." (golint) +mounts.go:178:1:warning: comment on exported method MountsFeature.IsEnabled should be of the form "IsEnabled ..." (golint) +mounts.go:184:1:warning: comment on exported method MountsFeature.NewTaskFeature should be of the form "NewTaskFeature ..." (golint) +mounts.go:216:1:warning: comment on exported method TaskMount.Unmarshal should be of the form "Unmarshal ..." (golint) +mounts.go:225:1:warning: comment on exported method TaskMount.RequiredScopes should be of the form "RequiredScopes ..." (golint) +mounts.go:229:1:warning: receiver name taskMount should be consistent with previous receiver name tm for TaskMount (golint) +mounts.go:235:1:warning: receiver name taskMount should be consistent with previous receiver name tm for TaskMount (golint) +mounts.go:262:1:warning: comment on exported method TaskMount.Start should be of the form "Start ..." (golint) +mounts.go:263:1:warning: receiver name taskMount should be consistent with previous receiver name tm for TaskMount (golint) +mounts.go:301:1:warning: comment on exported method TaskMount.Stop should be of the form "Stop ..." (golint) +mounts.go:302:1:warning: receiver name taskMount should be consistent with previous receiver name tm for TaskMount (golint) +mounts.go:314:1:warning: comment on exported method WritableDirectoryCache.RequiredScopes should be of the form "RequiredScopes ..." (golint) +mounts.go:320:1:warning: comment on exported method WritableDirectoryCache.FSContent should be of the form "FSContent ..." (golint) +mounts.go:330:1:warning: comment on exported method ReadOnlyDirectory.RequiredScopes should be of the form "RequiredScopes ..." (golint) +mounts.go:336:1:warning: comment on exported method ReadOnlyDirectory.FSContent should be of the form "FSContent ..." (golint) +mounts.go:342:1:warning: comment on exported method FileMount.RequiredScopes should be of the form "RequiredScopes ..." (golint) +mounts.go:348:1:warning: comment on exported method FileMount.FSContent should be of the form "FSContent ..." (golint) +mounts.go:354:1:warning: exported method WritableDirectoryCache.Mount should have comment or be unexported (golint) +mounts.go:407:1:warning: exported method WritableDirectoryCache.Unmount should have comment or be unexported (golint) +mounts.go:421:1:warning: exported method ReadOnlyDirectory.Mount should have comment or be unexported (golint) +mounts.go:429:1:warning: comment on exported method ReadOnlyDirectory.Unmount should be of the form "Unmount ..." (golint) +mounts.go:434:1:warning: exported method FileMount.Mount should have comment or be unexported (golint) +mounts.go:459:1:warning: comment on exported method FileMount.Unmount should be of the form "Unmount ..." (golint) +mounts.go:481:3:warning: should replace fileCaches[cacheKey].Hits += 1 with fileCaches[cacheKey].Hits++ (golint) +mounts.go:512:1:warning: comment on exported method Content.FSContent should be of the form "FSContent ..." (golint) +mounts.go:532:1:warning: comment on exported method Content.Unmarshal should be of the form "Unmarshal ..." (golint) +mounts.go:539:1:warning: comment on exported method ArtifactContent.Download should be of the form "Download ..." (golint) +mounts.go:552:1:warning: exported method ArtifactContent.UniqueKey should have comment or be unexported (golint) +mounts.go:556:1:warning: comment on exported method URLContent.Download should be of the form "Download ..." (golint) +mounts.go:559:1:warning: receiver name uc should be consistent with previous receiver name ac for URLContent (golint) +mounts.go:565:1:warning: exported method URLContent.UniqueKey should have comment or be unexported (golint) +mounts.go:565:1:warning: receiver name uc should be consistent with previous receiver name ac for URLContent (golint) +mounts.go:597:1:warning: receiver name taskMount should be consistent with previous receiver name tm for TaskMount (golint) +os_groups.go:5:1:warning: comment on exported type OSGroupsFeature should be of the form "OSGroupsFeature ..." (with optional leading article) (golint) +os_groups.go:9:1:warning: comment on exported type OSGroups should be of the form "OSGroups ..." (with optional leading article) (golint) +os_groups.go:14:1:warning: exported method OSGroupsFeature.Name should have comment or be unexported (golint) +os_groups.go:18:1:warning: exported method OSGroupsFeature.Initialise should have comment or be unexported (golint) +os_groups.go:22:1:warning: exported method OSGroupsFeature.IsEnabled should have comment or be unexported (golint) +os_groups.go:27:1:warning: exported method OSGroupsFeature.NewTaskFeature should have comment or be unexported (golint) +os_groups.go:34:1:warning: exported method OSGroups.RequiredScopes should have comment or be unexported (golint) +os_groups.go:42:1:warning: exported method OSGroups.Start should have comment or be unexported (golint) +os_groups.go:57:1:warning: exported method OSGroups.Stop should have comment or be unexported (golint) +plat_all-unix-style.go:19:6:warning: exported type OSUser should have comment or be unexported (golint) +plat_all-unix-style.go:25:6:warning: exported type TaskContext should have comment or be unexported (golint) +plat_all-unix-style.go:79:1:warning: exported method TaskRun.EnvVars should have comment or be unexported (golint) +plat_all-unix-style.go:114:1:warning: exported function RenameCrossDevice should have comment or be unexported (golint) +signedurlmanager.go:10:1:warning: comment on exported function SignedURLsManager should be of the form "SignedURLsManager ..." (golint) +taskstatus.go:30:2:warning: exported const WorkerShutdown should have comment (or a comment on this block) or be unexported (golint) +taskstatus.go:38:6:warning: exported type TaskStatusManager should have comment or be unexported (golint) +taskstatus.go:43:6:warning: exported type TaskStatusUpdateError should have comment or be unexported (golint) +taskstatus.go:52:1:warning: exported method TaskStatusManager.ReportException should have comment or be unexported (golint) +taskstatus.go:73:1:warning: exported method TaskStatusManager.ReportFailed should have comment or be unexported (golint) +taskstatus.go:93:1:warning: exported method TaskStatusManager.ReportCompleted should have comment or be unexported (golint) +taskstatus.go:113:1:warning: exported method TaskStatusManager.Claim should have comment or be unexported (golint) +taskstatus.go:166:1:warning: exported method TaskStatusManager.Reclaim should have comment or be unexported (golint) +taskstatus.go:196:1:warning: exported method TaskStatusManager.Abort should have comment or be unexported (golint) +taskstatus.go:215:1:warning: exported method TaskStatusManager.Cancel should have comment or be unexported (golint) +taskstatus.go:228:1:warning: exported method TaskStatusManager.LastKnownStatus should have comment or be unexported (golint) +taskstatus.go:234:1:warning: comment on exported method TaskStatusManager.UpdateStatus should be of the form "UpdateStatus ..." (golint) +taskstatus.go:298:1:warning: exported function NewTaskStatusManager should have comment or be unexported (golint) +artifacts_test.go:367:7:warning: should use !strings.Contains(string(b), requiredSubstring) instead (gosimple) +chain_of_trust.go:156:2:warning: 'if err != nil { return err }; return nil' can be simplified to 'return err' (gosimple) +main.go:480:25:warning: should use time.Since instead of time.Now().Sub (gosimple) +main.go:490:7:warning: should use time.Since instead of time.Now().Sub (gosimple) +main.go:495:17:warning: should use time.Since instead of time.Now().Sub (gosimple) +mounts.go:394:3:warning: 'if err != nil { return err }; return nil' can be simplified to 'return err' (gosimple) +mounts.go:610:33:warning: should use time.Since instead of time.Now().Sub (gosimple) +openpgp.go:26:2:warning: 'if err != nil { return err }; return nil' can be simplified to 'return err' (gosimple) +openpgp.go:48:2:warning: 'if err != nil { return err }; return nil' can be simplified to 'return err' (gosimple) +openpgp.go:75:2:warning: 'if err != nil { return err }; return nil' can be simplified to 'return err' (gosimple) +model.go:141:66:warning: unnecessary conversion (unconvert) +model.go:142:66:warning: unnecessary conversion (unconvert) +model.go:147:66:warning: unnecessary conversion (unconvert) +model.go:157:65:warning: unnecessary conversion (unconvert) +process/process_windows.go:92::error: arg r.ExitCode in printf call is a function value, not a function call (vet) +process/process_windows.go:109::error: arg r.ExitCode in printf call is a function value, not a function call (vet) +main.go:1196:31:warning: logHandle can be io.Closer (interfacer) +livelog/livelog.go:61:11:warning: error return value not checked (os.Setenv("ACCESS_TOKEN", l.secret)) (errcheck) +livelog/livelog.go:62:11:warning: error return value not checked (os.Setenv("LIVELOG_GET_PORT", strconv.Itoa(int(l.GETPort)))) (errcheck) +livelog/livelog.go:63:11:warning: error return value not checked (os.Setenv("LIVELOG_PUT_PORT", strconv.Itoa(int(l.PUTPort)))) (errcheck) +livelog/livelog.go:64:11:warning: error return value not checked (os.Setenv("SERVER_CRT_FILE", l.SSLCert)) (errcheck) +livelog/livelog.go:65:11:warning: error return value not checked (os.Setenv("SERVER_KEY_FILE", l.SSLKey)) (errcheck) +livelog/livelog.go:89:19:warning: error return value not checked (l.LogWriter.Close()) (errcheck) +livelog/livelog.go:115:12:warning: error return value not checked (client.Do(req)) (errcheck) +livelog/livelog_test.go:51:20:warning: error return value not checked (ll.LogWriter.Close()) (errcheck) +gw-codegen/main.go:27:21:warning: error return value not checked (formatSourceAndSave(code, output)) (errcheck) +artifacts.go:119:21:warning: error return value not checked (defer tmpFile.Close()) (errcheck) +artifacts.go:126:24:warning: error return value not checked (defer rawContent.Close()) (errcheck) +artifacts.go:127:9:warning: error return value not checked (io.Copy(gzipLogWriter, rawContent)) (errcheck) +artifacts.go:128:21:warning: error return value not checked (gzipLogWriter.Close()) (errcheck) +artifacts.go:140:18:warning: error return value not checked (defer os.Remove(transferContentFile)) (errcheck) +artifacts.go:150:30:warning: error return value not checked (defer transferContent.Close()) (errcheck) +artifacts.go:177:26:warning: error return value not checked (defer putResp.Body.Close()) (errcheck) +artifacts.go:241:17:warning: error return value not checked (filepath.Walk(filepath.Join(taskContext.TaskDir, base.CanonicalPath), walkFn)) (errcheck) +artifacts.go:267:24:warning: error return value not checked (defer fileReader.Close()) (errcheck) +artifacts_test.go:383:22:warning: error return value not checked (defer pubKey.Close()) (errcheck) +aws.go:29:23:warning: error return value not checked (defer resp.Body.Close()) (errcheck) +aws.go:43:23:warning: error return value not checked (defer resp.Body.Close()) (errcheck) +aws.go:123:13:warning: error return value not checked (os.MkdirAll(dest, 0755)) (errcheck) +aws.go:140:15:warning: error return value not checked (os.MkdirAll(path, f.Mode())) (errcheck) +chain_of_trust.go:132:17:warning: error return value not checked (defer out.Close()) (errcheck) +chain_of_trust.go:138:25:warning: error return value not checked (defer privKeyFile.Close()) (errcheck) +chain_of_trust.go:152:9:warning: error return value not checked (w.Close()) (errcheck) +chain_of_trust.go:153:11:warning: error return value not checked (out.Write([]byte{'\n'})) (errcheck) +chain_of_trust.go:154:11:warning: error return value not checked (out.Close()) (errcheck) +chain_of_trust.go:168:24:warning: error return value not checked (defer rawContent.Close()) (errcheck) +helper_test.go:189:15:warning: error return value not checked (defer f.Close()) (errcheck) +main.go:300:18:warning: error return value not checked (config.persist(configFile)) (errcheck) +main.go:373:35:warning: error return value not checked (c.updateConfigWithAmazonSettings()) (errcheck) +main.go:439:21:warning: error return value not checked (feature.Initialise()) (errcheck) +main.go:497:17:warning: error return value not checked (taskCleanup()) (errcheck) +main.go:912:24:warning: error return value not checked (task.logWriter.Write([]byte("[taskcluster " + tcclient.Time(time.Now()).String() + "] " + line + "\n"))) (errcheck) +main.go:1006:28:warning: error return value not checked (task.StatusManager.Abort()) (errcheck) +main.go:1013:15:warning: error return value not checked (command.Kill()) (errcheck) +main.go:1255:28:warning: error return value not checked (defer taskDirsParent.Close()) (errcheck) +main.go:1268:18:warning: error return value not checked (deleteTaskDir(path)) (errcheck) +main_test.go:60:23:warning: error return value not checked (defer resp.Body.Close()) (errcheck) +model.go:122:17:warning: error return value not checked (d.DecodeElement(&v, &start)) (errcheck) +mounts.go:582:23:warning: error return value not checked (defer resp.Body.Close()) (errcheck) +mounts.go:588:15:warning: error return value not checked (defer f.Close()) (errcheck) +openpgp.go:44:10:warning: error return value not checked (w.Close()) (errcheck) +openpgp.go:70:10:warning: error return value not checked (w.Close()) (errcheck) +openpgp.go:72:16:warning: error return value not checked (privKey.Close()) (errcheck) +runtime.go:13:16:warning: error return value not checked (defer in.Close()) (errcheck) +taskstatus.go:159:24:warning: error return value not checked (task.deleteFromAzure()) (errcheck)