Flake8 ignores the 'exclude' section of the .flake8.yml if you pass in a direct
path to a file. To get around this we have some custom logic to handle these
exclusions for us, but this custom logic didn't account for globs.
Differential Revision: https://phabricator.services.mozilla.com/D23145
--HG--
extra : moz-landing-system : lando
This ensures that the default for new python files is to be linted by flake8.
Depends on D20496
Differential Revision: https://phabricator.services.mozilla.com/D20497
--HG--
extra : moz-landing-system : lando
The motivations for this are:
1) Apply global excludes. This merges the exclusion rules defined in
tools/lint/mach_commands.py with the ones in .flake8.
2) Improve performance. Switching to a blacklist will result in a much longer
runtime for linting the entire tree and flake8 handles exclusions incredibly
slowly. Without this patch (and the blacklist change applied), I gave up
waiting after 30 minutes. With this patch, it takes 30 seconds.
Depends on D20495
Differential Revision: https://phabricator.services.mozilla.com/D20496
--HG--
rename : tools/lint/test/files/flake8/bad.py => tools/lint/test/files/flake8/subdir/exclude/bad.py
extra : moz-landing-system : lando
This is required for a future commit which will monkeypatch flake8's
configuration to fit our needs.
But it has a couple nice benefits anyway:
1. Less process overhead.
2. Less complexity around handling SIGINT.
3. Less complexity in the code.
Depends on D20494
Differential Revision: https://phabricator.services.mozilla.com/D20495
--HG--
extra : moz-landing-system : lando
This will be re-used by the flake8 linter, so moving it into mozlint for
re-useability.
Depends on D20493
Differential Revision: https://phabricator.services.mozilla.com/D20494
--HG--
extra : moz-landing-system : lando
***
Bug 1523957 - Part 0: Whitespace changes in tree.js, r=bgrins
***
Bug 1523957 - Part 1.1: Naively convert tree to a custom element, r=bgrins
***
Bug 1523957 - Part 1.2: Properly mixin BaseControl and extend XULTreeElement, r=bgrins
***
Bug 1523957 - Part 1.3: Use Shadow DOM for slotting children, r=bgrins
***
Bug 1523957 - Part 1.4: Properly handle key events in combination with shift modifiers, r=bgrins
***
Bug 1523957 - Part 1.5: Lint for the lint gods in tree.js, r=bgrins, standard8
***
Bug 1523957 - Part 2.1: Naively convert places-tree to a custom element, preserving history, r=bgrins
***
Bug 1523957 - Part 2.2: Lint for the lint gods in places-tree.js, r=bgrins
***
Bug 1523957 - Part 2.3: Fix browser_passwordmgr_editing.js, r=MattN
***
Bug 1523957 - Part 2.4: Fix browser_bookmarksProperties.js, r=bgrins
***
Bug 1523957 - Part 2.5: Make the edit bookmark tree lazily constructed so there aren't any trees left in the browser window markup, r=bgrins
***
Bug 1523957 - Part 2.6: Add eslint globals to places-tree.js, r=bgrins, standard8
--HG--
rename : browser/components/places/content/tree.xml => browser/components/places/content/places-tree.js
The module can dump ELF binaries, Mach-O binaries, and pdb files. So it works
for all our supported platforms.
The module is currently hosted on https://zealous-rosalind-a98ce8.netlify.com/ ,
which is a netlify server that serves files from the following repo:
https://github.com/mstange/profiler-assets
To make all of this look a bit more official, I'm planning on doing two things:
- Move the github repo under the devtools-html organization
- Get a firefox.com subdomain such as profiler-assets.firefox.com for hosting
Depends on D13004
Differential Revision: https://phabricator.services.mozilla.com/D13005
--HG--
extra : moz-landing-system : lando
This removes all .flake8 files except for the one at the root of the repo.
Instead we use the new 'per-file-ignores' config introduced in 3.7. To ignore
specific errors in a subdirectory, add a line like this to the root .flake8:
[per-file-ignores]
path/to/subdir/*: E100, F200, ...
The reasons for this change are:
1. Unblock flake8 blacklist (bug 1367092).
2. Simplify configuration and code.
3. Encourage more consistent styling.
4. Improve performance.
5. Greater editor consistency.
Differential Revision: https://phabricator.services.mozilla.com/D18354
--HG--
extra : moz-landing-system : lando
This bumps flake8 to version 3.7.5.
This also ignores the new lint rules that were added in the new versions.
These rules are de-marked via comment so we know that they should be enabled at
some point (as opposed to the other rules that are (presumably) ignored
intentionally.
Differential Revision: https://phabricator.services.mozilla.com/D18353
--HG--
extra : moz-landing-system : lando
Somehow we have two copies of the flake8 linter implementation:
- tools/lint/python/__init__.py
- tools/lint/python/flake8.py
I'm not really sure how this happened, but the latter is the one that we use,
so let's remove the former. It wasn't really affecting anything, though could
have caused confusion to people looking to modify the lint integration.
Differential Revision: https://phabricator.services.mozilla.com/D18352
--HG--
extra : moz-landing-system : lando
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8
This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:
ChromeUtils.import("resource://gre/modules/Services.jsm");
is approximately the same as the following, in the new model:
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs
This was done using the followng script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16750
--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
This adds some missing modules with odd export patterns, along with some full
path overrides for a few modules with duplicate leaf names, which previously
had a single entry with combined export lists of all matching modules.
--HG--
extra : rebase_source : c1cdb20e785c0b6eba712e4f0fbf6ab4dca6d060