forked from mirrors/gecko-dev
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
3 changed files with 12 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -34,6 +34,7 @@ ID
|
||||||
**/.projectile
|
**/.projectile
|
||||||
|
|
||||||
# User files that may appear at the root
|
# User files that may appear at the root
|
||||||
|
/.clang-tidy
|
||||||
/.mozconfig*
|
/.mozconfig*
|
||||||
/mozconfig*
|
/mozconfig*
|
||||||
/configure
|
/configure
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ compile_commands\.json
|
||||||
\.projectile
|
\.projectile
|
||||||
|
|
||||||
# User files that may appear at the root
|
# User files that may appear at the root
|
||||||
|
^\.clang-tidy
|
||||||
^\.mozconfig
|
^\.mozconfig
|
||||||
^mozconfig*
|
^mozconfig*
|
||||||
^configure$
|
^configure$
|
||||||
|
|
|
||||||
|
|
@ -249,11 +249,19 @@ def setup_vscode(command_context, vscode_cmd):
|
||||||
"--pch-storage",
|
"--pch-storage",
|
||||||
"memory",
|
"memory",
|
||||||
"--clang-tidy",
|
"--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
|
# Load the existing .vscode/settings.json file, to check if if needs to
|
||||||
# be created or updated.
|
# be created or updated.
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue