mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1766262 - move clang-tidy arguments for clangd from cli to spcific file. r=marco
Differential Revision: https://phabricator.services.mozilla.com/D144577
This commit is contained in:
parent
c67270d485
commit
d7da2ecade
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,6 +34,7 @@ ID
|
||||
**/.projectile
|
||||
|
||||
# User files that may appear at the root
|
||||
/.clang-tidy
|
||||
/.mozconfig*
|
||||
/mozconfig*
|
||||
/configure
|
||||
|
@ -27,6 +27,7 @@ compile_commands\.json
|
||||
\.projectile
|
||||
|
||||
# User files that may appear at the root
|
||||
^\.clang-tidy
|
||||
^\.mozconfig
|
||||
^mozconfig*
|
||||
^configure$
|
||||
|
@ -249,11 +249,19 @@ def setup_vscode(command_context, vscode_cmd):
|
||||
"--pch-storage",
|
||||
"memory",
|
||||
"--clang-tidy",
|
||||
"--clang-tidy-checks",
|
||||
",".join(clang_tidy_cfg.checks),
|
||||
],
|
||||
}
|
||||
|
||||
clang_tidy = {}
|
||||
clang_tidy["Checks"] = ",".join(clang_tidy_cfg.checks)
|
||||
clang_tidy.update(clang_tidy_cfg.checks_config)
|
||||
|
||||
# Write .clang-tidy yml
|
||||
import yaml
|
||||
|
||||
with open(".clang-tidy", "w") as file:
|
||||
yaml.dump(clang_tidy, file)
|
||||
|
||||
# Load the existing .vscode/settings.json file, to check if if needs to
|
||||
# be created or updated.
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user