コード例 #1
0
 def lint(self, *runargs, **lintargs):
     """Run linters."""
     from mozlint import cli
     lintargs['exclude'] = ['obj*']
     cli.SEARCH_PATHS.append(here)
     self._activate_virtualenv()
     return cli.run(*runargs, **lintargs)
コード例 #2
0
ファイル: mach_commands.py プロジェクト: nyancat18/Waterfox
 def lint(self, *runargs, **lintargs):
     """Run linters."""
     from mozlint import cli
     lintargs['exclude'] = ['obj*']
     cli.SEARCH_PATHS.append(here)
     self._activate_virtualenv()
     return cli.run(*runargs, **lintargs)
コード例 #3
0
 def inner(args=None):
     args = args or []
     args.extend(files)
     lintargs = vars(parser.parse_args(args))
     lintargs["root"] = here
     lintargs["config_paths"] = [os.path.join(here, "linters")]
     return cli.run(**lintargs)
コード例 #4
0
ファイル: test_cli.py プロジェクト: ciwei100000/mozjs-debian
 def inner(args=None):
     args = args or []
     args.extend(files)
     lintargs = vars(parser.parse_args(args))
     lintargs['root'] = here
     lintargs['config_paths'] = [os.path.join(here, 'linters')]
     return cli.run(**lintargs)
コード例 #5
0
 def lint(self, *runargs, **lintargs):
     """Run linters."""
     from mozlint import cli
     lintargs.setdefault('root', self.topsrcdir)
     lintargs['exclude'] = ['obj*', 'tools/lint/test/files']
     cli.SEARCH_PATHS.append(here)
     self._activate_virtualenv()
     return cli.run(*runargs, **lintargs)
コード例 #6
0
    def lint(self, *runargs, **lintargs):
        """Run linters."""
        self._activate_virtualenv()
        from mozlint import cli

        lintargs.setdefault('root', self.topsrcdir)
        lintargs['exclude'] = get_global_excludes(lintargs['root'])
        cli.SEARCH_PATHS.append(here)
        return cli.run(*runargs, **lintargs)
コード例 #7
0
ファイル: mach_commands.py プロジェクト: urrytr/gecko
    def lint(self, *runargs, **lintargs):
        """Run linters."""
        self._activate_virtualenv()
        from mozlint import cli, parser

        lintargs.setdefault('root', self.topsrcdir)
        lintargs['exclude'] = get_global_excludes(lintargs['root'])
        cli.SEARCH_PATHS.append(here)
        parser.GLOBAL_SUPPORT_FILES.append(
            os.path.join(self.topsrcdir, THIRD_PARTY_PATHS))
        return cli.run(*runargs, **lintargs)
コード例 #8
0
ファイル: mach_commands.py プロジェクト: jihainan/gecko-dev
    def lint(self, *runargs, **lintargs):
        """Run linters."""
        self._activate_virtualenv()
        from mozlint import cli, parser

        try:
            buildargs = {}
            buildargs['substs'] = copy.deepcopy(dict(self.substs))
            buildargs['defines'] = copy.deepcopy(dict(self.defines))
            buildargs['topobjdir'] = self.topobjdir
            lintargs.update(buildargs)
        except BuildEnvironmentNotFoundException:
            pass

        lintargs.setdefault('root', self.topsrcdir)
        lintargs['exclude'] = get_global_excludes(lintargs['root'])
        cli.SEARCH_PATHS.append(here)
        for path in EXCLUSION_FILES:
            parser.GLOBAL_SUPPORT_FILES.append(
                os.path.join(self.topsrcdir, path))
        return cli.run(*runargs, **lintargs)
コード例 #9
0
    def lint(self, *runargs, **lintargs):
        """Run linters."""
        self._activate_virtualenv()
        from mozlint import cli, parser

        try:
            buildargs = {}
            buildargs["substs"] = copy.deepcopy(dict(self.substs))
            buildargs["defines"] = copy.deepcopy(dict(self.defines))
            buildargs["topobjdir"] = self.topobjdir
            lintargs.update(buildargs)
        except BuildEnvironmentNotFoundException:
            pass

        lintargs.setdefault("root", self.topsrcdir)
        lintargs["exclude"] = get_global_excludes(lintargs["root"])
        lintargs["config_paths"].insert(0, here)
        for path in EXCLUSION_FILES:
            parser.GLOBAL_SUPPORT_FILES.append(
                os.path.join(self.topsrcdir, path))
        return cli.run(*runargs, **lintargs)
コード例 #10
0
ファイル: runcli.py プロジェクト: isabella232/juggler
# 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/.

from __future__ import absolute_import

import os
import sys

here = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(os.path.dirname(here), 'mozlint'))

from mozlint import cli
cli.SEARCH_PATHS.append(os.path.join(here, 'linters'))

if __name__ == '__main__':
    parser = cli.MozlintParser()
    args = vars(parser.parse_args(sys.argv[1:]))
    args['root'] = here
    sys.exit(cli.run(**args))
コード例 #11
0
ファイル: test_cli.py プロジェクト: isabella232/juggler
 def inner(args=None):
     args = args or []
     args.extend(files)
     lintargs = vars(parser.parse_args(args))
     lintargs['root'] = here
     return cli.run(**lintargs)