summaryrefslogtreecommitdiff
path: root/buildscripts/linter/pylint.py
blob: cce21f3765c9d2f8e7ba90146767676f1e61e9c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""PyLint linter support module."""

import os
from typing import List

from . import base
from . import git


class PyLintLinter(base.LinterBase):
    """Pylint linter."""

    def __init__(self):
        # type: () -> None
        """Create a pylint linter."""
        super(PyLintLinter, self).__init__("pylint", "2.7.2")

    def get_lint_version_cmd_args(self):
        # type: () -> List[str]
        """Get the command to run a linter version check."""
        return ["--version"]

    def get_lint_cmd_args(self, file_name):
        # type: (str) -> List[str]
        """Get the command to run a linter."""
        return ["--output-format=msvs", "--reports=n", file_name]