public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: amikan@ilbers.de, adriaan.schmidt@siemens.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH v2 1/2] isar-sstate lint: strip variable value
Date: Fri, 12 Aug 2022 10:08:59 +0200	[thread overview]
Message-ID: <20220812080900.1601235-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20220812080900.1601235-1-felix.moessbauer@siemens.com>

By stripping any leading whitespaces, the script now also detects
cachability problems in variables that are just appended to.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 scripts/isar-sstate | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/isar-sstate b/scripts/isar-sstate
index 3a1945e7..5972144d 100755
--- a/scripts/isar-sstate
+++ b/scripts/isar-sstate
@@ -824,9 +824,12 @@ def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, **kwargs):
                    sigdata['taskwhitelist'] and name in sigdata['taskwhitelist'] or \
                    name in ADDITIONAL_IGNORED_VARNAMES:
                     continue
-                if not val or not val[0] == '/':
+                if not val:
+                    continue
+                # remove leading whitespaces possibly added by appending
+                val = val.lstrip()
+                if not val[0] == '/':
                     continue
-                task = sigdata['task']
                 if val.startswith(build_dir):
                     pn_issues.append(f'\033[0;31m-> path in build-dir:   {name} = "{val}"\033[0m')
                     hits_builddir += 1
-- 
2.30.2


  reply	other threads:[~2022-08-12  8:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12  8:08 [PATCH v2 0/2] Improve cachability of isar-bootstrap Felix Moessbauer
2022-08-12  8:08 ` Felix Moessbauer [this message]
2022-08-12  8:09 ` [PATCH v2 2/2] improve " Felix Moessbauer
2022-08-24  7:08 ` [PATCH v2 0/2] Improve " Anton Mikanovich

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=20220812080900.1601235-2-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=adriaan.schmidt@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /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