runcli.py (520B)
1 # This Source Code Form is subject to the terms of the Mozilla Public 2 # License, v. 2.0. If a copy of the MPL was not distributed with this 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 5 import os 6 import sys 7 8 from mozlint import cli 9 10 here = os.path.abspath(os.path.dirname(__file__)) 11 12 if __name__ == "__main__": 13 parser = cli.MozlintParser() 14 args = vars(parser.parse_args(sys.argv[1:])) 15 args["root"] = here 16 args["config_paths"] = [os.path.join(here, "linters")] 17 sys.exit(cli.run(**args))