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:
Andi 2022-04-27 09:10:21 +00:00
parent c67270d485
commit d7da2ecade
3 changed files with 12 additions and 2 deletions

1
.gitignore vendored
View File

@ -34,6 +34,7 @@ ID
**/.projectile
# User files that may appear at the root
/.clang-tidy
/.mozconfig*
/mozconfig*
/configure

View File

@ -27,6 +27,7 @@ compile_commands\.json
\.projectile
# User files that may appear at the root
^\.clang-tidy
^\.mozconfig
^mozconfig*
^configure$

View File

@ -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: