mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
8c04017a04
Tie into `code_analysis`'s `get_clang_tools()` functionality to intelligently bootstrap clang if it either doesn't exist or is out-of-date. This required exposing `command_context` to the linting logic, as it's needed to call `artifact_toolchain(...)`. Note that this means that the standalone `runcli.py` file won't be able to support bootstrapping `clang-format`, or other linters that lean on `command_context` in the future. Finally, `substs.get("HOST_BIN_SUFFIX")` was replaced with a windows-specific `binary += ".exe"`, because not all contexts where the tests are run will have access to populated `substs` data. Note that this worked before without the extension because it was only used for starting a process, in which context Windows automatically tries all `PATHEXT` options. Since we're now doing an `isfile()` check (to enable more intelligent failure cases when `clang-format` doesn't exist), we need the path to be fully correct. Differential Revision: https://phabricator.services.mozilla.com/D137335
13 lines
298 B
YAML
13 lines
298 B
YAML
---
|
|
clang-format:
|
|
description: Reformat C/C++
|
|
include:
|
|
- '.'
|
|
extensions: ['cpp', 'c', 'cc', 'h', 'm', 'mm']
|
|
support-files:
|
|
- 'tools/lint/clang-format/**'
|
|
type: external
|
|
payload: clang-format:lint
|
|
code_review_warnings: false
|
|
setup: clang-format:setup
|