Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
The default configuration recommended here[1], while being a good
generic default, it doesn't quite work for mozilla-central as that peeks
the closest ancestor directory with a `Cargo.toml`.
For example, when editing under `servo/components/style`, it'd try to
use that directory as a project root and fail like:
```
0: Failed to run `cargo metadata --manifest-path /home/emilio/src/moz/gecko/servo/components/style/Cargo.toml`
1: Error during execution of `cargo metadata`: Updating crates.io index
error: failed to get `servo_atoms` as a dependency of package `style v0.0.1 (/home/emilio/src/moz/gecko/servo/components/style)`
Caused by:
failed to load source for dependency `servo_atoms`
```
Instead, we want to override it using the `'project_directory'` setting
so that we hit this path[2] and it works out of the box.
[1]: https://rust-analyzer.github.io/manual.html#youcompleteme
[2]: 63db7ea379/ycmd/completers/language_server/language_server_completer.py (L1914-L1916)
Differential Revision: https://phabricator.services.mozilla.com/D79938
We need to use the new Settings() API, instead of the deprecated
FlagsForFile. Though in practice we can just delegate to it and it works
out of the box.
Differential Revision: https://phabricator.services.mozilla.com/D72152
Files with .h extension are built with the c compiler by default, which makes
the diagnostics useless. If we know this is a cpp file, hint it so that it
builds it with the right mode.
Differential Revision: https://phabricator.services.mozilla.com/D17372
--HG--
extra : moz-landing-system : lando
Looks like ycmd fails to parse the file if the -march=arm* option is given
Removing it doesn't solve all YCM problems for Fennec, but it allows us
to use JumpToDefinition, GetType and semantic auto-completion.
--HG--
extra : rebase_source : beacdc99b7e698d6ab497c06c2c26b6a49c72d5e