From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 6/9] dtc: dt-check-style: Fix alignment of values in continued property lines
Date: Sun, 26 Jul 2026 15:56:44 +0000 [thread overview]
Message-ID: <20260726155645.81CEF1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260726-n-dts-style-checker-continued-v1-6-b05b8f897670@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The new alignment rule incorrectly forces a standalone closing bracket (e.g., '>;') to align with inner values instead of the opening bracket.
- [Low] The hardcoded error message is misleading when target_offset == 1, as it claims the expected column is 'under < or "'.
--
--- Patch [6]: [PATCH 6/9] dtc: dt-check-style: Fix alignment of values in continued property lines ---
commit 3d17d86c35121d71a779318164c4a25fa384d8c1
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dtc: dt-check-style: Fix alignment of values in continued property lines
This commit updates the dt-check-style script to enforce that continued
property lines aligning to inner values are indented one space past the
opening '<' or '"'. It also includes tests to verify this behavior.
> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index 4d90fbec0e391..171a5e12fcbd8 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
[ ... ]
> @@ -928,15 +929,18 @@ def check_continuation_alignment(ctx):
> continue
> # First '<' or '"' after '='
> rest = dl.raw[eq + 1:]
> - m = re.search(r'[<"]', rest)
> + m = re.search(r'\s*([<"])', rest)
> if not m:
> continue
> - target_col = _display_col(dl.raw[:eq + 1 + m.start()])
> + target_col = _display_col(dl.raw[:eq + 1 + m.start(1)])
> for cont in dl.continuations:
> - if _display_col(cont.indent_str) != target_col:
> + target_offset = 0
> + if not re.match(r'[<"]', cont.stripped):
> + target_offset = 1
[Severity: Medium]
Will this new alignment rule incorrectly flag standalone closing brackets?
If a continuation line is just a closing bracket like ">;", the script
evaluates re.match(r'[<"]', cont.stripped) as false, which sets
target_offset = 1. This forces developers to indent the closing bracket
one space to the right of the opening bracket instead of aligning them.
> + if _display_col(cont.indent_str) != target_col + target_offset:
> yield (cont.lineno,
> 'continuation should align to column %d '
> - '(under < or ")' % (target_col + 1))
> + '(under < or ")' % (target_col + target_offset + 1))
[Severity: Low]
Is this error message accurate when target_offset is 1?
When the script expects alignment to the inner value (target_offset == 1),
the error message still tells developers to align "(under < or ")". This
could be confusing since the target column provided is actually one space
to the right of the bracket or quote.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260726-n-dts-style-checker-continued-v1-0-b05b8f897670@oss.qualcomm.com?part=6
next prev parent reply other threads:[~2026-07-26 15:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 15:47 [PATCH 0/9] dtc: dt-check-style: Improvements for false positives Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 1/9] dtc: dt-check-style: Add missing /dts-v1/ to few test cases Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 2/9] dtc: dt-check-style: Simplify setting depth of DtsLine Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 3/9] dtc: dt-check-style: Handle root node in overlays Krzysztof Kozlowski
2026-07-26 16:00 ` sashiko-bot
2026-08-01 17:43 ` Krzysztof Kozlowski
2026-08-01 17:45 ` Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 4/9] dtc: dt-check-style: Handle sorting of top-level nodes and properties Krzysztof Kozlowski
2026-07-26 15:57 ` sashiko-bot
2026-08-01 21:19 ` Krzysztof Kozlowski
2026-08-01 21:31 ` Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 5/9] dtc: dt-check-style: Drop stray backslash before quote for continuation-alignment Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 6/9] dtc: dt-check-style: Fix alignment of values in continued property lines Krzysztof Kozlowski
2026-07-26 15:56 ` sashiko-bot [this message]
2026-08-02 8:22 ` Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 7/9] dtc: dt-check-style: Consistently call 'kind' as 'file_type' Krzysztof Kozlowski
2026-07-26 15:53 ` sashiko-bot
2026-07-26 15:47 ` [PATCH 8/9] dtc: dt-check-style: Introduce 'stricter' mode Krzysztof Kozlowski
2026-07-26 15:54 ` sashiko-bot
2026-08-02 8:30 ` Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 9/9] MAINTAINERS: dt-bindings: Include dt-check-style in DT binding entry Krzysztof Kozlowski
2026-07-27 19:54 ` [PATCH 0/9] dtc: dt-check-style: Improvements for false positives 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=20260726155645.81CEF1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox