Skip to content

Commit

Permalink
Suppress all existing lint errors to pass CI
Browse files Browse the repository at this point in the history
I'll fix them following PRs.
  • Loading branch information
minamijoyo committed Jan 20, 2022
1 parent f222ab7 commit 13cbc5f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions command/client.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package command

import (
"github.com/minamijoyo/tfschema/tfschema"
"os"

"github.com/minamijoyo/tfschema/tfschema"
)

// NewDefaultClient creates a new Client instance.
Expand All @@ -16,4 +17,3 @@ func NewDefaultClient(providerName string) (tfschema.Client, error) {

return tfschema.NewClient(providerName, options)
}

6 changes: 3 additions & 3 deletions command/test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ func setupTestAcc(t *testing.T, providerName string, providerVersion string) {
if err != nil {
t.Fatalf("failed to get current dir: %s", err)
}
os.Chdir(workDir)
os.Chdir(workDir) // nolint: errcheck

t.Cleanup(func() {
os.Chdir(oldDir)
os.Chdir(oldDir) // nolint: errcheck
os.RemoveAll(workDir)
})

Expand All @@ -73,7 +73,7 @@ func setupTestWorkDir(source string) (string, error) {
return "", fmt.Errorf("failed to create work dir: %s", err)
}

if err := os.WriteFile(filepath.Join(workDir, "main.tf"), []byte(source), 0644); err != nil {
if err := os.WriteFile(filepath.Join(workDir, "main.tf"), []byte(source), 0644); err != nil { // nolint: gosec
os.RemoveAll(workDir)
return "", fmt.Errorf("failed to create main.tf: %s", err)
}
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func copyOutput(r io.Reader, doneCh chan<- struct{}) {
wg.Add(1)
go func() {
defer wg.Done()
io.Copy(os.Stdout, r)
io.Copy(os.Stdout, r) // nolint: errcheck
}()

wg.Wait()
Expand Down
2 changes: 1 addition & 1 deletion tfschema/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func newGRPCClientConfig(pluginMeta *discovery.PluginMeta, options Option) *plug
Logger: options.Logger,
AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC},
Managed: true,
Cmd: exec.Command(pluginMeta.Path),
Cmd: exec.Command(pluginMeta.Path), // nolint: gosec
AutoMTLS: true,
VersionedPlugins: tfplugin.VersionedPlugins,
}
Expand Down

0 comments on commit 13cbc5f

Please sign in to comment.