Skip to content

Commit 155ec5e

Browse files
committed
fix lint
1 parent e367c1d commit 155ec5e

File tree

7 files changed

+93
-93
lines changed

7 files changed

+93
-93
lines changed

cmd/skaffold/app/cmd/diagnose.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ func NewCmdDiagnose() *cobra.Command {
4848
WithExample("Search for configuration issues and print the effective configuration", "diagnose").
4949
WithExample("Print the effective skaffold.yaml configuration for given profile", "diagnose --yaml-only --profile PROFILE").
5050
WithCommonFlags().
51-
WithFlags([]*Flag{
52-
{Value: &yamlOnly, Name: "yaml-only", DefValue: false, Usage: "Only prints the effective skaffold.yaml configuration"}}).
51+
WithFlags([]*Flag{
52+
{Value: &yamlOnly, Name: "yaml-only", DefValue: false, Usage: "Only prints the effective skaffold.yaml configuration"}}).
5353
NoArgs(doDiagnose)
5454
}
5555

pkg/skaffold/deploy/helm/helm_test.go

+70-70
Large diffs are not rendered by default.

pkg/skaffold/deploy/kubectl/kubectl_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -409,21 +409,21 @@ func TestKubectlWaitForDeletions(t *testing.T) {
409409
tmpDir := t.NewTempDir().Write("deployment-web.yaml", DeploymentWebYAML)
410410

411411
t.Override(&util.DefaultExecCommand, testutil.
412-
CmdRunInputOut("kubectl --context kubecontext get -f - --ignore-not-found -ojson", DeploymentWebYAMLv1, `{
412+
CmdRunInputOut("kubectl --context kubecontext get -f - --ignore-not-found -ojson", DeploymentWebYAMLv1, `{
413413
"items":[
414414
{"metadata":{"deletionTimestamp":"2020-07-24T12:40:32Z","name":"leeroy-web"}},
415415
{"metadata":{"deletionTimestamp":"2020-07-24T12:40:32Z","name":"leeroy-app"}},
416416
{"metadata":{"name":"leeroy-front"}}
417417
]
418418
}`).
419-
AndRunInputOut("kubectl --context kubecontext get -f - --ignore-not-found -ojson", DeploymentWebYAMLv1, `{
419+
AndRunInputOut("kubectl --context kubecontext get -f - --ignore-not-found -ojson", DeploymentWebYAMLv1, `{
420420
"items":[
421421
{"metadata":{"deletionTimestamp":"2020-07-24T12:40:32Z","name":"leeroy-web"}},
422422
{"metadata":{"deletionTimestamp":"2020-07-24T12:40:32Z","name":"leeroy-app"}},
423423
{"metadata":{"name":"leeroy-front"}}
424424
]
425425
}`).
426-
AndRunInputOut("kubectl --context kubecontext get -f - --ignore-not-found -ojson", DeploymentWebYAMLv1, `{
426+
AndRunInputOut("kubectl --context kubecontext get -f - --ignore-not-found -ojson", DeploymentWebYAMLv1, `{
427427
"items":[
428428
{"metadata":{"deletionTimestamp":"2020-07-24T12:40:32Z","name":"leeroy-web"}},
429429
{"metadata":{"name":"leeroy-front"}}
@@ -464,7 +464,7 @@ func TestKubectlWaitForDeletionsFails(t *testing.T) {
464464

465465
t.Override(&client.Client, deployutil.MockK8sClient)
466466
t.Override(&util.DefaultExecCommand, testutil.
467-
CmdRunInputOut("kubectl --context kubecontext get -f - --ignore-not-found -ojson", DeploymentWebYAMLv1, `{
467+
CmdRunInputOut("kubectl --context kubecontext get -f - --ignore-not-found -ojson", DeploymentWebYAMLv1, `{
468468
"items":[
469469
{"metadata":{"deletionTimestamp":"2020-07-24T12:40:32Z","name":"leeroy-web"}},
470470
{"metadata":{"deletionTimestamp":"2020-07-24T12:40:32Z","name":"leeroy-app"}}

pkg/skaffold/lint/dockerfiles_test.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ func TestGetDockerfilesLintResults(t *testing.T) {
9191
StartColumn: 1,
9292
EndColumn: 0,
9393
Explanation: `Found docker 'COPY' command where the source directory "." has over 1000 files. This has the potential ` +
94-
`to dramatically slow 'skaffold dev' down as skaffold watches all sources files referenced in dockerfile COPY directives ` +
95-
`for changes. If you notice skaffold rebuilding images unnecessarily when non-image-critical files are modified, consider ` +
96-
`changing this to 'COPY $REQUIRED_SOURCE_FILE(s) /' for each required source file instead of or adding a .dockerignore file ` +
97-
`(https://docs.docker.com/engine/reference/builder/#dockerignore-file) ignoring non-image-critical files. skaffold respects ` +
98-
`files ignored via the .dockerignore`,
94+
`to dramatically slow 'skaffold dev' down as skaffold watches all sources files referenced in dockerfile COPY directives ` +
95+
`for changes. If you notice skaffold rebuilding images unnecessarily when non-image-critical files are modified, consider ` +
96+
`changing this to 'COPY $REQUIRED_SOURCE_FILE(s) /' for each required source file instead of or adding a .dockerignore file ` +
97+
`(https://docs.docker.com/engine/reference/builder/#dockerignore-file) ignoring non-image-critical files. skaffold respects ` +
98+
`files ignored via the .dockerignore`,
9999
},
100100
},
101101
},
@@ -130,11 +130,11 @@ func TestGetDockerfilesLintResults(t *testing.T) {
130130
StartColumn: 1,
131131
EndColumn: 0,
132132
Explanation: `Found docker 'COPY' command where the source directory "." contains a '.git' directory at .git. This has the potential ` +
133-
`to dramatically slow 'skaffold dev' down as skaffold will watch all of the files in the .git directory as skaffold watches all sources ` +
134-
`files referenced in dockerfile COPY directives for changes. skaffold will likely rebuild images unnecessarily when non-image-critical ` +
135-
`files are modified during any git related operation. Consider adding a .dockerignore file ` +
136-
`(https://docs.docker.com/engine/reference/builder/#dockerignore-file) ignoring the '.git' directory. skaffold respects files ignored ` +
137-
`via the .dockerignore`,
133+
`to dramatically slow 'skaffold dev' down as skaffold will watch all of the files in the .git directory as skaffold watches all sources ` +
134+
`files referenced in dockerfile COPY directives for changes. skaffold will likely rebuild images unnecessarily when non-image-critical ` +
135+
`files are modified during any git related operation. Consider adding a .dockerignore file ` +
136+
`(https://docs.docker.com/engine/reference/builder/#dockerignore-file) ignoring the '.git' directory. skaffold respects files ignored ` +
137+
`via the .dockerignore`,
138138
},
139139
},
140140
},

pkg/skaffold/lsp/handler.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func sendDiagnostics(ctx context.Context, diags map[string][]protocol.Diagnostic
246246
}
247247

248248
func validateFiles(ctx context.Context,
249-
opts config.SkaffoldOptions, req jsonrpc2.Request) (map[string][]protocol.Diagnostic, error) {
249+
opts config.SkaffoldOptions, req jsonrpc2.Request) (map[string][]protocol.Diagnostic, error) {
250250
// TODO(aaron-prindle) currently lint checks only filesystem, instead need to check VFS w/ documentManager info (validation uses VFS currently NOT lint)
251251

252252
// TODO(aaron-prindle) if invalid yaml and parser fails, need to handle that as well as a validation error vs server erroring
@@ -285,7 +285,7 @@ func validateFiles(ctx context.Context,
285285
}
286286

287287
func lintFiles(ctx context.Context, runCtx docker.Config,
288-
opts config.SkaffoldOptions, req jsonrpc2.Request) (map[string][]protocol.Diagnostic, error) {
288+
opts config.SkaffoldOptions, req jsonrpc2.Request) (map[string][]protocol.Diagnostic, error) {
289289
// TODO(aaron-prindle) currently lint checks only filesystem, instead need to check VFS w/ documentManager info
290290
// need to make sure something like k8a-manifest.yaml comes from afero VFS and not os FS always
291291
results, err := lint.GetAllLintResults(ctx, lint.Options{

pkg/skaffold/render/renderer/kpt/kpt_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ pipeline:
180180
t.Override(&util.DefaultExecCommand,
181181
testutil.CmdRun(fmt.Sprintf("kpt fn render %v",
182182
filepath.Join(tmpDirObj.Root(), ".kpt-pipeline"))).
183-
AndRunOut(fmt.Sprintf("kpt fn source %v -o unwrap",
184-
filepath.Join(tmpDirObj.Root(), ".kpt-pipeline")), ""))
183+
AndRunOut(fmt.Sprintf("kpt fn source %v -o unwrap",
184+
filepath.Join(tmpDirObj.Root(), ".kpt-pipeline")), ""))
185185
var b bytes.Buffer
186186
_, err = r.Render(context.Background(), &b, []graph.Artifact{{ImageName: "leeroy-web", Tag: "leeroy-web:v1"}},
187187
false)
@@ -251,8 +251,8 @@ inventory:
251251
t.Override(&util.DefaultExecCommand,
252252
testutil.CmdRun(fmt.Sprintf("kpt fn render %v",
253253
filepath.Join(tmpDirObj.Root(), ".kpt-pipeline"))).
254-
AndRunOut(fmt.Sprintf("kpt fn source %v -o unwrap",
255-
filepath.Join(tmpDirObj.Root(), ".kpt-pipeline")), ""))
254+
AndRunOut(fmt.Sprintf("kpt fn source %v -o unwrap",
255+
filepath.Join(tmpDirObj.Root(), ".kpt-pipeline")), ""))
256256
var b bytes.Buffer
257257
_, err = r.Render(context.Background(), &b, []graph.Artifact{},
258258
true)

pkg/skaffold/runner/deployer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func GetDeployer(ctx context.Context, runCtx *runcontext.RunContext, labeller *l
9696
if nonHelmDeployFound || len(helmNamespaces) > 0 {
9797
// Cloud Run doesn't support multiple deployers in the config.
9898
return nil, errors.New("skaffold apply called with both Cloud Run and Kubernetes deployers. Mixing deployment targets is not allowed" +
99-
" when using the Cloud Run deployer")
99+
" when using the Cloud Run deployer")
100100
}
101101
return getCloudRunDeployer(runCtx, labeller, pipelines.Deployers(), "")
102102
}

0 commit comments

Comments
 (0)