From 94d18e67971b7426af7144cf2f6ab632c54c6294 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Tue, 11 Feb 2020 10:53:45 +0100 Subject: [PATCH] =?UTF-8?q?Add=20nolint:=20golint=20to=20conversion=20file?= =?UTF-8?q?=20=F0=9F=91=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main reason is to not run into error forcing us to use the same receiver name for all function. The receiver name are different for a good reason. Signed-off-by: Vincent Demeester --- pkg/apis/pipeline/v1alpha1/cluster_task_conversion.go | 1 + pkg/apis/pipeline/v1alpha1/pipeline_conversion.go | 1 + pkg/apis/pipeline/v1alpha1/task_conversion.go | 1 + pkg/apis/pipeline/v1alpha2/cluster_task_conversion.go | 1 + pkg/apis/pipeline/v1alpha2/pipeline_conversion.go | 1 + pkg/apis/pipeline/v1alpha2/task_conversion.go | 1 + pkg/reconciler/taskrun/resources/apply_test.go | 4 ++-- 7 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/apis/pipeline/v1alpha1/cluster_task_conversion.go b/pkg/apis/pipeline/v1alpha1/cluster_task_conversion.go index 8b43d2fa8e1..cc08819fd10 100644 --- a/pkg/apis/pipeline/v1alpha1/cluster_task_conversion.go +++ b/pkg/apis/pipeline/v1alpha1/cluster_task_conversion.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// nolint: golint package v1alpha1 import ( diff --git a/pkg/apis/pipeline/v1alpha1/pipeline_conversion.go b/pkg/apis/pipeline/v1alpha1/pipeline_conversion.go index 5990f4b09be..ea1f0491bf1 100644 --- a/pkg/apis/pipeline/v1alpha1/pipeline_conversion.go +++ b/pkg/apis/pipeline/v1alpha1/pipeline_conversion.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// nolint: golint package v1alpha1 import ( diff --git a/pkg/apis/pipeline/v1alpha1/task_conversion.go b/pkg/apis/pipeline/v1alpha1/task_conversion.go index 18cd2d8db38..f614b75938b 100644 --- a/pkg/apis/pipeline/v1alpha1/task_conversion.go +++ b/pkg/apis/pipeline/v1alpha1/task_conversion.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// nolint: golint package v1alpha1 import ( diff --git a/pkg/apis/pipeline/v1alpha2/cluster_task_conversion.go b/pkg/apis/pipeline/v1alpha2/cluster_task_conversion.go index 5751f7ee43d..c7a96c3c725 100644 --- a/pkg/apis/pipeline/v1alpha2/cluster_task_conversion.go +++ b/pkg/apis/pipeline/v1alpha2/cluster_task_conversion.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// nolint: golint package v1alpha2 import ( diff --git a/pkg/apis/pipeline/v1alpha2/pipeline_conversion.go b/pkg/apis/pipeline/v1alpha2/pipeline_conversion.go index 520827e836a..658ecdb213c 100644 --- a/pkg/apis/pipeline/v1alpha2/pipeline_conversion.go +++ b/pkg/apis/pipeline/v1alpha2/pipeline_conversion.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// nolint: golint package v1alpha2 import ( diff --git a/pkg/apis/pipeline/v1alpha2/task_conversion.go b/pkg/apis/pipeline/v1alpha2/task_conversion.go index 887844890bf..775a2295165 100644 --- a/pkg/apis/pipeline/v1alpha2/task_conversion.go +++ b/pkg/apis/pipeline/v1alpha2/task_conversion.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// nolint: golint package v1alpha2 import ( diff --git a/pkg/reconciler/taskrun/resources/apply_test.go b/pkg/reconciler/taskrun/resources/apply_test.go index 9e8601b6c7b..b0e8dbf339b 100644 --- a/pkg/reconciler/taskrun/resources/apply_test.go +++ b/pkg/reconciler/taskrun/resources/apply_test.go @@ -730,7 +730,7 @@ func TestApplyWorkspaces(t *testing.T) { func TestTaskResults(t *testing.T) { names.TestingSeed() - ts := &v1alpha1.TaskSpec{ + ts := &v1alpha1.TaskSpec{TaskSpec: v1alpha2.TaskSpec{ Results: []v1alpha1.TaskResult{{ Name: "current-date-unix-timestamp", Description: "The current date in unix timestamp format", @@ -752,7 +752,7 @@ func TestTaskResults(t *testing.T) { }, Script: "#!/usr/bin/env bash\ndate | tee $(results.current-date-human-readable.path)", }}, - } + }} want := applyMutation(ts, func(spec *v1alpha1.TaskSpec) { spec.Steps[0].Script = "#!/usr/bin/env bash\ndate +%s | tee /tekton/results/current-date-unix-timestamp" spec.Steps[0].Args[0] = "/tekton/results/current-date-unix-timestamp"