Commit Graph

74 Commits

Author SHA1 Message Date
Ted Mielczarek
e44beeede9 bug 1255479 - make mach python-tests use TestResolver for discovery, make mach test work for python tests. r=nalexander
MozReview-Commit-ID: CK2Vh6gdnb0
2016-03-10 12:30:10 -05:00
Patrick Brosset
e2cead3691 Bug 1248360 - Set eslint version to 1.10.3 when setting it up via mach
MozReview-Commit-ID: LmKsvGzj3fo
2016-02-16 10:01:11 +01:00
Dave Townsend
cc8a0ad5b2 Bug 1239139: Verify that a high enough node version is available before running eslint. r=gps
The most common issue I'm hearing with eslint is people who have an outdated
node installed. This does a quick check to verify the version is high enough
before linting.

MozReview-Commit-ID: Em0jn18OUYo
2016-02-09 15:34:37 -08:00
Kris Maglione
1ff52f6767 Bug 1230776: Support scripts from HTML files in eslint. r=gps
Also removes related unused variables in mach_commands.py.
2015-12-05 13:17:49 -08:00
Felipe Gomes
6af4297229 Bug 1231720 - Log when ESLint finishes running. r=nalexander 2015-12-10 14:31:14 -05:00
Dave Townsend
7b284baa81 Bug 1230300: Fix mach eslint to pass command arguments through to eslint. r=gps
Currently mach treats the first argument to eslint as the path and moves it to
the end of the arguments but this breaks usage like "mach eslint -f json browser".

It used to be necessary to change to the directory you wanted to lint but now
the .eslintignore is at the top level we just run from the top level. This means
the path argument doesn't need to be special anymore.
2015-12-03 10:38:29 -08:00
Dave Townsend
07937b2d92 Bug 1229858: Add a preprocessor to convert XBL into JavaScript blocks for eslint. r=miker 2015-12-02 17:03:33 -08:00
Jared Wein
c8aa983c2d Bug 1229154 - Launch 'eslint' with UNIX environment since 'eslint' is not a valid Win32 binary. r=gps 2015-12-01 14:29:47 -05:00
Dave Townsend
8ccbdf748e Bug 1228628: Move all eslintignore rules to the top-level of the tree. r=mconley 2015-11-27 09:39:59 -08:00
Michael Ratcliffe
87f5d15814 Bug 1212047 - Improve ESLint logging in case of error r=glandium
Fix *all* return codes
2015-10-23 17:18:45 +01:00
Michael Ratcliffe
079442b68d Bug 1211223 - Error running eslint setup on Windows r=mh+mozilla, r=pbro 2015-10-23 14:36:24 +01:00
Michael Ratcliffe
a638984ea2 Bug 1203520 - We need a DevTools ESLint plugin containing our ruleset r=gps 2015-09-30 14:44:48 +01:00
Nick Alexander
eaebad76b9 Bug 1177933 - Add |mach eslint| command. r=mcomella,dmose
DONTBUILD NPOTB
2015-07-02 12:18:52 -07:00
Gregory Szorc
d848d6eb6d Bug 1176642 - Defer import of glob; r=glandium
This was the only import of glob from all mach_commands.py files. Kill
it.

With this commit, there are no modules imported by a single
mach_commands.py outside of testing/web-platform/mach_commands.py.
2015-06-25 12:11:55 -07:00
Gregory Szorc
d993a444fa Bug 1176642 - Use absolute_import in mach_commands.py files; r=glandium
This removes ambiguity as to which modules are being imported, making
import slightly faster as Python doesn't need to test so many
directories for file presence.

All files should already be using absolute imports because mach command
modules aren't imported to the package they belong to: they instead
belong to the "mach" package. So relative imports shouldn't have been
used.
2015-06-21 17:39:09 -07:00
Gregory Szorc
0222a3a19c Bug 1176642 - Remove unused imports; r=glandium 2015-06-25 12:16:38 -07:00
Mike Hommey
2e51d2ef87 Bug 1147283 - Replace mozpack.path with mozpath. r=mshal
Back when mozpack.path was added, it was used as:

  import mozpack.path
  mozpack.path.func()

Nowadays, the common idiom is:

  import mozpack.path as mozpath
  mozpath.func()

because it's shorter.

$ git grep mozpath\\. | wc -l
423
$ git grep mozpack.path\\. | wc -l
123

This change was done with:
$ git grep -l mozpack.path\\. | xargs sed -i 's/mozpack\.path\./mozpath./g'
$ git grep -l 'import mozpack.path$' | xargs sed -i 's/import mozpack.path$/\0 as mozpath/'
$ (pat='import mozpack.path as mozpath'; git grep -l "$pat" | xargs sed -i "1,/$pat/b;/$pat/d")
2015-03-27 08:13:16 +09:00
Mike Hommey
711c2629f1 Bug 1076649 - Remove the '+' prefixing from mach commands with allow_all_arguments=True. r=gps
The reason to use '+' prefixing was to distinguish between options to the
mach command itself, and options that are passed down to whatever the
command does (like mach run passing down args to the built application).
That makes things unnecessarily awkward, and quite non-standard.

Instead, use standard '-' prefixing, and pass all the unknown arguments
down. If there is overlap between the known arguments and arguments supported
by the underlying tool (like -remote when using mach run), it is possible to
use '--' to mark all following arguments as being targetted at the underlying
tool.

For instance:
    mach run -- -remote something
would run
    firefox -remote something
while
    mach run -remote something
would run
    firefox something

As allow_all_arguments is redundant with the presence of a argparse.REMAINDER
CommandArgument, allow_all_arguments is removed. The only mach command with a
argparse.REMAINDER CommandArgument without allow_all_arguments was "mach dmd",
and it did so because it didn't want to use '+' prefixes.
2014-10-07 07:36:27 +09:00
Nathan Froyd
febf1acc75 Bug 1062518 - ensure that |mach python-test| considers $PWD when finding tests; r=mshal 2014-09-15 13:25:41 -04:00
Nathan Froyd
8746cb9bdd Bug 1056862 - make |mach python-test| work even if run from outside the srcdir; r=gps
DONTBUILD because NPOTB
2014-08-21 11:03:26 -04:00
Gregory Szorc
06057dce2d Bug 952280 - mach python commands now use virtualenv APIs; r=mshal
The Python-related mach commands were written before we had a virtualenv
API exposed to the mach command context. This patch updates those
commands to use the newer APIs. As a bonus, these commands now work
without running configure!
2013-12-19 13:48:37 -08:00
Mike Hommey
fdd78e61e4 Bug 905490 - Avoid "mach python" logging the python command. r=gps 2013-08-15 23:45:09 +09:00
Matt Brubeck
6e471bfa49 Bug 899695 - Fix exception in "mach python" on Windows [r=gps]
DONTBUILD (not part of the build)
2013-08-08 08:06:02 -07:00
Nick Alexander
8f0c16b5e3 Bug 818744 - mach commands to run Python and Python unit tests. r=gps
DONTBUILD because NPOTB
2013-07-02 17:33:48 -07:00