summaryrefslogtreecommitdiff
path: root/tests/regrtest_data/dummy_plugin/dummy_plugin.py
blob: dd0554f7e740e7d40498628889d6679b5d0caa6a (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
27
28
29
30
31
from pylint.checkers import BaseChecker
from pylint.lint.pylinter import PyLinter


class DummyPlugin1(BaseChecker):
    name = 'dummy_plugin'
    msgs = {'I9061': ('Dummy short desc 01', 'dummy-message-01', 'Dummy long desc')}
    options = (
        ('dummy_option_1', {
            'type': 'string',
            'metavar': '<string>',
            'help': 'Dummy option 1',
        }),
    )


class DummyPlugin2(BaseChecker):
    name = 'dummy_plugin'
    msgs = {'I9060': ('Dummy short desc 02', 'dummy-message-02', 'Dummy long desc')}
    options = (
        ('dummy_option_2', {
            'type': 'string',
            'metavar': '<string>',
            'help': 'Dummy option 2',
        }),
    )


def register(linter: PyLinter) -> None:
    linter.register_checker(DummyPlugin1(linter))
    linter.register_checker(DummyPlugin2(linter))