1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-25 06:17:50 +00:00
catalog/task/pylint/0.1
Vincent Demeester d93795673c Update self reference from master to main 🧙
And update references to community, pipeline, etc. too.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2021-03-19 11:09:49 +00:00
..
tests Add add_task helper function for tests 2020-10-07 17:51:55 +01:00
pylint.yaml Only install the requirements when the file is here (same as in #459) 2020-08-06 10:34:04 +01:00
README.md Update self reference from master to main 🧙 2021-03-19 11:09:49 +00:00

pylint

The task provides linting based on pylint for Python. The used images are based on the official Docker Hub Python images. The installation of the packages is performed via a pip install.

It is required that pylint is part of the requirements file for the task. If the module is not included a warning will be printed.

Install the Task

Workspaces

  • source: A Workspace volume containing the python code.

Install pylint

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/pylint/0.1/pylint.yaml

Parameters

  • PYTHON: The used Python version, more precisely the tag for the Python image (default: latest)
  • SOURCE_PATH: The path to the source code (default: .)
  • MODULE_PATH: The path to the module which should be analysed by pylint (default: .)
  • ARGS: The additional arguments to be used with pylint
  • REQUIREMENTS_FILE: The name of the requirements file inside the source location (default: requirements.txt)

Usage

This TaskRun runs pylint on a repository.

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: lint
spec:
  taskRef:
    name: pylint
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source
  params:
  - name: PYTHON
    value: "3.7"
  - name: MODULE
    value: "examples/custom.py"
  - name: ARGS
    value: "-r y"