summaryrefslogtreecommitdiffstats
path: root/python/mozlint/test/runcli.py
blob: be60a1da1963cc1f7e4e2395b6c82bbf95b810d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import os
import sys

from mozlint import cli

here = os.path.abspath(os.path.dirname(__file__))

if __name__ == "__main__":
    parser = cli.MozlintParser()
    args = vars(parser.parse_args(sys.argv[1:]))
    args["root"] = here
    args["config_paths"] = [os.path.join(here, "linters")]
    sys.exit(cli.run(**args))