mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-22 06:02:51 +00:00
Adds context param in golangci-lint
This adds context param to provide path to the directory to use as context. Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
This commit is contained in:
parent
60bb409b01
commit
9770a832b8
@ -12,6 +12,7 @@ kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/
|
||||
### Parameters
|
||||
|
||||
* **package**: base package under validation
|
||||
* **context**: path to the directory to use as context (default: .)
|
||||
* **flags**: flags to use for `golangci-lint` command (_default:_--verbose)
|
||||
* **version**: golangci-lint version to use (_default:_ v1.16)
|
||||
* **GOOS**: operating system target (_default:_ linux)
|
||||
|
@ -15,6 +15,9 @@ spec:
|
||||
params:
|
||||
- name: package
|
||||
description: base package (and its children) under validation
|
||||
- name: context
|
||||
description: path to the directory to use as context.
|
||||
default: "."
|
||||
- name: flags
|
||||
description: flags to use for the test command
|
||||
default: --verbose
|
||||
@ -36,7 +39,7 @@ spec:
|
||||
steps:
|
||||
- name: lint
|
||||
image: docker.io/golangci/golangci-lint:$(params.version)
|
||||
workingDir: $(workspaces.source.path)
|
||||
workingDir: $(workspaces.source.path)/$(params.context)
|
||||
script: |
|
||||
golangci-lint run $(params.flags)
|
||||
env:
|
||||
|
Loading…
Reference in New Issue
Block a user