All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sven Peter" <sven@kernel.org>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH 2/2] dt-check-style: Handle indented fragments in indent-consistent
Date: Sun, 30 Aug 2026 18:29:57 +0000	[thread overview]
Message-ID: <20260830182958.43FC81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260830-b4-dts-check-fix-v1-2-e7c1b2774730@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The error message for indentation mismatch ignores the newly added fragment prefix, leading to mathematically incorrect and highly confusing feedback for developers.
--

commit f969e2d48b468cab099652ff63ddd56c43afbb19
Author: Sven Peter <sven@kernel.org>

dt-check-style: Handle indented fragments in indent-consistent

This commit updates the indent-consistent check to account for constant
indentation prefixes in include fragments. It adds the fragment prefix
to the expected indentation and includes test fixtures.

> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index 2afc05fa66023..f867cb6d80709 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
[ ... ]
> @@ -498,7 +499,7 @@ def check_indent_consistent(ctx):
>          # The indent must be 'unit' repeated dl.depth times, exactly.
>          # NODE_CLOSE lines have depth equal to the post-decrement value,
>          # which matches the indent expected.
> -        expected = unit * dl.depth
> +        expected = prefix + unit * dl.depth
>          if dl.indent_str != expected:
>              yield (dl.lineno,
>                     'indent mismatch (expected depth %d * %r)' %
>                     (dl.depth, unit))

[Severity: Low]
Should the error message be updated to reflect the newly calculated expected
indentation? Since expected now includes the prefix, printing just 
dl.depth * unit could be confusing for developers trying to match the
indentation required by the tool.

[ ... ]
> diff --git a/scripts/dtc/dt-style-selftest/expected/dts-fragment-indent.dtsi.txt b/scripts/dtc/dt-style-selftest/expected/dts-fragment-indent.dtsi.txt
> new file mode 100644
> index 0000000000000..84ec8eb734688
> --- /dev/null
> +++ b/scripts/dtc/dt-style-selftest/expected/dts-fragment-indent.dtsi.txt
> @@ -0,0 +1,3 @@
> +# mode=strict
> +bad/dts-fragment-indent.dtsi:9: [indent-consistent] indent mismatch (expected depth 2 * '\t')
> +bad/dts-fragment-indent.dtsi:10: [indent-consistent] indent mismatch (expected depth 2 * '\t')

[Severity: Low]
Does this test case intentionally assert the potentially misleading error 
message? If the message in check_indent_consistent is updated to include 
the prefix, this expected output would also need to be adjusted.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260830-b4-dts-check-fix-v1-0-e7c1b2774730@kernel.org?part=2

  reply	other threads:[~2026-08-30 18:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 18:24 [PATCH 0/2] dt-check-style support for indented include fragments Sven Peter
2026-08-30 18:24 ` [PATCH 1/2] dt-check-style: Handle indented fragments in indent-unit-dts Sven Peter
2026-09-01  8:21   ` Krzysztof Kozlowski
2026-08-30 18:24 ` [PATCH 2/2] dt-check-style: Handle indented fragments in indent-consistent Sven Peter
2026-08-30 18:29   ` sashiko-bot [this message]
2026-09-01  8:22   ` Krzysztof Kozlowski
2026-09-01  8:49     ` Sven Peter
2026-09-01  9:40       ` Krzysztof Kozlowski
2026-09-01  9:53         ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260830182958.43FC81F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sven@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.