misc meson.build and clang-format updates
Vishal Verma
maintainercover misc meson.build and clang-format updates
Patch 1 adds a .clang-format option to reformat macros for aligning
Patch 2 squelches a warning from a meson update.
---
Vishal Verma (2):
clang-format: Align consecutive macros and #defines meson.build: add a check argument to run_command
.clang-format | 1 + meson.build | 1 + 2 files changed, 2 insertions(+)
---
base-commit: 3591a1bea2bd90349963b02aeb9064dc3fbd3d83
change-id: 20221206-vv-misc-12ffd1061e0a
Best regards,
Signature · 1 line
Vishal Verma <[email protected]>
Vishal Verma
maintainerPATCH 1/2 clang-format: Align consecutive macros and #defines
Add AlignConsecutiveMacros: true so that blocks of consecutive #defines can be neatly aligned.
--- .clang-format | 1 + 1 file changed, 1 insertion(+)
.clang-format +1 -0
@@ -13,6 +13,7 @@ AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false +AlignConsecutiveMacros: true #AlignEscapedNewlines: Left # Unknown to clang-format-4.0 AlignOperands: true AlignTrailingComments: false
Signature · 1 line
2.38.1
Re: [PATCH ndctl 1/2] clang-format: Align consecutive macros and #defines
Quoted 7 lines · Vishal Verma
Add AlignConsecutiveMacros: true so that blocks of consecutive #defines can be neatly aligned.
Cc Dan Williams <[email protected]>Reported-by Alison Schofield <[email protected]>Signed-off-by Vishal Verma <[email protected]>---
Thanks Vishal!
Quoted 18 lines
.clang-format | 1 + 1 file changed, 1 insertion(+).clang-format +1
-0@@ -13,6 +13,7 @@ AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false +AlignConsecutiveMacros: true #AlignEscapedNewlines: Left # Unknown to clang-format-4.0 AlignOperands: true AlignTrailingComments: falseSignature · 2 lines
-- 2.38.1
Vishal Verma
maintainerPATCH 2/2 meson.build: add a check argument to run_command
In reply to Vishal VermaMeson has started to warn about:
WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300
There is one instance of run_command() in the top-level meson.build which elides the explicit check argument. Since we don't care about the result of clean_config.sh (if any config.h are found they will be cleaned, and if none are found, we're fine), add a 'check: false' argument to this and squelch the warning.
--- meson.build | 1 + 1 file changed, 1 insertion(+)
meson.build +1 -0
@@ -89,6 +89,7 @@ env = find_program('env') if git.found() run_command('clean_config.sh', env : 'GIT_DIR=@0@/.git'.format(project_source_root), + check : false, ) endif
Signature · 1 line
2.38.1
RE: [PATCH ndctl 2/2] meson.build: add a check argument to run_command
Quoted 7 lines · Vishal Verma
Meson has started to warn about:
WARNING: You should add the boolean check kwarg to the
run_commandcall.
It currently defaults to false,
but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300
Quoted 5 lines
There is one instance of
run_command()in the top-level meson.build which elides the explicit check argument. Since we don't care about the result ofclean_config.sh(if anyconfig.hare found they will be cleaned, and if none are found, we're fine), add a 'check: false' argument to this and squelch the warning.
Looks good to me: