[PATCH v3] dts: add test case docstring checks to format script
Luca Vizzarro
Luca.Vizzarro at arm.com
Thu Jan 22 12:57:34 CET 2026
Hi Dean,
Sorry for the long wait, this should be the last version as it looks all
good to me. Only thing is that the call to the script needs fixing.
On 06/11/2025 18:13, Dean Marx wrote:
> diff --git a/devtools/dts-check-format.sh b/devtools/dts-check-format.sh
> index 907eed1293..f2cd5a56a1 100755
> --- a/devtools/dts-check-format.sh
> +++ b/devtools/dts-check-format.sh
> @@ -13,6 +13,7 @@ usage() {
> format=true
> lint=true
> typecheck=true
> +docstringcheck=true
>
> # Comments after args serve as documentation; must be present
> while getopts "hflt" arg; do
> @@ -97,6 +98,13 @@ if $lint; then
> echo "ruff not found, unable to run linter"
> errors=$((errors + 1))
> fi
> + if $docstringcheck; then
> + docstring_script_path=$(dirname "$0")
> + docstring_script_path=$(cd "$docstring_script_path" && pwd)
> + docstring_script="$docstring_script_path/dts-check-docstrings.py"
> + $docstring_script
This way of figuring out the path doesn't work for me and our internal
CI, so it's causing the script to fail.
This script already defines $directory and cds into it. Therefore you
can always assume that the current working directory at this point is
the dts folder. You can therefore remove the 4 lines above and just do:
../devtools/dts-check-docstrings.py
> + errors=$((errors + $?))
> + fi
> fi
>
> if $typecheck; then
I've made this change myself to test if the script works correctly, and
it does seem so. Only problem is that it now causes the CI to fail
because of a test suite (dynamic_queue_conf) not respecting the checks.
It'd be great if you'd also send a patch along this one fixing that test
suite.
Best,
Luca
More information about the dev
mailing list