devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 2/3] dtc: dt-check-style: Properly detect comments in multi-line properties
Date: Sun, 06 Sep 2026 18:15:32 +0000	[thread overview]
Message-ID: <20260906181533.203811F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260906180437.166760-5-krzysztof.kozlowski@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Reclassifying pure comment lines inside multi-line properties as `LineType.CONTINUATION` causes them to bypass multiple style checks (line length, trailing whitespace, hex casing).
--

commit 86dbc1bb67649327675e097829b541fa2d7bd913
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

dtc: dt-check-style: Properly detect comments in multi-line properties

This commit updates the dt-check-style script to properly detect comments in
multi-line properties. It reorders the classification logic so that
continuation lines are detected before comments, preventing false positive
indentation warnings for pure comment lines within a continued property.

> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index eae933780c1fd..36e5b5db5e14c 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
> @@ -202,6 +202,14 @@ def classify_lines(text):
>          if opens_block:
>              in_block_comment = True
>  
> +        if not prev_complete:
> +            dl = DtsLine(i, raw, LineType.CONTINUATION, depth, indent_str, code)
> +            out.append(dl)
> +            prev_complete = (code.endswith(';') or
> +                             code.endswith('{') or
> +                             code.endswith('};'))
> +            continue
> +

[Severity: Medium]
Will this change cause pure comment lines inside multi-line properties to
bypass multiple style checks like line length, trailing whitespace, and hex
casing?

By reclassifying pure comment lines inside incomplete properties as
LineType.CONTINUATION here, they are moved into dl.continuations instead of
ctx.lines.

Functions like check_hex_case(), check_line_length(), and
check_trailing_whitespace() only iterate over ctx.lines, so they will
silently skip these newly moved pure comment lines.

While there is a pre-existing flaw where regular continuation lines are
already missed by these checks, this patch actively regresses coverage for
pure comment lines by moving them into this blind spot as well. The
subsequent patch in the series does not resolve this.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260906180437.166760-4-krzysztof.kozlowski@oss.qualcomm.com?part=2

  reply	other threads:[~2026-09-06 18:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 18:04 [PATCH 1/3] dtc: dt-check-style: Right strip whitespaces, leftovers before comments Krzysztof Kozlowski
2026-09-06 18:04 ` [PATCH 2/3] dtc: dt-check-style: Properly detect comments in multi-line properties Krzysztof Kozlowski
2026-09-06 18:15   ` sashiko-bot [this message]
2026-09-09  7:59     ` Krzysztof Kozlowski
2026-09-06 18:04 ` [PATCH 3/3] dtc: dt-check-style: Consistently pass same content as stripped line Krzysztof Kozlowski
2026-09-06 18:13   ` sashiko-bot
2026-09-09  8:33     ` 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=20260906181533.203811F00A3A@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;
as well as URLs for NNTP newsgroup(s).