Super-Linter: Pass python modules as arguments to Pylint in Azure DevOps

1k views Asked by At

I am trying to add a python linting step to an Azure DevOps pipeline using Super-Linter. I followed the instruction here to add the following step in my pipeline:

jobs:
- job: PythonLint
  displayName: Python Lint
  pool:
    vmImage: ubuntu-latest
  steps:
  - script: |
      docker pull github/super-linter:latest
      docker run -e RUN_LOCAL=true -e VALIDATE_PYTHON_PYLINT=true -v $(System.DefaultWorkingDirectory):/tmp/lint github/super-linter 
    displayName: 'Code Scan using GitHub Super-Linter'

The Super-Linter github docs page describes passing environment variables to tell it which linters to run. I pass the variable VALIDATE_PYTHON_PYLINT to tell it to run pylint. When I run the pipeline, I get a load of errors of the form E0401: Unable to import 'pyspark.sql' (import-error).

Pylint's configuration page says the modules should be passed as command line arguments.

My question is, how can I configure Super-Linter to pass these arguments or otherwise tell pylint which modules to import?

0

There are 0 answers