diff --git a/regression-tests/array-params.yaml b/regression-tests/general/array-params.yaml similarity index 100% rename from regression-tests/array-params.yaml rename to regression-tests/general/array-params.yaml diff --git a/regression-tests/general/array-params.yaml.expect.json b/regression-tests/general/array-params.yaml.expect.json new file mode 100644 index 0000000..b9aed4f --- /dev/null +++ b/regression-tests/general/array-params.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Task 'array-params' defines parameter 'bar' with wrong type (only strings and arrays of strings are allowed)","rule":"no-invalid-param-type","level":"error","path":"./regression-tests/general/array-params.yaml","loc":{"range":[158,209,209],"startLine":12,"startColumn":7,"endLine":16,"endColumn":1}},{"message":"Task 'array-params' defines parameter 'baz' with wrong type (only strings and arrays of strings are allowed)","rule":"no-invalid-param-type","level":"error","path":"./regression-tests/general/array-params.yaml","loc":{"range":[215,257,257],"startLine":16,"startColumn":7,"endLine":19,"endColumn":1}},{"message":"Task 'array-params' defines parameter 'qux' with wrong type (only strings and arrays of strings are allowed)","rule":"no-invalid-param-type","level":"error","path":"./regression-tests/general/array-params.yaml","loc":{"range":[263,294,294],"startLine":19,"startColumn":7,"endLine":21,"endColumn":1}},{"message":"Pipeline 'task-param-array-pipeline' references task 'doesnt-exist' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/array-params.yaml","loc":{"range":[478,490,491],"startLine":31,"startColumn":15,"endLine":31,"endColumn":27}},{"message":"Task 'array-params' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/array-params.yaml","loc":{"range":[99,152,152],"startLine":8,"startColumn":7,"endLine":12,"endColumn":1}},{"message":"Task 'array-params' defines parameter 'bar', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/array-params.yaml","loc":{"range":[158,209,209],"startLine":12,"startColumn":7,"endLine":16,"endColumn":1}},{"message":"Task 'array-params' defines parameter 'baz', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/array-params.yaml","loc":{"range":[215,257,257],"startLine":16,"startColumn":7,"endLine":19,"endColumn":1}},{"message":"Task 'array-params' defines parameter 'qux', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/array-params.yaml","loc":{"range":[263,294,294],"startLine":19,"startColumn":7,"endLine":21,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/conditions.yaml b/regression-tests/general/conditions.yaml similarity index 100% rename from regression-tests/conditions.yaml rename to regression-tests/general/conditions.yaml diff --git a/regression-tests/general/conditions.yaml.expect.json b/regression-tests/general/conditions.yaml.expect.json new file mode 100644 index 0000000..1fa2c0a --- /dev/null +++ b/regression-tests/general/conditions.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Condition 'condition-with-invalid-param-name' defines parameter 'left!!' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/conditions.yaml","loc":{"range":[419,425,426],"startLine":24,"startColumn":13,"endLine":24,"endColumn":19}},{"message":"Pipeline 'pipeline-with-missing-condition' references Condition 'missing-condition' but the referenced Condition cannot be found. To fix this, include all the Condition definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/conditions.yaml","loc":{"range":[775,807,807],"startLine":42,"startColumn":11,"endLine":43,"endColumn":1}},{"message":"Pipeline 'pipeline-with-missing-condition' references task 'task-without-params' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/conditions.yaml","loc":{"range":[727,746,747],"startLine":40,"startColumn":15,"endLine":40,"endColumn":34}},{"message":"Pipeline 'pipeline-with-multiple-conditions' references task 'task-without-params' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/conditions.yaml","loc":{"range":[987,1006,1007],"startLine":52,"startColumn":15,"endLine":52,"endColumn":34}},{"message":"Condition 'condition-with-unused-params' defines parameter 'left', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/conditions.yaml","loc":{"range":[121,151,151],"startLine":8,"startColumn":7,"endLine":10,"endColumn":1}},{"message":"Condition 'condition-with-unused-params' defines parameter 'right', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/conditions.yaml","loc":{"range":[157,188,188],"startLine":10,"startColumn":7,"endLine":12,"endColumn":1}},{"message":"Condition 'condition-with-invalid-param-name' defines parameter 'left!!', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/conditions.yaml","loc":{"range":[413,445,445],"startLine":24,"startColumn":7,"endLine":26,"endColumn":1}},{"message":"Task 'tekton-without-params' in Pipeline 'pipeline-with-missing-condition' is guarded by condition(s) ('missing-condition'). Conditions are deprecated, use WhenExpressions instead.","rule":"prefer-when-expression","level":"warning","path":"./regression-tests/general/conditions.yaml","loc":{"range":[773,807,807],"startLine":42,"startColumn":9,"endLine":43,"endColumn":1}},{"message":"Task 'tekton-without-params' in Pipeline 'pipeline-with-multiple-conditions' is guarded by condition(s) ('condition-with-unused-params, condition-with-unused-params'). Conditions are deprecated, use WhenExpressions instead.","rule":"prefer-when-expression","level":"warning","path":"./regression-tests/general/conditions.yaml","loc":{"range":[1033,1131,1131],"startLine":54,"startColumn":9,"endLine":56,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/deprecated-resources.yaml b/regression-tests/general/deprecated-resources.yaml similarity index 100% rename from regression-tests/deprecated-resources.yaml rename to regression-tests/general/deprecated-resources.yaml diff --git a/regression-tests/general/deprecated-resources.yaml.expect.json b/regression-tests/general/deprecated-resources.yaml.expect.json new file mode 100644 index 0000000..76db950 --- /dev/null +++ b/regression-tests/general/deprecated-resources.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Task 'deprecated-task' is deprecated!","rule":"no-deprecated-resource","level":"warning","path":"./regression-tests/general/deprecated-resources.yaml","loc":{"range":[117,121,122],"startLine":7,"startColumn":28,"endLine":7,"endColumn":32}},{"message":"Pipeline 'deprecated-pipeline' is deprecated!","rule":"no-deprecated-resource","level":"warning","path":"./regression-tests/general/deprecated-resources.yaml","loc":{"range":[278,282,283],"startLine":17,"startColumn":28,"endLine":17,"endColumn":32}},{"message":"TriggerTemplate 'deprecated-triggertemplate' is deprecated!","rule":"no-deprecated-resource","level":"warning","path":"./regression-tests/general/deprecated-resources.yaml","loc":{"range":[441,445,446],"startLine":26,"startColumn":28,"endLine":26,"endColumn":32}}] \ No newline at end of file diff --git a/regression-tests/duplicate-params.yaml b/regression-tests/general/duplicate-params.yaml similarity index 100% rename from regression-tests/duplicate-params.yaml rename to regression-tests/general/duplicate-params.yaml diff --git a/regression-tests/general/duplicate-params.yaml.expect.json b/regression-tests/general/duplicate-params.yaml.expect.json new file mode 100644 index 0000000..b8cdb5b --- /dev/null +++ b/regression-tests/general/duplicate-params.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[453,456,457],"startLine":30,"startColumn":13,"endLine":30,"endColumn":16}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[153,156,157],"startLine":10,"startColumn":15,"endLine":10,"endColumn":18}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[299,302,303],"startLine":20,"startColumn":13,"endLine":20,"endColumn":16}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[1214,1217,1218],"startLine":72,"startColumn":13,"endLine":72,"endColumn":16}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[1468,1471,1472],"startLine":83,"startColumn":19,"endLine":83,"endColumn":22}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[608,611,612],"startLine":38,"startColumn":17,"endLine":38,"endColumn":20}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[851,854,855],"startLine":51,"startColumn":21,"endLine":51,"endColumn":24}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[1065,1068,1069],"startLine":63,"startColumn":19,"endLine":63,"endColumn":22}},{"message":"Task 'my-task' has a parameter 'foo' that doesn't have a value in pipeline 'duplicate-params-pipeline'.","rule":"no-invalid-param-type","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[608,611,612],"startLine":38,"startColumn":17,"endLine":38,"endColumn":20}},{"message":"Pipeline 'duplicate-params-pipeline-alpha-embedded' references task 'my-task', but parameter 'foo' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[743,855,855],"startLine":46,"startColumn":7,"endLine":52,"endColumn":1}},{"message":"Pipeline 'duplicate-params-pipeline-alpha-embedded' references task 'my-task', but parameter 'foo' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[743,855,855],"startLine":46,"startColumn":7,"endLine":52,"endColumn":1}},{"message":"Pipeline 'duplicate-params-pipeline-embedded' references task 'my-task', but parameter 'foo' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[979,1069,1069],"startLine":59,"startColumn":7,"endLine":64,"endColumn":1}},{"message":"Pipeline 'duplicate-params-pipeline-embedded' references task 'my-task', but parameter 'foo' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[979,1069,1069],"startLine":59,"startColumn":7,"endLine":64,"endColumn":1}},{"message":"Task 'duplicate-params-task-alpha' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[129,139,139],"startLine":9,"startColumn":9,"endLine":10,"endColumn":1}},{"message":"Task 'duplicate-params-task' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[277,287,287],"startLine":19,"startColumn":7,"endLine":20,"endColumn":1}},{"message":"TriggerTemplate 'duplicate-params-trigger' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[1192,1202,1202],"startLine":71,"startColumn":7,"endLine":72,"endColumn":1}},{"message":"Pipeline 'duplicate-params-pipeline' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[431,441,441],"startLine":29,"startColumn":7,"endLine":30,"endColumn":1}},{"message":"Task 'duplicate-params-task-alpha' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[16,35,36],"startLine":2,"startColumn":13,"endLine":2,"endColumn":32}},{"message":"Pipeline 'duplicate-params-pipeline-alpha-embedded' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/duplicate-params.yaml","loc":{"range":[628,647,648],"startLine":40,"startColumn":13,"endLine":40,"endColumn":32}}] \ No newline at end of file diff --git a/regression-tests/duplicate-resources.yaml b/regression-tests/general/duplicate-resources.yaml similarity index 100% rename from regression-tests/duplicate-resources.yaml rename to regression-tests/general/duplicate-resources.yaml diff --git a/regression-tests/general/duplicate-resources.yaml.expect.json b/regression-tests/general/duplicate-resources.yaml.expect.json new file mode 100644 index 0000000..7b2fda4 --- /dev/null +++ b/regression-tests/general/duplicate-resources.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"'my-duplicated-task' is already defined (as a 'Task')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/duplicate-resources.yaml","loc":{"range":[103,121,122],"startLine":10,"startColumn":9,"endLine":10,"endColumn":27}},{"message":"'my-duplicated-pipeline' is already defined (as a 'Pipeline')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/duplicate-resources.yaml","loc":{"range":[462,484,485],"startLine":30,"startColumn":9,"endLine":30,"endColumn":31}},{"message":"'my-duplicated-triggerbinding' is already defined (as a 'TriggerBinding')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/duplicate-resources.yaml","loc":{"range":[846,874,875],"startLine":50,"startColumn":9,"endLine":50,"endColumn":37}},{"message":"'my-duplicated-eventlistener' is already defined (as a 'EventListener')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/duplicate-resources.yaml","loc":{"range":[1341,1368,1369],"startLine":75,"startColumn":9,"endLine":75,"endColumn":36}},{"message":"'my-duplicated-triggertemplate' is already defined (as a 'TriggerTemplate')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/duplicate-resources.yaml","loc":{"range":[1856,1885,1886],"startLine":99,"startColumn":9,"endLine":99,"endColumn":38}},{"message":"Pipeline 'my-duplicated-pipeline' references task 'my-beta-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/duplicate-resources.yaml","loc":{"range":[558,570,571],"startLine":35,"startColumn":15,"endLine":35,"endColumn":27}},{"message":"Pipeline 'my-duplicated-pipeline' references task 'my-beta-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/duplicate-resources.yaml","loc":{"range":[635,647,648],"startLine":38,"startColumn":15,"endLine":38,"endColumn":27}}] \ No newline at end of file diff --git a/regression-tests/env.yaml b/regression-tests/general/env.yaml similarity index 100% rename from regression-tests/env.yaml rename to regression-tests/general/env.yaml diff --git a/regression-tests/general/env.yaml.expect.json b/regression-tests/general/env.yaml.expect.json new file mode 100644 index 0000000..69860e6 --- /dev/null +++ b/regression-tests/general/env.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Step 'my-step' has env variable 'FOO' duplicated in task 'env'.","rule":"no-duplicate-env","level":"error","path":"./regression-tests/general/env.yaml","loc":{"range":[192,195,196],"startLine":13,"startColumn":17,"endLine":13,"endColumn":20}}] \ No newline at end of file diff --git a/regression-tests/eventlistener-test.yaml b/regression-tests/general/eventlistener-test.yaml similarity index 100% rename from regression-tests/eventlistener-test.yaml rename to regression-tests/general/eventlistener-test.yaml diff --git a/regression-tests/general/eventlistener-test.yaml.expect.json b/regression-tests/general/eventlistener-test.yaml.expect.json new file mode 100644 index 0000000..380d742 --- /dev/null +++ b/regression-tests/general/eventlistener-test.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"EventListener 'listener-test' defines trigger binding 'binding-missing', but the trigger binding is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/eventlistener-test.yaml","loc":{"range":[131,146,147],"startLine":8,"startColumn":15,"endLine":8,"endColumn":30}},{"message":"EventListener 'listener-test' defines trigger binding 'binding-missing', but the trigger binding is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/eventlistener-test.yaml","loc":{"range":[223,238,239],"startLine":12,"startColumn":15,"endLine":12,"endColumn":30}},{"message":"EventListener 'listener-test' defines trigger template 'template-missing', but the trigger template is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/eventlistener-test.yaml","loc":{"range":[177,193,194],"startLine":10,"startColumn":15,"endLine":10,"endColumn":31}},{"message":"EventListener 'listener-test' defines trigger template 'template-missing', but the trigger template is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/eventlistener-test.yaml","loc":{"range":[269,285,286],"startLine":14,"startColumn":15,"endLine":14,"endColumn":31}},{"message":"EventListener 'uses-ref' defines trigger template 'pipeline-template', but the trigger template is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/eventlistener-test.yaml","loc":{"range":[462,479,480],"startLine":25,"startColumn":14,"endLine":25,"endColumn":31}},{"message":"EventListener 'uses-name' defines trigger template 'pipeline-template', but the trigger template is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/eventlistener-test.yaml","loc":{"range":[658,675,676],"startLine":36,"startColumn":15,"endLine":36,"endColumn":32}}] \ No newline at end of file diff --git a/regression-tests/no-deprecated-resource.yaml b/regression-tests/general/no-deprecated-resource.yaml similarity index 100% rename from regression-tests/no-deprecated-resource.yaml rename to regression-tests/general/no-deprecated-resource.yaml diff --git a/regression-tests/general/no-deprecated-resource.yaml.expect.json b/regression-tests/general/no-deprecated-resource.yaml.expect.json new file mode 100644 index 0000000..797dd2e --- /dev/null +++ b/regression-tests/general/no-deprecated-resource.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Task 'no-deprecated-resource-1' is deprecated!","rule":"no-deprecated-resource","level":"warning","path":"./regression-tests/general/no-deprecated-resource.yaml","loc":{"range":[126,130,131],"startLine":7,"startColumn":28,"endLine":7,"endColumn":32}},{"message":"Pipeline 'no-deprecated-resource-1' is deprecated!","rule":"no-deprecated-resource","level":"warning","path":"./regression-tests/general/no-deprecated-resource.yaml","loc":{"range":[386,390,391],"startLine":23,"startColumn":28,"endLine":23,"endColumn":32}}] \ No newline at end of file diff --git a/regression-tests/no-duplicate-env.yaml b/regression-tests/general/no-duplicate-env.yaml similarity index 100% rename from regression-tests/no-duplicate-env.yaml rename to regression-tests/general/no-duplicate-env.yaml diff --git a/regression-tests/general/no-duplicate-env.yaml.expect.json b/regression-tests/general/no-duplicate-env.yaml.expect.json new file mode 100644 index 0000000..186eb5a --- /dev/null +++ b/regression-tests/general/no-duplicate-env.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Step 'step-2' has env variable 'FOO' duplicated in task 'no-duplicate-env-1'.","rule":"no-duplicate-env","level":"error","path":"./regression-tests/general/no-duplicate-env.yaml","loc":{"range":[393,396,397],"startLine":25,"startColumn":17,"endLine":25,"endColumn":20}},{"message":"StepTemplate has env variable 'FOO' duplicated in task 'no-duplicate-env-2'.","rule":"no-duplicate-env","level":"error","path":"./regression-tests/general/no-duplicate-env.yaml","loc":{"range":[733,736,737],"startLine":48,"startColumn":15,"endLine":48,"endColumn":18}},{"message":"Invalid image: 'alpine'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/no-duplicate-env.yaml","loc":{"range":[130,136,137],"startLine":9,"startColumn":14,"endLine":9,"endColumn":20}},{"message":"Invalid image: 'alpine'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/no-duplicate-env.yaml","loc":{"range":[318,324,325],"startLine":21,"startColumn":14,"endLine":21,"endColumn":20}},{"message":"Invalid image: 'alpine'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/no-duplicate-env.yaml","loc":{"range":[506,512,513],"startLine":33,"startColumn":14,"endLine":33,"endColumn":20}},{"message":"Invalid image: 'alpine'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/no-duplicate-env.yaml","loc":{"range":[797,803,804],"startLine":52,"startColumn":14,"endLine":52,"endColumn":20}},{"message":"Invalid image: 'alpine'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/no-duplicate-env.yaml","loc":{"range":[1051,1057,1058],"startLine":69,"startColumn":14,"endLine":69,"endColumn":20}}] \ No newline at end of file diff --git a/regression-tests/no-duplicate-param.yaml b/regression-tests/general/no-duplicate-param.yaml similarity index 100% rename from regression-tests/no-duplicate-param.yaml rename to regression-tests/general/no-duplicate-param.yaml diff --git a/regression-tests/general/no-duplicate-param.yaml.expect.json b/regression-tests/general/no-duplicate-param.yaml.expect.json new file mode 100644 index 0000000..b75c3eb --- /dev/null +++ b/regression-tests/general/no-duplicate-param.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[157,160,161],"startLine":10,"startColumn":13,"endLine":10,"endColumn":16}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[311,314,315],"startLine":20,"startColumn":13,"endLine":20,"endColumn":16}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[642,645,646],"startLine":40,"startColumn":13,"endLine":40,"endColumn":16}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[799,802,803],"startLine":50,"startColumn":13,"endLine":50,"endColumn":16}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[1522,1525,1526],"startLine":82,"startColumn":19,"endLine":82,"endColumn":22}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[488,491,492],"startLine":30,"startColumn":17,"endLine":30,"endColumn":20}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[413,416,417],"startLine":26,"startColumn":19,"endLine":26,"endColumn":22}},{"message":"Task 'no-duplicate-param-3' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[620,630,630],"startLine":39,"startColumn":7,"endLine":40,"endColumn":1}},{"message":"TriggerTemplate 'no-duplicate-param-4' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[777,787,787],"startLine":49,"startColumn":7,"endLine":50,"endColumn":1}},{"message":"Pipeline 'no-duplicate-param-2' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-duplicate-param.yaml","loc":{"range":[289,299,299],"startLine":19,"startColumn":7,"endLine":20,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/no-extra-param.yaml b/regression-tests/general/no-extra-param.yaml similarity index 100% rename from regression-tests/no-extra-param.yaml rename to regression-tests/general/no-extra-param.yaml diff --git a/regression-tests/general/no-extra-param.yaml.expect.json b/regression-tests/general/no-extra-param.yaml.expect.json new file mode 100644 index 0000000..451165b --- /dev/null +++ b/regression-tests/general/no-extra-param.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Pipeline 'no-extra-param-pipeline' references task 'no-extra-param-task' (as 'step-1'), and supplies parameter 'foo' to it, but it's not a valid parameter","rule":"no-extra-param","level":"error","path":"./regression-tests/general/no-extra-param.yaml","loc":{"range":[301,332,332],"startLine":19,"startColumn":11,"endLine":21,"endColumn":1}},{"message":"Pipeline 'no-extra-param-pipeline' references task 'step-1', and supplies parameter 'foo' to it, but it's not a valid parameter","rule":"no-extra-param","level":"error","path":"./regression-tests/general/no-extra-param.yaml","loc":{"range":[409,440,440],"startLine":25,"startColumn":11,"endLine":27,"endColumn":1}},{"message":"TriggerTemplate 'no-extra-param-template' references pipeline 'no-extra-param-pipeline', and supplies 'foo', but it's not a valid parameter.","rule":"no-extra-param","level":"error","path":"./regression-tests/general/no-extra-param.yaml","loc":{"range":[774,807,807],"startLine":42,"startColumn":13,"endLine":44,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/no-invalid-name.yaml b/regression-tests/general/no-invalid-name.yaml similarity index 100% rename from regression-tests/no-invalid-name.yaml rename to regression-tests/general/no-invalid-name.yaml diff --git a/regression-tests/general/no-invalid-name.yaml.expect.json b/regression-tests/general/no-invalid-name.yaml.expect.json new file mode 100644 index 0000000..6baf269 --- /dev/null +++ b/regression-tests/general/no-invalid-name.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Task 'no-invalid-name' defines parameter '1-foo' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1767,1772,1782],"startLine":101,"startColumn":13,"endLine":101,"endColumn":18}},{"message":"Task 'no-invalid-name' defines parameter '-foo' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1794,1798,1808],"startLine":102,"startColumn":13,"endLine":102,"endColumn":17}},{"message":"Task 'no-invalid-name' defines parameter 'foo$bar' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1842,1849,1859],"startLine":104,"startColumn":13,"endLine":104,"endColumn":20}},{"message":"Invalid name for Task 'no-invalid-name-FooBar'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[64,86,96],"startLine":5,"startColumn":9,"endLine":5,"endColumn":31}},{"message":"Invalid name for Task 'no-invalid-name_foo'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[610,629,639],"startLine":40,"startColumn":9,"endLine":40,"endColumn":28}},{"message":"TriggerTemplate 'no-invalid-name' references pipeline 'no-invalid-name', but the referenced pipeline cannot be found.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1249,1264,1265],"startLine":77,"startColumn":17,"endLine":77,"endColumn":32}},{"message":"TriggerTemplate 'no-invalid-name' references pipeline 'no-invalid-name', but the referenced pipeline cannot be found.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1426,1441,1442],"startLine":84,"startColumn":17,"endLine":84,"endColumn":32}},{"message":"Task 'no-invalid-name' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1544,1559,1559],"startLine":92,"startColumn":7,"endLine":93,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter 'foo-', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1565,1581,1581],"startLine":93,"startColumn":7,"endLine":94,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter 'foo_', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1587,1603,1603],"startLine":94,"startColumn":7,"endLine":95,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter 'FOO_BAR', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1609,1628,1628],"startLine":95,"startColumn":7,"endLine":96,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter 'FooBar', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1634,1652,1652],"startLine":96,"startColumn":7,"endLine":97,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter 'fooBar', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1658,1676,1676],"startLine":97,"startColumn":7,"endLine":98,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter 'foo-bar', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1682,1701,1701],"startLine":98,"startColumn":7,"endLine":99,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter 'foo-1-bar', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1707,1728,1728],"startLine":99,"startColumn":7,"endLine":100,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter 'foo_1-bar', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1734,1755,1755],"startLine":100,"startColumn":7,"endLine":101,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter '1-foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1761,1782,1782],"startLine":101,"startColumn":7,"endLine":102,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter '-foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1788,1808,1808],"startLine":102,"startColumn":7,"endLine":103,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter '_foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1814,1830,1830],"startLine":103,"startColumn":7,"endLine":104,"endColumn":1}},{"message":"Task 'no-invalid-name' defines parameter 'foo$bar', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/no-invalid-name.yaml","loc":{"range":[1836,1859,1859],"startLine":104,"startColumn":7,"endLine":105,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/no-latest-image.yaml b/regression-tests/general/no-latest-image.yaml similarity index 100% rename from regression-tests/no-latest-image.yaml rename to regression-tests/general/no-latest-image.yaml diff --git a/regression-tests/general/no-latest-image.yaml.expect.json b/regression-tests/general/no-latest-image.yaml.expect.json new file mode 100644 index 0000000..aa7f4ec --- /dev/null +++ b/regression-tests/general/no-latest-image.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Invalid image: 'alpine:latest'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/no-latest-image.yaml","loc":{"range":[129,142,143],"startLine":9,"startColumn":14,"endLine":9,"endColumn":27}},{"message":"Invalid image: 'alpine'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/no-latest-image.yaml","loc":{"range":[229,235,236],"startLine":14,"startColumn":14,"endLine":14,"endColumn":20}},{"message":"Invalid image: 'alpine'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/no-latest-image.yaml","loc":{"range":[611,617,618],"startLine":35,"startColumn":12,"endLine":35,"endColumn":18}}] \ No newline at end of file diff --git a/regression-tests/no-missing-hashbang.yaml b/regression-tests/general/no-missing-hashbang.yaml similarity index 100% rename from regression-tests/no-missing-hashbang.yaml rename to regression-tests/general/no-missing-hashbang.yaml diff --git a/regression-tests/general/no-missing-hashbang.yaml.expect.json b/regression-tests/general/no-missing-hashbang.yaml.expect.json new file mode 100644 index 0000000..2491f3a --- /dev/null +++ b/regression-tests/general/no-missing-hashbang.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Step script 'step-1' should start with a hashbang line.","rule":"no-missing-hashbang","level":"warning","path":"./regression-tests/general/no-missing-hashbang.yaml","loc":{"range":[376,398,398],"startLine":22,"startColumn":15,"endLine":24,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/param-names.yaml b/regression-tests/general/param-names.yaml similarity index 100% rename from regression-tests/param-names.yaml rename to regression-tests/general/param-names.yaml diff --git a/regression-tests/general/param-names.yaml.expect.json b/regression-tests/general/param-names.yaml.expect.json new file mode 100644 index 0000000..f78ef64 --- /dev/null +++ b/regression-tests/general/param-names.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Task 'param-names-task' defines parameter '1foo' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/param-names.yaml","loc":{"range":[109,113,114],"startLine":8,"startColumn":13,"endLine":8,"endColumn":17}},{"message":"Task 'param-names-task' defines parameter 'fo o' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/param-names.yaml","loc":{"range":[126,130,131],"startLine":9,"startColumn":13,"endLine":9,"endColumn":17}},{"message":"TriggerTemplate 'param-names-trigger' defines parameter '1foo' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/param-names.yaml","loc":{"range":[418,422,423],"startLine":28,"startColumn":13,"endLine":28,"endColumn":17}},{"message":"TriggerTemplate 'param-names-trigger' defines parameter 'fo o' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/param-names.yaml","loc":{"range":[435,439,440],"startLine":29,"startColumn":13,"endLine":29,"endColumn":17}},{"message":"Pipeline 'param-names-pipeline' defines parameter '1foo' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/param-names.yaml","loc":{"range":[260,264,265],"startLine":18,"startColumn":13,"endLine":18,"endColumn":17}},{"message":"Pipeline 'param-names-pipeline' defines parameter 'fo o' with invalid parameter name (names are limited to alpha-numeric characters, '-' and '_' and can only start with alpha characters and '_')","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/param-names.yaml","loc":{"range":[277,281,282],"startLine":19,"startColumn":13,"endLine":19,"endColumn":17}},{"message":"Task 'param-names-task' defines parameter '1foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/param-names.yaml","loc":{"range":[103,114,114],"startLine":8,"startColumn":7,"endLine":9,"endColumn":1}},{"message":"Task 'param-names-task' defines parameter 'fo o', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/param-names.yaml","loc":{"range":[120,131,131],"startLine":9,"startColumn":7,"endLine":10,"endColumn":1}},{"message":"TriggerTemplate 'param-names-trigger' defines parameter '1foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/param-names.yaml","loc":{"range":[412,423,423],"startLine":28,"startColumn":7,"endLine":29,"endColumn":1}},{"message":"TriggerTemplate 'param-names-trigger' defines parameter 'fo o', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/param-names.yaml","loc":{"range":[429,440,440],"startLine":29,"startColumn":7,"endLine":30,"endColumn":1}},{"message":"Pipeline 'param-names-pipeline' defines parameter '1foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/param-names.yaml","loc":{"range":[254,265,265],"startLine":18,"startColumn":7,"endLine":19,"endColumn":1}},{"message":"Pipeline 'param-names-pipeline' defines parameter 'fo o', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/param-names.yaml","loc":{"range":[271,282,282],"startLine":19,"startColumn":7,"endLine":20,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/pipeline-test.yaml b/regression-tests/general/pipeline-test.yaml similarity index 100% rename from regression-tests/pipeline-test.yaml rename to regression-tests/general/pipeline-test.yaml diff --git a/regression-tests/general/pipeline-test.yaml.expect.json b/regression-tests/general/pipeline-test.yaml.expect.json new file mode 100644 index 0000000..1777e0e --- /dev/null +++ b/regression-tests/general/pipeline-test.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"'pipeline-with-taskspec' is already defined (as a 'Pipeline')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[6938,6960,6961],"startLine":267,"startColumn":9,"endLine":267,"endColumn":31}},{"message":"'pipeline-with-taskspec' is already defined (as a 'Pipeline')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[7236,7258,7259],"startLine":283,"startColumn":9,"endLine":283,"endColumn":31}},{"message":"'pipeline-with-taskspec' is already defined (as a 'Pipeline')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[7501,7523,7524],"startLine":298,"startColumn":9,"endLine":298,"endColumn":31}},{"message":"Pipeline 'pipeline-with-taskspec-2' references task 'taskspec-with-extra-and-missing-params', and supplies parameter 'foo' to it, but it's not a valid parameter","rule":"no-extra-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[6831,6869,6869],"startLine":261,"startColumn":11,"endLine":263,"endColumn":1}},{"message":"Pipeline 'check-kebab-names-when-there-are-no-pipeline-params' references task 'BAD_TASK_NAME', and supplies parameter 'BAD_PARAM_NAME' to it, but it's not a valid parameter","rule":"no-extra-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[10960,11006,11006],"startLine":465,"startColumn":11,"endLine":467,"endColumn":1}},{"message":"TriggerTemplate 'template-for-pipeline-params-tests' references pipeline 'pipeline-with-missing-and-extra-params', and supplies 'extra-param', but it's not a valid parameter.","rule":"no-extra-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[5869,5910,5910],"startLine":215,"startColumn":13,"endLine":217,"endColumn":1}},{"message":"Cycle found in tasks (dependency graph): my-task-1 -> my-task-1","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[8354,8363,8364],"startLine":350,"startColumn":13,"endLine":350,"endColumn":22}},{"message":"Pipeline 'check-kebab-names-when-there-are-no-pipeline-params' references task 'BAD_TASK_NAME', but parameter 'BAD_TASK_PARAM_NAME_123' is not supplied (it's a required param in 'BAD_TASK_NAME')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[10958,11006,11006],"startLine":465,"startColumn":9,"endLine":467,"endColumn":1}},{"message":"Pipeline 'pipeline-with-missing-and-extra-params' references param 'missing-param', but it is not supplied in triggerTemplate 'template-for-pipeline-params-tests'","rule":"no-missing-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[5602,5910,5910],"startLine":205,"startColumn":7,"endLine":217,"endColumn":1}},{"message":"Pipeline 'pipeline-with-params' references task 'task-with-params' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[799,815,816],"startLine":28,"startColumn":15,"endLine":28,"endColumn":31}},{"message":"Pipeline 'pipeline-without-params' references task 'task-with-params' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1231,1247,1248],"startLine":46,"startColumn":15,"endLine":46,"endColumn":31}},{"message":"Pipeline 'pipeline-without-params' references task 'git-clone' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1531,1540,1541],"startLine":56,"startColumn":15,"endLine":56,"endColumn":24}},{"message":"Pipeline 'pipeline-without-params' references task 'yaml-lint' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1947,1956,1957],"startLine":72,"startColumn":15,"endLine":72,"endColumn":24}},{"message":"Pipeline 'pipeline-with-null-params' references task 'get-git-credentials' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2429,2448,2449],"startLine":94,"startColumn":15,"endLine":94,"endColumn":34}},{"message":"Pipeline 'pipeline-with-taskref-without-name' references task 'null' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[3504,3504,3504],"startLine":130,"startColumn":14,"endLine":130,"endColumn":14}},{"message":"Pipeline 'pipeline-with-taskref-without-params' references task 'task-without-params' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4563,4582,4583],"startLine":166,"startColumn":15,"endLine":166,"endColumn":34}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' references task 'task-without-params' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[5424,5443,5444],"startLine":196,"startColumn":15,"endLine":196,"endColumn":34}},{"message":"Pipeline 'pipeline-task-missing-runafter' references task 'foo-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[7837,7845,7846],"startLine":318,"startColumn":14,"endLine":318,"endColumn":22}},{"message":"Pipeline 'pipeline-task-missing-runafter' references task 'bar-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[7941,7949,7950],"startLine":324,"startColumn":14,"endLine":324,"endColumn":22}},{"message":"Pipeline 'pipeline-task-with-null-runafter' references task 'foo-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[8138,8146,8147],"startLine":336,"startColumn":14,"endLine":336,"endColumn":22}},{"message":"Pipeline 'pipeline-task-with-null-runafter' references task 'bar-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[8229,8237,8238],"startLine":342,"startColumn":14,"endLine":342,"endColumn":22}},{"message":"Pipeline 'pipeline-with-missing-task-in-param' references task 'tekton-task-with-4-params' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[9492,9517,9518],"startLine":402,"startColumn":15,"endLine":402,"endColumn":40}},{"message":"Pipeline 'pipeline-without-params' uses task 'clone' (referenced as 'git-clone'), and it depends on 'get-git-credentials', which doesn't exists (declared in runAfter)","rule":"no-pipeline-missing-task","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1565,1587,1587],"startLine":58,"startColumn":9,"endLine":59,"endColumn":1}},{"message":"Pipeline 'pipeline-task-missing-runafter' uses task 'bar' (referenced as 'bar-task'), and it depends on 'runafter-test', which doesn't exists (declared in runAfter)","rule":"no-pipeline-missing-task","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[7898,7914,7914],"startLine":322,"startColumn":7,"endLine":323,"endColumn":1}},{"message":"Pipeline 'pipeline-task-with-null-runafter' uses task 'bar' (referenced as 'bar-task'), and it depends on 'null', which doesn't exists (declared in runAfter)","rule":"no-pipeline-missing-task","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[8199,8201,8201],"startLine":340,"startColumn":7,"endLine":340,"endColumn":9}},{"message":"Pipeline 'pipeline-taskspec-invalid-runafters' uses task 'my-task-1' (defined in-line), and it depends on 'this-task-is-not-present', which doesn't exists (declared in runAfter)","rule":"no-pipeline-missing-task","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[8388,8435,8435],"startLine":352,"startColumn":9,"endLine":354,"endColumn":1}},{"message":"Undefined param 'pipeline-pvc' at .spec.tasks[0].params[0].value in 'pipeline-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1311,1333,1334],"startLine":49,"startColumn":18,"endLine":49,"endColumn":40}},{"message":"Undefined param 'ibm-cloud-api-key' at .spec.tasks[0].params[1].value in 'pipeline-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1384,1411,1412],"startLine":51,"startColumn":18,"endLine":51,"endColumn":45}},{"message":"Undefined param 'statuses_base_url' at .spec.tasks[0].params[2].value in 'pipeline-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1456,1483,1484],"startLine":53,"startColumn":18,"endLine":53,"endColumn":45}},{"message":"Undefined param 'pipeline-pvc' at .spec.tasks[1].params[0].value in 'pipeline-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1643,1665,1666],"startLine":61,"startColumn":18,"endLine":61,"endColumn":40}},{"message":"Undefined param 'repository' at .spec.tasks[1].params[1].value in 'pipeline-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1710,1730,1731],"startLine":63,"startColumn":18,"endLine":63,"endColumn":38}},{"message":"Undefined param 'branch' at .spec.tasks[1].params[2].value in 'pipeline-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1771,1787,1788],"startLine":65,"startColumn":18,"endLine":65,"endColumn":34}},{"message":"Undefined param 'revision' at .spec.tasks[1].params[4].value in 'pipeline-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1879,1897,1898],"startLine":69,"startColumn":18,"endLine":69,"endColumn":36}},{"message":"Undefined param 'statuses_url' at .spec.tasks[2].params[2].value in 'pipeline-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2160,2182,2183],"startLine":81,"startColumn":18,"endLine":81,"endColumn":40}},{"message":"Undefined param 'pipeline-pvc' at .spec.tasks[2].params[3].value in 'pipeline-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2225,2247,2248],"startLine":83,"startColumn":18,"endLine":83,"endColumn":40}},{"message":"Undefined param 'pipeline-pvc' at .spec.tasks[0].params[0].value in 'pipeline-with-null-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2512,2534,2535],"startLine":97,"startColumn":18,"endLine":97,"endColumn":40}},{"message":"Undefined param 'ibm-cloud-api-key' at .spec.tasks[0].params[1].value in 'pipeline-with-null-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2585,2612,2613],"startLine":99,"startColumn":18,"endLine":99,"endColumn":45}},{"message":"Undefined param 'statuses_base_url' at .spec.tasks[0].params[2].value in 'pipeline-with-null-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2657,2684,2685],"startLine":101,"startColumn":18,"endLine":101,"endColumn":45}},{"message":"Undefined param 'my-param' at .spec.tasks[0].params[0].value in 'my-pipeline'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[10191,10209,10210],"startLine":432,"startColumn":18,"endLine":432,"endColumn":36}},{"message":"In Pipeline 'my-pipeline-with-undefined-result-reference' the value on path '.spec.tasks[1].params[1].value' refers to an undefined output result (as '$(tasks.first-task.results.bar)' - 'bar' is not a result in Task 'first-task')","rule":"no-undefined-result","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[9023,9054,9055],"startLine":379,"startColumn":18,"endLine":379,"endColumn":49}},{"message":"Task 'tekton-task-with-4-params' refers to task 'missing' at value of param 'my-param1' but there is no task with that name in pipeline 'pipeline-with-missing-task-in-param'","rule":"no-undefined-result","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[9575,9603,9604],"startLine":405,"startColumn":18,"endLine":405,"endColumn":46}},{"message":"Task 'tekton-task-with-4-params' refers to task 'another' at value of param 'my-param2' but there is no task with that name in pipeline 'pipeline-with-missing-task-in-param'","rule":"no-undefined-result","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[9647,9677,9678],"startLine":407,"startColumn":18,"endLine":407,"endColumn":48}},{"message":"Task 'tekton-task-with-4-params' refers to task 'incident-issues-of-va-scan' at value of param 'my-param3' but there is no task with that name in pipeline 'pipeline-with-missing-task-in-param'","rule":"no-undefined-result","level":"error","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[9721,9821,9821],"startLine":409,"startColumn":18,"endLine":413,"endColumn":1}},{"message":"Pipeline 'pipeline-with-params' defines parameter 'statuses_url', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[108,171,171],"startLine":7,"startColumn":7,"endLine":9,"endColumn":1}},{"message":"Pipeline 'pipeline-with-params' defines parameter 'repository', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[401,450,450],"startLine":15,"startColumn":7,"endLine":17,"endColumn":1}},{"message":"Pipeline 'pipeline-with-params' defines parameter 'branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[456,516,516],"startLine":17,"startColumn":7,"endLine":19,"endColumn":1}},{"message":"Pipeline 'pipeline-with-params' defines parameter 'origin', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[522,584,584],"startLine":19,"startColumn":7,"endLine":21,"endColumn":1}},{"message":"Pipeline 'pipeline-with-params' defines parameter 'revision', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[590,732,732],"startLine":21,"startColumn":7,"endLine":25,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-name' defines parameter 'statuses_url', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2811,2874,2874],"startLine":109,"startColumn":7,"endLine":111,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-name' defines parameter 'repository', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[3104,3153,3153],"startLine":117,"startColumn":7,"endLine":119,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-name' defines parameter 'branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[3159,3219,3219],"startLine":119,"startColumn":7,"endLine":121,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-name' defines parameter 'origin', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[3225,3287,3287],"startLine":121,"startColumn":7,"endLine":123,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-name' defines parameter 'revision', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[3293,3435,3435],"startLine":123,"startColumn":7,"endLine":127,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-params' defines parameter 'statuses_url', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[3869,3932,3932],"startLine":145,"startColumn":7,"endLine":147,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-params' defines parameter 'statuses_base_url', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[3938,4023,4023],"startLine":147,"startColumn":7,"endLine":149,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-params' defines parameter 'pipeline-pvc', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4029,4089,4089],"startLine":149,"startColumn":7,"endLine":151,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-params' defines parameter 'ibm-cloud-api-key', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4095,4156,4156],"startLine":151,"startColumn":7,"endLine":153,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-params' defines parameter 'repository', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4162,4211,4211],"startLine":153,"startColumn":7,"endLine":155,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-params' defines parameter 'branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4217,4277,4277],"startLine":155,"startColumn":7,"endLine":157,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-params' defines parameter 'origin', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4283,4345,4345],"startLine":157,"startColumn":7,"endLine":159,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-without-params' defines parameter 'revision', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4351,4493,4493],"startLine":159,"startColumn":7,"endLine":163,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' defines parameter 'statuses_url', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4730,4793,4793],"startLine":175,"startColumn":7,"endLine":177,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' defines parameter 'statuses_base_url', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4799,4884,4884],"startLine":177,"startColumn":7,"endLine":179,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' defines parameter 'pipeline-pvc', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4890,4950,4950],"startLine":179,"startColumn":7,"endLine":181,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' defines parameter 'ibm-cloud-api-key', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4956,5017,5017],"startLine":181,"startColumn":7,"endLine":183,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' defines parameter 'repository', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[5023,5072,5072],"startLine":183,"startColumn":7,"endLine":185,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' defines parameter 'branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[5078,5138,5138],"startLine":185,"startColumn":7,"endLine":187,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' defines parameter 'origin', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[5144,5206,5206],"startLine":187,"startColumn":7,"endLine":189,"endColumn":1}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' defines parameter 'revision', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[5212,5354,5354],"startLine":189,"startColumn":7,"endLine":193,"endColumn":1}},{"message":"Pipeline 'pipeline-with-missing-and-extra-params' defines parameter 'ok-param', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[6040,6094,6094],"startLine":224,"startColumn":7,"endLine":226,"endColumn":1}},{"message":"Pipeline 'pipeline-with-missing-and-extra-params' defines parameter 'missing-param', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[6100,6166,6166],"startLine":226,"startColumn":7,"endLine":228,"endColumn":1}},{"message":"Pipeline 'pipeline-with-missing-and-extra-params' defines parameter 'default-param', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[6172,6263,6263],"startLine":228,"startColumn":7,"endLine":231,"endColumn":1}},{"message":"Pipeline 'pipeline-with-params' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[12,31,32],"startLine":1,"startColumn":13,"endLine":1,"endColumn":32}},{"message":"Pipeline 'pipeline-without-params' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1068,1087,1088],"startLine":37,"startColumn":13,"endLine":37,"endColumn":32}},{"message":"Pipeline 'pipeline-with-null-params' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2264,2283,2284],"startLine":85,"startColumn":13,"endLine":85,"endColumn":32}},{"message":"Pipeline 'pipeline-with-taskref-without-name' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2701,2720,2721],"startLine":103,"startColumn":13,"endLine":103,"endColumn":32}},{"message":"Pipeline 'pipeline-with-taskref-without-params' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[3757,3776,3777],"startLine":139,"startColumn":13,"endLine":139,"endColumn":32}},{"message":"Pipeline 'pipeline-with-taskref-with-null-params' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[4616,4635,4636],"startLine":169,"startColumn":13,"endLine":169,"endColumn":32}},{"message":"Pipeline 'pipeline-with-missing-and-extra-params' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[5926,5945,5946],"startLine":218,"startColumn":13,"endLine":218,"endColumn":32}},{"message":"Pipeline 'pipeline-with-taskspec' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[7448,7467,7468],"startLine":295,"startColumn":13,"endLine":295,"endColumn":32}},{"message":"Pipeline 'pipeline-with-taskspec-2' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[6616,6635,6636],"startLine":250,"startColumn":13,"endLine":250,"endColumn":32}},{"message":"Pipeline 'pipeline-task-missing-runafter' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[7683,7702,7703],"startLine":309,"startColumn":13,"endLine":309,"endColumn":32}},{"message":"Pipeline 'pipeline-task-with-null-runafter' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[7982,8001,8002],"startLine":327,"startColumn":13,"endLine":327,"endColumn":32}},{"message":"Invalid name for 'statuses_base_url' at .spec.tasks[0].params[2].value in 'pipeline-with-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1024,1051,1052],"startLine":35,"startColumn":18,"endLine":35,"endColumn":45}},{"message":"Invalid name for 'statuses_base_url' at .spec.tasks[0].params[2].value in 'pipeline-without-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[1456,1483,1484],"startLine":53,"startColumn":18,"endLine":53,"endColumn":45}},{"message":"Invalid name for 'fail_task' at .spec.tasks[2].params[1].name in 'pipeline-without-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2080,2089,2090],"startLine":78,"startColumn":17,"endLine":78,"endColumn":26}},{"message":"Invalid name for 'statuses_url' at .spec.tasks[2].params[2].name in 'pipeline-without-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2130,2142,2143],"startLine":80,"startColumn":17,"endLine":80,"endColumn":29}},{"message":"Invalid name for 'statuses_url' at .spec.tasks[2].params[2].value in 'pipeline-without-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2160,2182,2183],"startLine":81,"startColumn":18,"endLine":81,"endColumn":40}},{"message":"Invalid name for 'statuses_base_url' at .spec.tasks[0].params[2].value in 'pipeline-with-null-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[2657,2684,2685],"startLine":101,"startColumn":18,"endLine":101,"endColumn":45}},{"message":"Invalid name for 'statuses_base_url' at .spec.tasks[0].params[2].value in 'pipeline-with-taskref-without-name'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[3713,3740,3741],"startLine":137,"startColumn":18,"endLine":137,"endColumn":45}},{"message":"Invalid name for 'BAD_TASK_NAME' at .spec.tasks[0].name in 'check-kebab-names-when-there-are-no-pipeline-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[10922,10935,10936],"startLine":463,"startColumn":13,"endLine":463,"endColumn":26}},{"message":"Invalid name for 'BAD_PARAM_NAME' at .spec.tasks[0].params[0].name in 'check-kebab-names-when-there-are-no-pipeline-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[10966,10980,10981],"startLine":465,"startColumn":17,"endLine":465,"endColumn":31}},{"message":"Invalid name for 'BAD_TASK_PARAM_NAME_123' at .spec.tasks[0].taskSpec.params[0].name in 'check-kebab-names-when-there-are-no-pipeline-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[11056,11079,11080],"startLine":469,"startColumn":19,"endLine":469,"endColumn":42}},{"message":"Invalid name for 'BAD_STEP_NAME' at .spec.tasks[0].taskSpec.steps[0].name in 'check-kebab-names-when-there-are-no-pipeline-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"prefer-kebab-case","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[11213,11226,11227],"startLine":475,"startColumn":19,"endLine":475,"endColumn":32}},{"message":"Step script 'my-step' should start with a hashbang line.","rule":"no-missing-hashbang","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[9259,9305,9306],"startLine":392,"startColumn":15,"endLine":392,"endColumn":61}},{"message":"Step script 'step-1' should start with a hashbang line.","rule":"no-missing-hashbang","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[8561,8599,8599],"startLine":358,"startColumn":21,"endLine":360,"endColumn":1}},{"message":"Step script 'my-step' should start with a hashbang line.","rule":"no-missing-hashbang","level":"warning","path":"./regression-tests/general/pipeline-test.yaml","loc":{"range":[10095,10135,10135],"startLine":428,"startColumn":21,"endLine":430,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/prefer-when-expression.yaml b/regression-tests/general/prefer-when-expression.yaml similarity index 100% rename from regression-tests/prefer-when-expression.yaml rename to regression-tests/general/prefer-when-expression.yaml diff --git a/regression-tests/general/prefer-when-expression.yaml.expect.json b/regression-tests/general/prefer-when-expression.yaml.expect.json new file mode 100644 index 0000000..eafed25 --- /dev/null +++ b/regression-tests/general/prefer-when-expression.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Pipeline 'prefer-when-expression' references Condition 'condition' but the referenced Condition cannot be found. To fix this, include all the Condition definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/prefer-when-expression.yaml","loc":{"range":[186,210,210],"startLine":12,"startColumn":11,"endLine":13,"endColumn":1}},{"message":"Pipeline 'prefer-when-expression' references task 'task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/prefer-when-expression.yaml","loc":{"range":[153,157,158],"startLine":10,"startColumn":15,"endLine":10,"endColumn":19}},{"message":"Pipeline 'prefer-when-expression' references task 'task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/prefer-when-expression.yaml","loc":{"range":[258,262,263],"startLine":15,"startColumn":15,"endLine":15,"endColumn":19}},{"message":"Task 'task-1' in Pipeline 'prefer-when-expression' is guarded by condition(s) ('condition'). Conditions are deprecated, use WhenExpressions instead.","rule":"prefer-when-expression","level":"warning","path":"./regression-tests/general/prefer-when-expression.yaml","loc":{"range":[184,210,210],"startLine":12,"startColumn":9,"endLine":13,"endColumn":1}},{"message":"Task 'task-1' in PipelineRun 'prefer-when-expression-run' is guarded by condition(s) ('condition'). Conditions are deprecated, use WhenExpressions instead.","rule":"prefer-when-expression","level":"warning","path":"./regression-tests/general/prefer-when-expression.yaml","loc":{"range":[676,702,702],"startLine":34,"startColumn":17,"endLine":35,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/results-missing-tasks.yaml b/regression-tests/general/results-missing-tasks.yaml similarity index 100% rename from regression-tests/results-missing-tasks.yaml rename to regression-tests/general/results-missing-tasks.yaml diff --git a/regression-tests/general/results-missing-tasks.yaml.expect.json b/regression-tests/general/results-missing-tasks.yaml.expect.json new file mode 100644 index 0000000..2c3b884 --- /dev/null +++ b/regression-tests/general/results-missing-tasks.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Pipeline 'pipeline-with-results-and-missing-tasks' references task 'a-missing-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/results-missing-tasks.yaml","loc":{"range":[175,189,190],"startLine":10,"startColumn":15,"endLine":10,"endColumn":29}},{"message":"Step script 'first-step' should start with a hashbang line.","rule":"no-missing-hashbang","level":"warning","path":"./regression-tests/general/results-missing-tasks.yaml","loc":{"range":[320,373,373],"startLine":16,"startColumn":21,"endLine":18,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/retries.yaml b/regression-tests/general/retries.yaml similarity index 100% rename from regression-tests/retries.yaml rename to regression-tests/general/retries.yaml diff --git a/regression-tests/general/retries.yaml.expect.json b/regression-tests/general/retries.yaml.expect.json new file mode 100644 index 0000000..866c95d --- /dev/null +++ b/regression-tests/general/retries.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Pipeline 'pipeline-with-retries' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/retries.yaml","loc":{"range":[167,174,175],"startLine":11,"startColumn":15,"endLine":11,"endColumn":22}}] \ No newline at end of file diff --git a/regression-tests/run-after.yaml b/regression-tests/general/run-after.yaml similarity index 100% rename from regression-tests/run-after.yaml rename to regression-tests/general/run-after.yaml diff --git a/regression-tests/general/run-after.yaml.expect.json b/regression-tests/general/run-after.yaml.expect.json new file mode 100644 index 0000000..4c37489 --- /dev/null +++ b/regression-tests/general/run-after.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Cycle found in tasks (dependency graph): task-1 -> task-1","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/run-after.yaml","loc":{"range":[113,119,120],"startLine":8,"startColumn":13,"endLine":8,"endColumn":19}},{"message":"Pipeline 'runafter-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/run-after.yaml","loc":{"range":[149,156,157],"startLine":10,"startColumn":15,"endLine":10,"endColumn":22}},{"message":"Pipeline 'runafter-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/run-after.yaml","loc":{"range":[230,237,238],"startLine":14,"startColumn":15,"endLine":14,"endColumn":22}},{"message":"Pipeline 'runafter-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/run-after.yaml","loc":{"range":[319,326,327],"startLine":18,"startColumn":15,"endLine":18,"endColumn":22}},{"message":"Pipeline 'runafter-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/run-after.yaml","loc":{"range":[400,407,408],"startLine":22,"startColumn":15,"endLine":22,"endColumn":22}},{"message":"Pipeline 'runafter-pipeline' uses task 'taks-2' (referenced as 'my-task'), and it depends on 'task-4', which doesn't exists (declared in runAfter)","rule":"no-pipeline-missing-task","level":"error","path":"./regression-tests/general/run-after.yaml","loc":{"range":[263,269,269],"startLine":15,"startColumn":26,"endLine":15,"endColumn":32}},{"message":"Pipeline 'runafter-pipeline' uses task 'taks-3' (referenced as 'my-task'), and it depends on 'task-2', which doesn't exists (declared in runAfter)","rule":"no-pipeline-missing-task","level":"error","path":"./regression-tests/general/run-after.yaml","loc":{"range":[343,351,352],"startLine":19,"startColumn":17,"endLine":19,"endColumn":25}},{"message":"Pipeline 'runafter-pipeline' uses task 'taks-4' (referenced as 'my-task'), and it depends on 'task-2', which doesn't exists (declared in runAfter)","rule":"no-pipeline-missing-task","level":"error","path":"./regression-tests/general/run-after.yaml","loc":{"range":[424,446,447],"startLine":23,"startColumn":17,"endLine":23,"endColumn":39}},{"message":"Pipeline 'runafter-pipeline' uses task 'taks-4' (referenced as 'my-task'), and it depends on 'task-missing', which doesn't exists (declared in runAfter)","rule":"no-pipeline-missing-task","level":"error","path":"./regression-tests/general/run-after.yaml","loc":{"range":[433,445,445],"startLine":23,"startColumn":26,"endLine":23,"endColumn":38}}] \ No newline at end of file diff --git a/regression-tests/sidecars-and-steptemplate.yaml b/regression-tests/general/sidecars-and-steptemplate.yaml similarity index 100% rename from regression-tests/sidecars-and-steptemplate.yaml rename to regression-tests/general/sidecars-and-steptemplate.yaml diff --git a/regression-tests/general/sidecars-and-steptemplate.yaml.expect.json b/regression-tests/general/sidecars-and-steptemplate.yaml.expect.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/regression-tests/general/sidecars-and-steptemplate.yaml.expect.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/regression-tests/task-dependency-cycles-combined.yaml b/regression-tests/general/task-dependency-cycles-combined.yaml similarity index 100% rename from regression-tests/task-dependency-cycles-combined.yaml rename to regression-tests/general/task-dependency-cycles-combined.yaml diff --git a/regression-tests/general/task-dependency-cycles-combined.yaml.expect.json b/regression-tests/general/task-dependency-cycles-combined.yaml.expect.json new file mode 100644 index 0000000..d2ee165 --- /dev/null +++ b/regression-tests/general/task-dependency-cycles-combined.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Cycle found in tasks (dependency graph): task-with-result -> task-with-resources-union -> task-with-result","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-combined.yaml","loc":{"range":[355,371,372],"startLine":17,"startColumn":13,"endLine":17,"endColumn":29}},{"message":"Cycle found in tasks (dependency graph): task-with-result -> task-with-resources-union -> task-with-result","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-combined.yaml","loc":{"range":[125,150,151],"startLine":8,"startColumn":13,"endLine":8,"endColumn":38}},{"message":"Pipeline 'combined-task-with-union-edge' references task 'my-task-with-resources' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-combined.yaml","loc":{"range":[180,202,203],"startLine":10,"startColumn":15,"endLine":10,"endColumn":37}},{"message":"Pipeline 'combined-task-with-union-edge' references task 'my-task-with-results' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-combined.yaml","loc":{"range":[401,421,422],"startLine":19,"startColumn":15,"endLine":19,"endColumn":35}}] \ No newline at end of file diff --git a/regression-tests/task-dependency-cycles-resources.yaml b/regression-tests/general/task-dependency-cycles-resources.yaml similarity index 100% rename from regression-tests/task-dependency-cycles-resources.yaml rename to regression-tests/general/task-dependency-cycles-resources.yaml diff --git a/regression-tests/general/task-dependency-cycles-resources.yaml.expect.json b/regression-tests/general/task-dependency-cycles-resources.yaml.expect.json new file mode 100644 index 0000000..d9ab235 --- /dev/null +++ b/regression-tests/general/task-dependency-cycles-resources.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Cycle found in tasks (dependency graph): task-with-reflective-resources -> task-with-reflective-resources","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-resources.yaml","loc":{"range":[481,511,512],"startLine":26,"startColumn":13,"endLine":26,"endColumn":43}},{"message":"Cycle found in tasks (dependency graph): task-with-resources-b -> task-with-resources-a -> task-with-resources-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-resources.yaml","loc":{"range":[1090,1111,1112],"startLine":51,"startColumn":13,"endLine":51,"endColumn":34}},{"message":"Cycle found in tasks (dependency graph): task-with-resources-b -> task-with-resources-a -> task-with-resources-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-resources.yaml","loc":{"range":[859,880,881],"startLine":42,"startColumn":13,"endLine":42,"endColumn":34}},{"message":"Cycle found in tasks (dependency graph): task-with-resources-b -> task-with-resources-a -> task-with-resources-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-resources.yaml","loc":{"range":[1683,1704,1705],"startLine":76,"startColumn":13,"endLine":76,"endColumn":34}},{"message":"Cycle found in tasks (dependency graph): task-with-resources-b -> task-with-resources-a -> task-with-resources-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-resources.yaml","loc":{"range":[1452,1473,1474],"startLine":67,"startColumn":13,"endLine":67,"endColumn":34}},{"message":"Cycle found in tasks (dependency graph): task-with-resources-d -> task-with-resources-c -> task-with-resources-d","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-resources.yaml","loc":{"range":[2145,2166,2167],"startLine":94,"startColumn":13,"endLine":94,"endColumn":34}},{"message":"Cycle found in tasks (dependency graph): task-with-resources-d -> task-with-resources-c -> task-with-resources-d","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-resources.yaml","loc":{"range":[1914,1935,1936],"startLine":85,"startColumn":13,"endLine":85,"endColumn":34}}] \ No newline at end of file diff --git a/regression-tests/task-dependency-cycles-results.yaml b/regression-tests/general/task-dependency-cycles-results.yaml similarity index 100% rename from regression-tests/task-dependency-cycles-results.yaml rename to regression-tests/general/task-dependency-cycles-results.yaml diff --git a/regression-tests/general/task-dependency-cycles-results.yaml.expect.json b/regression-tests/general/task-dependency-cycles-results.yaml.expect.json new file mode 100644 index 0000000..38d643c --- /dev/null +++ b/regression-tests/general/task-dependency-cycles-results.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result -> task-with-reflective-result","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[572,599,600],"startLine":29,"startColumn":13,"endLine":29,"endColumn":40}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-b -> task-with-reflective-result-a -> task-with-reflective-result-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[1119,1148,1149],"startLine":48,"startColumn":13,"endLine":48,"endColumn":42}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-b -> task-with-reflective-result-a -> task-with-reflective-result-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[907,936,937],"startLine":42,"startColumn":13,"endLine":42,"endColumn":42}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-b -> task-with-reflective-result-a -> task-with-reflective-result-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[1672,1701,1702],"startLine":67,"startColumn":13,"endLine":67,"endColumn":42}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-b -> task-with-reflective-result-a -> task-with-reflective-result-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[1460,1489,1490],"startLine":61,"startColumn":13,"endLine":61,"endColumn":42}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-d -> task-with-reflective-result-c -> task-with-reflective-result-d","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[2096,2125,2126],"startLine":79,"startColumn":13,"endLine":79,"endColumn":42}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-d -> task-with-reflective-result-c -> task-with-reflective-result-d","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[1884,1913,1914],"startLine":73,"startColumn":13,"endLine":73,"endColumn":42}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-b -> task-with-reflective-result-c -> task-with-reflective-result-d -> task-with-reflective-result-a -> task-with-reflective-result-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[2644,2673,2674],"startLine":98,"startColumn":13,"endLine":98,"endColumn":42}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-b -> task-with-reflective-result-c -> task-with-reflective-result-d -> task-with-reflective-result-a -> task-with-reflective-result-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[2856,2885,2886],"startLine":104,"startColumn":13,"endLine":104,"endColumn":42}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-b -> task-with-reflective-result-c -> task-with-reflective-result-d -> task-with-reflective-result-a -> task-with-reflective-result-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[3068,3097,3098],"startLine":110,"startColumn":13,"endLine":110,"endColumn":42}},{"message":"Cycle found in tasks (dependency graph): task-with-reflective-result-b -> task-with-reflective-result-c -> task-with-reflective-result-d -> task-with-reflective-result-a -> task-with-reflective-result-b","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[2432,2461,2462],"startLine":92,"startColumn":13,"endLine":92,"endColumn":42}},{"message":"Task 'my-task-with-results' defines parameter 'reflectiveparam', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/task-dependency-cycles-results.yaml","loc":{"range":[107,170,170],"startLine":8,"startColumn":7,"endLine":10,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/task-dependency-cycles-runafter.yaml b/regression-tests/general/task-dependency-cycles-runafter.yaml similarity index 100% rename from regression-tests/task-dependency-cycles-runafter.yaml rename to regression-tests/general/task-dependency-cycles-runafter.yaml diff --git a/regression-tests/general/task-dependency-cycles-runafter.yaml.expect.json b/regression-tests/general/task-dependency-cycles-runafter.yaml.expect.json new file mode 100644 index 0000000..a97a82f --- /dev/null +++ b/regression-tests/general/task-dependency-cycles-runafter.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Cycle found in tasks (dependency graph): task-1 -> task-1","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[138,144,145],"startLine":8,"startColumn":13,"endLine":8,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-2 -> task-1 -> task-2","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[428,434,435],"startLine":23,"startColumn":13,"endLine":23,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-2 -> task-1 -> task-2","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[347,353,354],"startLine":19,"startColumn":13,"endLine":19,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-2 -> task-1 -> task-2","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[720,726,727],"startLine":38,"startColumn":13,"endLine":38,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-2 -> task-1 -> task-2","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[639,645,646],"startLine":34,"startColumn":13,"endLine":34,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-4 -> task-3 -> task-4","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[882,888,889],"startLine":46,"startColumn":13,"endLine":46,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-4 -> task-3 -> task-4","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[801,807,808],"startLine":42,"startColumn":13,"endLine":42,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-2 -> task-3 -> task-4 -> task-1 -> task-2","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[1172,1178,1179],"startLine":61,"startColumn":13,"endLine":61,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-2 -> task-3 -> task-4 -> task-1 -> task-2","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[1253,1259,1260],"startLine":65,"startColumn":13,"endLine":65,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-2 -> task-3 -> task-4 -> task-1 -> task-2","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[1334,1340,1341],"startLine":69,"startColumn":13,"endLine":69,"endColumn":19}},{"message":"Cycle found in tasks (dependency graph): task-2 -> task-3 -> task-4 -> task-1 -> task-2","rule":"no-pipeline-task-cycle","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[1091,1097,1098],"startLine":57,"startColumn":13,"endLine":57,"endColumn":19}},{"message":"Pipeline 'single-task-runafter-single-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[174,181,182],"startLine":10,"startColumn":15,"endLine":10,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-single-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[383,390,391],"startLine":21,"startColumn":15,"endLine":21,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-single-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[464,471,472],"startLine":25,"startColumn":15,"endLine":25,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-multiple-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[675,682,683],"startLine":36,"startColumn":15,"endLine":36,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-multiple-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[756,763,764],"startLine":40,"startColumn":15,"endLine":40,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-multiple-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[837,844,845],"startLine":44,"startColumn":15,"endLine":44,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-multiple-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[918,925,926],"startLine":48,"startColumn":15,"endLine":48,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-longer-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[1127,1134,1135],"startLine":59,"startColumn":15,"endLine":59,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-longer-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[1208,1215,1216],"startLine":63,"startColumn":15,"endLine":63,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-longer-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[1289,1296,1297],"startLine":67,"startColumn":15,"endLine":67,"endColumn":22}},{"message":"Pipeline 'multiple-task-runafter-longer-cycle-pipeline' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/task-dependency-cycles-runafter.yaml","loc":{"range":[1370,1377,1378],"startLine":71,"startColumn":15,"endLine":71,"endColumn":22}}] \ No newline at end of file diff --git a/regression-tests/task-duplicate-params.yaml b/regression-tests/general/task-duplicate-params.yaml similarity index 100% rename from regression-tests/task-duplicate-params.yaml rename to regression-tests/general/task-duplicate-params.yaml diff --git a/regression-tests/general/task-duplicate-params.yaml.expect.json b/regression-tests/general/task-duplicate-params.yaml.expect.json new file mode 100644 index 0000000..4ee1e0d --- /dev/null +++ b/regression-tests/general/task-duplicate-params.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[153,156,157],"startLine":10,"startColumn":15,"endLine":10,"endColumn":18}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[304,307,308],"startLine":20,"startColumn":13,"endLine":20,"endColumn":16}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[555,558,559],"startLine":34,"startColumn":21,"endLine":34,"endColumn":24}},{"message":"Duplicate param 'foo'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[766,769,770],"startLine":46,"startColumn":19,"endLine":46,"endColumn":22}},{"message":"Pipeline 'task-duplicate-params-alpha-embedded' references task 'my-task', but parameter 'foo' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[447,559,559],"startLine":29,"startColumn":7,"endLine":35,"endColumn":1}},{"message":"Pipeline 'task-duplicate-params-alpha-embedded' references task 'my-task', but parameter 'foo' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[447,559,559],"startLine":29,"startColumn":7,"endLine":35,"endColumn":1}},{"message":"Pipeline 'task-duplicate-params-embedded' references task 'my-task', but parameter 'foo' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[680,770,770],"startLine":42,"startColumn":7,"endLine":47,"endColumn":1}},{"message":"Pipeline 'task-duplicate-params-embedded' references task 'my-task', but parameter 'foo' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[680,770,770],"startLine":42,"startColumn":7,"endLine":47,"endColumn":1}},{"message":"Task 'task-duplicate-params-alpha' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[129,139,139],"startLine":9,"startColumn":9,"endLine":10,"endColumn":1}},{"message":"Task 'task-duplicate-params-beta' defines parameter 'foo', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[282,292,292],"startLine":19,"startColumn":7,"endLine":20,"endColumn":1}},{"message":"Pipeline 'task-duplicate-params-embedded' is defined with apiVersion tekton.dev/v1alpha1, but defines an inlined task (my-task) with spec.params. Use spec.inputs.params instead.","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[736,770,770],"startLine":45,"startColumn":11,"endLine":47,"endColumn":1}},{"message":"Task 'task-duplicate-params-alpha' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[16,35,36],"startLine":2,"startColumn":13,"endLine":2,"endColumn":32}},{"message":"Pipeline 'task-duplicate-params-alpha-embedded' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[336,355,356],"startLine":23,"startColumn":13,"endLine":23,"endColumn":32}},{"message":"Pipeline 'task-duplicate-params-embedded' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/task-duplicate-params.yaml","loc":{"range":[575,594,595],"startLine":36,"startColumn":13,"endLine":36,"endColumn":32}}] \ No newline at end of file diff --git a/regression-tests/task-test.yaml b/regression-tests/general/task-test.yaml similarity index 100% rename from regression-tests/task-test.yaml rename to regression-tests/general/task-test.yaml diff --git a/regression-tests/general/task-test.yaml.expect.json b/regression-tests/general/task-test.yaml.expect.json new file mode 100644 index 0000000..601d841 --- /dev/null +++ b/regression-tests/general/task-test.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"'task-without-volumes' is already defined (as a 'Task')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[4847,4867,4868],"startLine":175,"startColumn":9,"endLine":175,"endColumn":29}},{"message":"Invalid image: 'ibmcom/pipeline-base-image'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[1146,1172,1173],"startLine":36,"startColumn":14,"endLine":36,"endColumn":40}},{"message":"Invalid image: 'ibmcom/pipeline-base-image'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[2212,2238,2239],"startLine":75,"startColumn":14,"endLine":75,"endColumn":40}},{"message":"Invalid image: 'ibmcom/pipeline-base-image'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[3237,3263,3264],"startLine":114,"startColumn":14,"endLine":114,"endColumn":40}},{"message":"Invalid image: 'ibmcom/pipeline-base-image'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5132,5158,5159],"startLine":186,"startColumn":14,"endLine":186,"endColumn":40}},{"message":"Invalid image: 'ibmcom/pipeline-base-image'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5998,6024,6025],"startLine":219,"startColumn":14,"endLine":219,"endColumn":40}},{"message":"Undefined param 'ibmcloud-api' at .spec.steps[0].env[1].value in 'task-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[2342,2371,2372],"startLine":80,"startColumn":18,"endLine":80,"endColumn":47}},{"message":"Undefined param 'repository' at .spec.steps[0].env[2].value in 'task-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[2416,2443,2444],"startLine":82,"startColumn":18,"endLine":82,"endColumn":45}},{"message":"Undefined param 'propertiesFile' at .spec.steps[0].env[3].value in 'task-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[2493,2524,2525],"startLine":84,"startColumn":18,"endLine":84,"endColumn":49}},{"message":"Undefined param 'credentials-pvc' at .spec.volumes[1].persistentVolumeClaim.claimName in 'task-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[2861,2893,2894],"startLine":98,"startColumn":20,"endLine":98,"endColumn":52}},{"message":"Undefined param 'ibmcloud-api-key' at .spec.stepTemplate.env[0].value in 'task-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[2128,2161,2162],"startLine":72,"startColumn":16,"endLine":72,"endColumn":49}},{"message":"Undefined param 'ibmcloud-api' at .spec.steps[0].env[1].value in 'task-null-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[3367,3396,3397],"startLine":119,"startColumn":18,"endLine":119,"endColumn":47}},{"message":"Undefined param 'repository' at .spec.steps[0].env[2].value in 'task-null-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[3441,3468,3469],"startLine":121,"startColumn":18,"endLine":121,"endColumn":45}},{"message":"Undefined param 'propertiesFile' at .spec.steps[0].env[3].value in 'task-null-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[3518,3549,3550],"startLine":123,"startColumn":18,"endLine":123,"endColumn":49}},{"message":"Undefined param 'credentials-pvc' at .spec.volumes[1].persistentVolumeClaim.claimName in 'task-null-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[3886,3918,3919],"startLine":137,"startColumn":20,"endLine":137,"endColumn":52}},{"message":"Undefined param 'ibmcloud-api-key' at .spec.stepTemplate.env[0].value in 'task-null-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[3153,3186,3187],"startLine":111,"startColumn":16,"endLine":111,"endColumn":49}},{"message":"Undefined param 'ibmcloud-api' at .spec.steps[0].env[1].value in 'task-without-volumes'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5262,5291,5292],"startLine":191,"startColumn":18,"endLine":191,"endColumn":47}},{"message":"Undefined param 'repository' at .spec.steps[0].env[2].value in 'task-without-volumes'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5336,5363,5364],"startLine":193,"startColumn":18,"endLine":193,"endColumn":45}},{"message":"Undefined param 'propertiesFile' at .spec.steps[0].env[3].value in 'task-without-volumes'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5413,5444,5445],"startLine":195,"startColumn":18,"endLine":195,"endColumn":49}},{"message":"Undefined param 'ibmcloud-api-key' at .spec.stepTemplate.env[0].value in 'task-without-volumes'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5048,5081,5082],"startLine":183,"startColumn":16,"endLine":183,"endColumn":49}},{"message":"Undefined param 'ibmcloud-api' at .spec.steps[0].env[1].value in 'task-with-undefined-volume'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[6128,6157,6158],"startLine":224,"startColumn":18,"endLine":224,"endColumn":47}},{"message":"Undefined param 'repository' at .spec.steps[0].env[2].value in 'task-with-undefined-volume'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[6202,6229,6230],"startLine":226,"startColumn":18,"endLine":226,"endColumn":45}},{"message":"Undefined param 'propertiesFile' at .spec.steps[0].env[3].value in 'task-with-undefined-volume'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[6279,6310,6311],"startLine":228,"startColumn":18,"endLine":228,"endColumn":49}},{"message":"Undefined param 'credentials-pvc' at .spec.volumes[0].persistentVolumeClaim.claimName in 'task-with-undefined-volume'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[6580,6612,6613],"startLine":239,"startColumn":20,"endLine":239,"endColumn":52}},{"message":"Undefined param 'ibmcloud-api-key' at .spec.stepTemplate.env[0].value in 'task-with-undefined-volume'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5914,5947,5948],"startLine":216,"startColumn":16,"endLine":216,"endColumn":49}},{"message":"Task 'task-without-volumes' wants to mount volume 'config-volume' in step 'fetch-git-token', but this volume is not defined.","rule":"no-undefined-volume","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5557,5570,5571],"startLine":200,"startColumn":17,"endLine":200,"endColumn":30}},{"message":"Task 'task-without-volumes' wants to mount volume 'task-volume' in step 'fetch-git-token', but this volume is not defined.","rule":"no-undefined-volume","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5619,5630,5631],"startLine":202,"startColumn":17,"endLine":202,"endColumn":28}},{"message":"Task 'task-with-undefined-volume' wants to mount volume 'config-volume' in step 'fetch-git-token', but this volume is not defined.","rule":"no-undefined-volume","level":"error","path":"./regression-tests/general/task-test.yaml","loc":{"range":[6423,6436,6437],"startLine":233,"startColumn":17,"endLine":233,"endColumn":30}},{"message":"Task 'task-with-params-and-inputs' defines parameter 'continuous-delivery-context-secret', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[551,722,722],"startLine":19,"startColumn":9,"endLine":22,"endColumn":1}},{"message":"Task 'task-with-params-and-inputs' defines parameter 'repository-integration', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[859,955,955],"startLine":25,"startColumn":9,"endLine":28,"endColumn":1}},{"message":"Task 'task-with-params-and-inputs' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[16,35,36],"startLine":2,"startColumn":13,"endLine":2,"endColumn":32}},{"message":"Task 'task-without-params' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[1879,1898,1899],"startLine":61,"startColumn":13,"endLine":61,"endColumn":32}},{"message":"Task 'task-null-params' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[2910,2929,2930],"startLine":100,"startColumn":13,"endLine":100,"endColumn":32}},{"message":"Task 'task-without-volumes' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[4798,4817,4818],"startLine":172,"startColumn":13,"endLine":172,"endColumn":32}},{"message":"Task 'task-with-undefined-volume' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/task-test.yaml","loc":{"range":[5658,5677,5678],"startLine":205,"startColumn":13,"endLine":205,"endColumn":32}}] \ No newline at end of file diff --git a/regression-tests/tekton-beta-mixed.yaml b/regression-tests/general/tekton-beta-mixed.yaml similarity index 100% rename from regression-tests/tekton-beta-mixed.yaml rename to regression-tests/general/tekton-beta-mixed.yaml diff --git a/regression-tests/general/tekton-beta-mixed.yaml.expect.json b/regression-tests/general/tekton-beta-mixed.yaml.expect.json new file mode 100644 index 0000000..a111e0a --- /dev/null +++ b/regression-tests/general/tekton-beta-mixed.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Pipeline 'tekton-alpha-mixed-pipeline' references task 'my-task', but parameter 'my-param' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[251,324,324],"startLine":17,"startColumn":7,"endLine":21,"endColumn":1}},{"message":"Pipeline 'tekton-beta-mixed-pipeline' references task 'my-task', but parameter 'my-param' is not supplied (it's a required param in 'my-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[585,678,678],"startLine":38,"startColumn":7,"endLine":43,"endColumn":1}},{"message":"Task 'tekton-alpha-mixed' defines parameter 'my-param', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[106,121,121],"startLine":8,"startColumn":7,"endLine":9,"endColumn":1}},{"message":"Task 'tekton-beta-mixed' defines parameter 'my-param', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[442,457,457],"startLine":29,"startColumn":9,"endLine":30,"endColumn":1}},{"message":"Pipeline 'tekton-alpha-mixed-pipeline' is defined with apiVersion tekton.dev/v1alpha1, but defines an inlined task (my-task) with spec.params. Use spec.inputs.params instead.","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[307,324,324],"startLine":20,"startColumn":11,"endLine":21,"endColumn":1}},{"message":"Pipeline 'tekton-beta-mixed-pipeline' is defined with apiVersion tekton.dev/v1beta1, but defines an inlined task (my-task) with spec.inputs.params. Use spec.params instead.","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[661,678,678],"startLine":42,"startColumn":13,"endLine":43,"endColumn":1}},{"message":"Task 'tekton-alpha-mixed' is defined with apiVersion tekton.dev/v1alpha1, but defines spec.params. Use spec.inputs.params instead.","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[104,121,121],"startLine":8,"startColumn":5,"endLine":9,"endColumn":1}},{"message":"Task 'tekton-beta-mixed' is defined with apiVersion tekton.dev/v1beta1, but defined spec.inputs.params. Use spec.params instead.","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[440,457,457],"startLine":29,"startColumn":7,"endLine":30,"endColumn":1}},{"message":"Task 'tekton-alpha-mixed' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[16,35,36],"startLine":2,"startColumn":13,"endLine":2,"endColumn":32}},{"message":"Pipeline 'tekton-alpha-mixed-pipeline' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[149,168,169],"startLine":11,"startColumn":13,"endLine":11,"endColumn":32}},{"message":"Step script 'script' should start with a hashbang line.","rule":"no-missing-hashbang","level":"warning","path":"./regression-tests/general/tekton-beta-mixed.yaml","loc":{"range":[936,1011,1011],"startLine":56,"startColumn":15,"endLine":58,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/tekton-beta-ref.yaml b/regression-tests/general/tekton-beta-ref.yaml similarity index 100% rename from regression-tests/tekton-beta-ref.yaml rename to regression-tests/general/tekton-beta-ref.yaml diff --git a/regression-tests/general/tekton-beta-ref.yaml.expect.json b/regression-tests/general/tekton-beta-ref.yaml.expect.json new file mode 100644 index 0000000..73b2eb3 --- /dev/null +++ b/regression-tests/general/tekton-beta-ref.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Pipeline 'my-alpha-pipeline' references task 'my-alpha-task' (as 'my-pipeline-task'), and supplies parameter 'my-extra-param' to it, but it's not a valid parameter","rule":"no-extra-param","level":"error","path":"./regression-tests/general/tekton-beta-ref.yaml","loc":{"range":[802,844,844],"startLine":37,"startColumn":11,"endLine":39,"endColumn":1}},{"message":"Pipeline 'my-alpha-pipeline' references task 'my-other-pipeline-task', and supplies parameter 'my-extra-param' to it, but it's not a valid parameter","rule":"no-extra-param","level":"error","path":"./regression-tests/general/tekton-beta-ref.yaml","loc":{"range":[1528,1570,1570],"startLine":61,"startColumn":11,"endLine":63,"endColumn":1}},{"message":"Pipeline 'my-alpha-pipeline' references task 'my-alpha-task' (as 'my-pipeline-task'), but parameter 'my-missing-pipeline-param' is not supplied (it's a required param in 'my-alpha-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/tekton-beta-ref.yaml","loc":{"range":[701,844,844],"startLine":33,"startColumn":9,"endLine":39,"endColumn":1}},{"message":"Pipeline 'my-alpha-pipeline' references task 'my-other-pipeline-task', but parameter 'my-missing-pipeline-param' is not supplied (it's a required param in 'my-other-pipeline-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/tekton-beta-ref.yaml","loc":{"range":[1427,1570,1570],"startLine":57,"startColumn":9,"endLine":63,"endColumn":1}},{"message":"Undefined param 'my-missing-param' at .spec.steps[0].env[1].value in 'my-alpha-task'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/tekton-beta-ref.yaml","loc":{"range":[375,408,409],"startLine":19,"startColumn":18,"endLine":19,"endColumn":51}},{"message":"Task 'my-alpha-task' defines parameter 'my-unused-param', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/tekton-beta-ref.yaml","loc":{"range":[138,160,160],"startLine":10,"startColumn":9,"endLine":11,"endColumn":1}},{"message":"Task 'my-alpha-task' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/tekton-beta-ref.yaml","loc":{"range":[16,35,36],"startLine":2,"startColumn":13,"endLine":2,"endColumn":32}},{"message":"Pipeline 'my-alpha-pipeline' is defined with apiVersion tekton.dev/v1alpha1, consider migrating to tekton.dev/v1beta1","rule":"prefer-beta","level":"warning","path":"./regression-tests/general/tekton-beta-ref.yaml","loc":{"range":[521,540,541],"startLine":23,"startColumn":13,"endLine":23,"endColumn":32}}] \ No newline at end of file diff --git a/regression-tests/tekton-beta.yaml b/regression-tests/general/tekton-beta.yaml similarity index 100% rename from regression-tests/tekton-beta.yaml rename to regression-tests/general/tekton-beta.yaml diff --git a/regression-tests/general/tekton-beta.yaml.expect.json b/regression-tests/general/tekton-beta.yaml.expect.json new file mode 100644 index 0000000..54c0f5c --- /dev/null +++ b/regression-tests/general/tekton-beta.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"'my-pipeline-with-workspace' is already defined (as a 'Pipeline')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/tekton-beta.yaml","loc":{"range":[1966,1992,1993],"startLine":87,"startColumn":9,"endLine":87,"endColumn":35}},{"message":"Pipeline 'my-beta-pipeline' references task 'my-beta-task' (as 'my-pipeline-task'), and supplies parameter 'my-extra-param' to it, but it's not a valid parameter","rule":"no-extra-param","level":"error","path":"./regression-tests/general/tekton-beta.yaml","loc":{"range":[758,800,800],"startLine":36,"startColumn":11,"endLine":38,"endColumn":1}},{"message":"Pipeline 'my-beta-pipeline' references task 'my-other-pipeline-task', and supplies parameter 'my-extra-param' to it, but it's not a valid parameter","rule":"no-extra-param","level":"error","path":"./regression-tests/general/tekton-beta.yaml","loc":{"range":[1439,1481,1481],"startLine":59,"startColumn":11,"endLine":61,"endColumn":1}},{"message":"Pipeline 'my-beta-pipeline' references task 'my-beta-task' (as 'my-pipeline-task'), but parameter 'my-missing-pipeline-param' is not supplied (it's a required param in 'my-beta-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/tekton-beta.yaml","loc":{"range":[657,800,800],"startLine":32,"startColumn":9,"endLine":38,"endColumn":1}},{"message":"Pipeline 'my-beta-pipeline' references task 'my-other-pipeline-task', but parameter 'my-missing-pipeline-param' is not supplied (it's a required param in 'my-other-pipeline-task')","rule":"no-missing-param","level":"error","path":"./regression-tests/general/tekton-beta.yaml","loc":{"range":[1338,1481,1481],"startLine":55,"startColumn":9,"endLine":61,"endColumn":1}},{"message":"TriggerTemplate 'my-trigger-template-with-workspace' references Pipeline 'my-pipeline-with-workspace', but provides no workspace for 'missing-pipeline-workspace' (it's a required workspace in 'my-pipeline-with-workspace')","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/tekton-beta.yaml","loc":{"range":[2292,2348,2348],"startLine":103,"startColumn":9,"endLine":105,"endColumn":1}},{"message":"Undefined param 'my-missing-param' at .spec.steps[0].env[1].value in 'my-beta-task'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/tekton-beta.yaml","loc":{"range":[348,374,375],"startLine":18,"startColumn":18,"endLine":18,"endColumn":44}},{"message":"Task 'my-beta-task' defines parameter 'my-unused-param', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/tekton-beta.yaml","loc":{"range":[120,142,142],"startLine":9,"startColumn":7,"endLine":10,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/general/trigger-template-a.yaml b/regression-tests/general/trigger-template-a.yaml new file mode 100644 index 0000000..531fe30 --- /dev/null +++ b/regression-tests/general/trigger-template-a.yaml @@ -0,0 +1,26 @@ +apiVersion: triggers.tekton.dev/v1beta1 +kind: TriggerTemplate +metadata: + name: run-g11n-tr-pipeline-template +spec: + params: + - name: g11n-step + - name: g11n-step-tt + - name: g11n-step-unused + resourcetemplates: + - apiVersion: tekton.dev/v1 + kind: PipelineRun + metadata: + name: run-g11n-pipeline-$(tt.params.g11n-step) + spec: + params: + - name: g11n-step-undefined-tt + value: "$(tt.params.g11n-step-tt-undefined)" + - name: g11n-step-undefined + value: "$(params.g11n-step-undefined)" + - name: g11n-step-defined-tt + value: "$(tt.params.g11n-step-tt)" + - name: g11n-step-defined + value: "$(params.g11n-step)" + pipelineRef: + name: run-g11n-pipeline diff --git a/regression-tests/general/trigger-template-a.yaml.expect.json b/regression-tests/general/trigger-template-a.yaml.expect.json new file mode 100644 index 0000000..02121cc --- /dev/null +++ b/regression-tests/general/trigger-template-a.yaml.expect.json @@ -0,0 +1,70 @@ +[ + { + "message": "TriggerTemplate 'run-g11n-tr-pipeline-template' references pipeline 'run-g11n-pipeline', but the referenced pipeline cannot be found.", + "rule": "no-missing-resource", + "level": "error", + "path": "./regression-tests/general/trigger-template-a.yaml", + "loc": { + "range": [ + 765, + 782, + 783 + ], + "startLine": 26, + "startColumn": 17, + "endLine": 26, + "endColumn": 34 + } + }, + { + "message": "Undefined param 'g11n-step-undefined' at .spec.resourcetemplates[0].spec.params[1].value in 'run-g11n-tr-pipeline-template'", + "rule": "no-undefined-param", + "level": "error", + "path": "./regression-tests/general/trigger-template-a.yaml", + "loc": { + "range": [ + 533, + 564, + 565 + ], + "startLine": 20, + "startColumn": 20, + "endLine": 20, + "endColumn": 51 + } + }, + { + "message": "Undefined param 'g11n-step-tt-undefined' at .spec.resourcetemplates[0].spec.params[0].value in 'run-g11n-tr-pipeline-template'", + "rule": "no-undefined-param", + "level": "error", + "path": "./regression-tests/general/trigger-template-a.yaml", + "loc": { + "range": [ + 438, + 475, + 476 + ], + "startLine": 18, + "startColumn": 20, + "endLine": 18, + "endColumn": 57 + } + }, + { + "message": "TriggerTemplate 'run-g11n-tr-pipeline-template' defines parameter 'g11n-step-unused', but it's not used anywhere in the spec", + "rule": "no-unused-param", + "level": "warning", + "path": "./regression-tests/general/trigger-template-a.yaml", + "loc": { + "range": [ + 179, + 202, + 202 + ], + "startLine": 9, + "startColumn": 7, + "endLine": 10, + "endColumn": 1 + } + } +] \ No newline at end of file diff --git a/regression-tests/triggerbinding-test.yaml b/regression-tests/general/triggerbinding-test.yaml similarity index 100% rename from regression-tests/triggerbinding-test.yaml rename to regression-tests/general/triggerbinding-test.yaml diff --git a/regression-tests/general/triggerbinding-test.yaml.expect.json b/regression-tests/general/triggerbinding-test.yaml.expect.json new file mode 100644 index 0000000..51e1441 --- /dev/null +++ b/regression-tests/general/triggerbinding-test.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Duplicate param 'revision'","rule":"no-duplicate-param","level":"error","path":"./regression-tests/general/triggerbinding-test.yaml","loc":{"range":[1939,1947,1948],"startLine":106,"startColumn":11,"endLine":106,"endColumn":19}},{"message":"TriggerBinding 'binding-params-without-value' defines parameter 'revision' with missing value","rule":"no-invalid-param-type","level":"error","path":"./regression-tests/general/triggerbinding-test.yaml","loc":{"range":[1691,1706,1706],"startLine":92,"startColumn":5,"endLine":93,"endColumn":1}},{"message":"EventListener 'listener-1' defines trigger template 'template-with-params', but the trigger template is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggerbinding-test.yaml","loc":{"range":[178,198,199],"startLine":10,"startColumn":15,"endLine":10,"endColumn":35}},{"message":"EventListener 'listener-2' defines trigger template 'template-without-params', but the trigger template is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggerbinding-test.yaml","loc":{"range":[384,407,408],"startLine":21,"startColumn":15,"endLine":21,"endColumn":38}},{"message":"EventListener 'listener-3' defines trigger template 'template-null-params', but the trigger template is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggerbinding-test.yaml","loc":{"range":[590,610,611],"startLine":32,"startColumn":15,"endLine":32,"endColumn":35}},{"message":"EventListener 'listener-4' defines trigger template 'template-without-resource-templates', but the trigger template is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggerbinding-test.yaml","loc":{"range":[802,837,838],"startLine":43,"startColumn":15,"endLine":43,"endColumn":50}},{"message":"EventListener 'listener-5' defines trigger template 'template-with-null-resource-templates', but the trigger template is missing.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggerbinding-test.yaml","loc":{"range":[1025,1062,1063],"startLine":54,"startColumn":15,"endLine":54,"endColumn":52}}] \ No newline at end of file diff --git a/regression-tests/triggertemplate-test.yaml b/regression-tests/general/triggertemplate-test.yaml similarity index 100% rename from regression-tests/triggertemplate-test.yaml rename to regression-tests/general/triggertemplate-test.yaml diff --git a/regression-tests/general/triggertemplate-test.yaml.expect.json b/regression-tests/general/triggertemplate-test.yaml.expect.json new file mode 100644 index 0000000..d7721ee --- /dev/null +++ b/regression-tests/general/triggertemplate-test.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Resource ServiceAccount 'tutorial-service' has an invalid 'resourceVersion' key in its resource definition.","rule":"no-resourceversion","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[10712,10720,10721],"startLine":463,"startColumn":26,"endLine":463,"endColumn":34}},{"message":"'template-pipelineref-null' is already defined (as a 'TriggerTemplate')","rule":"no-duplicate-resource","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[3716,3741,3742],"startLine":164,"startColumn":9,"endLine":164,"endColumn":34}},{"message":"Invalid name for TriggerTemplate 'template-with-pipelineSpec'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[7045,7071,7072],"startLine":307,"startColumn":9,"endLine":307,"endColumn":35}},{"message":"Invalid name for TriggerTemplate 'template-pipelineSpec-without-tasks'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[7990,8025,8026],"startLine":348,"startColumn":9,"endLine":348,"endColumn":44}},{"message":"Invalid name for TriggerTemplate 'template-pipelineSpec-missing-and-extra-params'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[8866,8912,8913],"startLine":386,"startColumn":9,"endLine":386,"endColumn":55}},{"message":"Invalid name for TriggerTemplate 'template-with-serviceAccount'. Names should be in lowercase, alphanumeric, kebab-case format.","rule":"no-invalid-name","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[10158,10186,10187],"startLine":443,"startColumn":9,"endLine":443,"endColumn":37}},{"message":"TriggerTemplate 'template-with-params' references pipeline 'pipeline-with-params', but the referenced pipeline cannot be found.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[764,784,785],"startLine":34,"startColumn":17,"endLine":34,"endColumn":37}},{"message":"TriggerTemplate 'template-without-params' references pipeline 'pr-pipeline', but the referenced pipeline cannot be found.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[1591,1602,1603],"startLine":70,"startColumn":17,"endLine":70,"endColumn":28}},{"message":"TriggerTemplate 'template-pipelineref-null' references pipeline 'pipelineref-missing', but the referenced pipeline cannot be found.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[4415,4434,4435],"startLine":194,"startColumn":19,"endLine":194,"endColumn":38}},{"message":"TriggerTemplate 'template-without-pipelineref' references pipeline 'null', but the referenced pipeline cannot be found.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[3548,3548,3548],"startLine":156,"startColumn":18,"endLine":156,"endColumn":18}},{"message":"TriggerTemplate 'template-without-pipelinerun-params' references pipeline 'pipeline-with-taskref-without-params', but the referenced pipeline cannot be found.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[6110,6146,6147],"startLine":265,"startColumn":19,"endLine":265,"endColumn":55}},{"message":"TriggerTemplate 'template-with-null-pipelinerun-params' references pipeline 'null', but the referenced pipeline cannot be found.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[6952,6952,6952],"startLine":301,"startColumn":18,"endLine":301,"endColumn":18}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[1].stringData.API_KEY in 'template-with-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[586,603,604],"startLine":27,"startColumn":18,"endLine":27,"endColumn":35}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[1].stringData.API_KEY in 'template-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[1413,1430,1431],"startLine":63,"startColumn":18,"endLine":63,"endColumn":35}},{"message":"Undefined param 'target-branch' at .spec.resourcetemplates[2].spec.params[0].value in 'template-without-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[1670,1693,1694],"startLine":73,"startColumn":20,"endLine":73,"endColumn":43}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[1].stringData.API_KEY in 'template-pipelineref-null'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[4235,4252,4253],"startLine":187,"startColumn":18,"endLine":187,"endColumn":35}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[1].stringData.API_KEY in 'template-without-pipelineref'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[3369,3386,3387],"startLine":149,"startColumn":18,"endLine":149,"endColumn":35}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[1].stringData.API_KEY in 'template-without-pipelinerun-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[5930,5947,5948],"startLine":258,"startColumn":18,"endLine":258,"endColumn":35}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[1].stringData.API_KEY in 'template-with-null-pipelinerun-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[6773,6790,6791],"startLine":294,"startColumn":18,"endLine":294,"endColumn":35}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[1].stringData.API_KEY in 'template-with-pipelineSpec'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[7565,7582,7583],"startLine":330,"startColumn":18,"endLine":330,"endColumn":35}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[1].stringData.API_KEY in 'template-pipelineSpec-without-tasks'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[8519,8536,8537],"startLine":371,"startColumn":18,"endLine":371,"endColumn":35}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[1].stringData.API_KEY in 'template-pipelineSpec-missing-and-extra-params'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[9406,9423,9424],"startLine":409,"startColumn":18,"endLine":409,"endColumn":35}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[0].stringData.API_KEY in 'template-with-secret'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[10064,10081,10082],"startLine":438,"startColumn":18,"endLine":438,"endColumn":35}},{"message":"Undefined param 'api-key' at .spec.resourcetemplates[0].stringData.API_KEY in 'template-with-serviceAccount'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[10417,10434,10435],"startLine":455,"startColumn":18,"endLine":455,"endColumn":35}},{"message":"TriggerTemplate 'template-without-resource-templates' defines parameter 'target-branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[1828,1881,1881],"startLine":81,"startColumn":7,"endLine":83,"endColumn":1}},{"message":"TriggerTemplate 'template-without-pipelinerun-params' defines parameter 'target-branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[5459,5512,5512],"startLine":238,"startColumn":7,"endLine":240,"endColumn":1}},{"message":"TriggerTemplate 'template-with-null-pipelinerun-params' defines parameter 'target-branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[6302,6355,6355],"startLine":274,"startColumn":7,"endLine":276,"endColumn":1}},{"message":"TriggerTemplate 'template-pipelineSpec-missing-and-extra-params' defines parameter 'target-branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[8935,8988,8988],"startLine":389,"startColumn":7,"endLine":391,"endColumn":1}},{"message":"TriggerTemplate 'template-with-secret' defines parameter 'target-branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[9856,9909,9909],"startLine":429,"startColumn":7,"endLine":431,"endColumn":1}},{"message":"TriggerTemplate 'template-with-serviceAccount' defines parameter 'target-branch', but it's not used anywhere in the spec","rule":"no-unused-param","level":"warning","path":"./regression-tests/general/triggertemplate-test.yaml","loc":{"range":[10209,10262,10262],"startLine":446,"startColumn":7,"endLine":448,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/value-of-undefined.yaml b/regression-tests/general/value-of-undefined.yaml similarity index 100% rename from regression-tests/value-of-undefined.yaml rename to regression-tests/general/value-of-undefined.yaml diff --git a/regression-tests/general/value-of-undefined.yaml.expect.json b/regression-tests/general/value-of-undefined.yaml.expect.json new file mode 100644 index 0000000..18ea378 --- /dev/null +++ b/regression-tests/general/value-of-undefined.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Invalid image: 'alpine'. Specify the image tag instead of using ':latest'","rule":"no-latest-image","level":"warning","path":"./regression-tests/general/value-of-undefined.yaml","loc":{"range":[113,119,120],"startLine":9,"startColumn":16,"endLine":9,"endColumn":22}},{"message":"Undefined param 'foo' at .spec.steps[0].args[0] in 'foo'","rule":"no-undefined-param","level":"error","path":"./regression-tests/general/value-of-undefined.yaml","loc":{"range":[144,173,173],"startLine":11,"startColumn":11,"endLine":12,"endColumn":26}}] \ No newline at end of file diff --git a/regression-tests/workspaces.yaml b/regression-tests/general/workspaces.yaml similarity index 100% rename from regression-tests/workspaces.yaml rename to regression-tests/general/workspaces.yaml diff --git a/regression-tests/general/workspaces.yaml.expect.json b/regression-tests/general/workspaces.yaml.expect.json new file mode 100644 index 0000000..0284d72 --- /dev/null +++ b/regression-tests/general/workspaces.yaml.expect.json @@ -0,0 +1 @@ +[{"message":"Pipeline 'workspaces-test-1' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[150,157,158],"startLine":10,"startColumn":15,"endLine":10,"endColumn":22}},{"message":"Pipeline 'workspaces-test-2' references task 'my-task' but the referenced task cannot be found. To fix this, include all the task definitions to the lint task for this pipeline.","rule":"no-missing-resource","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[399,406,407],"startLine":25,"startColumn":15,"endLine":25,"endColumn":22}},{"message":"Pipeline 'workspaces-test-3a' references Task 'workspace-test' (as 'my-task'), but provides no workspace for 'ws1' (it's a required workspace in 'workspace-test')","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[762,820,820],"startLine":48,"startColumn":7,"endLine":51,"endColumn":1}},{"message":"Pipeline 'workspaces-test-3a' references Task 'workspace-test' (as 'my-task'), but provides no workspace for 'ws2' (it's a required workspace in 'workspace-test')","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[762,820,820],"startLine":48,"startColumn":7,"endLine":51,"endColumn":1}},{"message":"Pipeline 'workspaces-test-3b' references Task 'workspace-test' (as 'my-task'), but provides no workspace for 'ws2' (it's a required workspace in 'workspace-test')","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[1012,1049,1049],"startLine":62,"startColumn":9,"endLine":64,"endColumn":1}},{"message":"Pipeline 'workspaces-test-1' provides workspace 'ws' for 'ws' for Task 'my-task', but 'ws' doesn't exists in 'workspaces-test-1'","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[216,218,219],"startLine":13,"startColumn":22,"endLine":13,"endColumn":24}},{"message":"Pipeline 'workspaces-test-2' provides workspace 'ws' for 'ws' for Task 'my-task', but 'ws' doesn't exists in 'workspaces-test-2'","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[465,467,468],"startLine":28,"startColumn":22,"endLine":28,"endColumn":24}},{"message":"Pipeline 'workspaces-test-2' provides workspace 'w2' for 'ws' for Task 'my-task', but 'w2' doesn't exists in 'workspaces-test-2'","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[508,510,511],"startLine":30,"startColumn":22,"endLine":30,"endColumn":24}},{"message":"Pipeline 'workspaces-test-3b' provides workspace 'ws1' for 'ws1' for Task 'my-task', but 'ws1' doesn't exists in 'workspaces-test-3b'","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[1045,1048,1049],"startLine":63,"startColumn":22,"endLine":63,"endColumn":25}},{"message":"Pipeline 'workspaces-test-4' provides workspace 'ws2' for 'ws2' for Task 'my-task', but 'ws2' doesn't exists in 'workspaces-test-4'","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[1356,1359,1360],"startLine":81,"startColumn":22,"endLine":81,"endColumn":25}},{"message":"TriggerTemplate 'workspaces-trigger-1' references Pipeline 'workspaces-test-4', but provides no workspace for 'ws-missing' (it's a required workspace in 'workspaces-test-4')","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[1940,2015,2015],"startLine":113,"startColumn":11,"endLine":116,"endColumn":1}},{"message":"TriggerTemplate 'workspaces-trigger-2' references Pipeline 'workspaces-test-4', but provides no workspace for 'ws' (it's a required workspace in 'workspaces-test-4')","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[2231,2278,2278],"startLine":127,"startColumn":9,"endLine":129,"endColumn":1}},{"message":"TriggerTemplate 'workspaces-trigger-2' references Pipeline 'workspaces-test-4', but provides no workspace for 'ws-missing' (it's a required workspace in 'workspaces-test-4')","rule":"no-missing-workspace","level":"error","path":"./regression-tests/general/workspaces.yaml","loc":{"range":[2231,2278,2278],"startLine":127,"startColumn":9,"endLine":129,"endColumn":1}}] \ No newline at end of file diff --git a/regression-tests/regresion.test.cjs b/regression-tests/regresion.test.cjs deleted file mode 100644 index 94c0069..0000000 --- a/regression-tests/regresion.test.cjs +++ /dev/null @@ -1,24 +0,0 @@ -const collect = require('../src/Collector').default; -const { default: runner, lint } = require('../src/runner'); - -it('regression tests with location', async () => { - const result = await runner(['./regression-tests/*.yaml']); - for (const problem of result) { - expect(problem).toHaveProperty('loc'); - } - - result.sort((a, b) => { - const start = a.loc.range[0] - b.loc.range[0]; - const end = a.loc.range[1] - b.loc.range[1]; - return a.path.localeCompare(b.path) || start || end || a.message.localeCompare(b.message); - }); - - expect(result).toMatchSnapshot(); -}); - -it('regression tests without location', async () => { - const reference = await runner(['./regression-tests/*.yaml']); - const docs = await collect(['./regression-tests/*.yaml']); - const result = await lint(docs.map(d => d.content)); - expect(result).toHaveLength(reference.length); -}); diff --git a/regression-tests/regression.test.ts b/regression-tests/regression.test.ts new file mode 100644 index 0000000..c5cc48f --- /dev/null +++ b/regression-tests/regression.test.ts @@ -0,0 +1,26 @@ +import fs from 'node:fs' + +import fg from 'fast-glob'; +import {getDefaultConfig,linter} from '../src/index' + +const pattern = "./regression-tests/general/*.yaml" +const yamlfiles = fg.globSync(pattern) + + +describe("Regression Tests",()=>{ + + test.each(yamlfiles)("%s",async (yamlSrcPath)=>{ + const cfg = getDefaultConfig() + + const problems = await linter(cfg,[yamlSrcPath]) + const expectedPath =`${yamlSrcPath}.expect.json` + + if (!fs.existsSync(expectedPath)){ + fs.writeFileSync(expectedPath, JSON.stringify(problems)) + } + + const expected = JSON.parse(fs.readFileSync(expectedPath,'utf-8')) + expect(problems).toMatchObject(expected) + }) + +}) \ No newline at end of file diff --git a/system-tests/various/checks.yaml b/system-tests/various/checks.yaml new file mode 100644 index 0000000..6c1e1a4 --- /dev/null +++ b/system-tests/various/checks.yaml @@ -0,0 +1,27 @@ +apiVersion: tekton.dev/v1 +kind: Pipeline +metadata: + name: run-health-checks +spec: + params: + - name: image-name + default: docker-na-public.artifactory.swg-devops.com/dsx-nb-docker-local/wca-health-checks + - name: image-tag + default: main-latest + - name: stage + default: dallas.ic.dev + workspaces: + - name: workspace-health-checks + tasks: + - name: run-health-checks + taskRef: + name: task-run-health-checks + params: + - name: image-name + value: $(params.image-name) + - name: image-tag + value: $(params.image-tag) + - name: stage + value: $(params.stage) + workspaces: + - name: workspace-health-checks