[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: Add MISRA support to cppcheck make rule


  • To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 31 May 2022 16:28:54 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6j9mqNrhmK9XxBuGTNN7DA3oCNdIfkJ/LVoT20sdNOo=; b=YFdjCzm+h+HS5XzkBvwmKfN6ImWGzX68YDYle3w0vL/D05LsA4OJMCPIYi7QwIhFsY+5ZCGWWDMjnOtWjkKuAtiEIdi3IpsBf+5Z4cfOm74hJXbw07pG5upsl2/8wQDKT1iXWLmXmXix1WMd3W8E7KDn8RhGKPU6XpigWk+m06Wbzfm3zqtVNn8rTteiJAf23omvZpQ6bpvTFRczqAvvAIBEhYszslBGsommpFUwQ9Hq99O7ikj+jdwYkTMJBNJ2TZ6uS61scqUlXpSuywpyyD+/fGdfFkdoJlhq3Cd1XoayULHqBsSWT3fTV3j4JX7OTeBkGi0JoMXLAWHVyt5WGg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m9YmhSOHLUYihU8vXm52nvilljZ8t4x0GV3aLiBNklW6L/ZaVPXgwBSwzgZl0sxMYyXH9/kJh79KqrP8+WiX9xVCJic9ViAfeIilxWN4qT9HS1PkGIc6alh6eZ1cTtS/ikuP++XA3jPxcPWEdZaJsiGzqrMNwSugrmmCHeFBkWAATurtEiMp79CGhcMN24//4bypFcjIN8Iges3K0udBPnQ4GdlzCi4tY9DXaapqOVCiAdrvqWfqr2v7zxFIuGlC/YOmH4LCT3oFQNhT039CMMu9zk7KAIAwhPXDrcap96h+DfXtSVN7QSrmyPaBLRLfTLBymiuHGjaqJi3A1tlltA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 31 May 2022 14:29:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.05.2022 16:14, Bertrand Marquis wrote:
>> On 31 May 2022, at 14:50, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> On 31.05.2022 15:30, Bertrand Marquis wrote:
>>> +# Replace current by goal in the dependency to generate an analysis for all
>>> +# rules we would like to respect.
>>> +cppcheck-misra.json cppcheck-misra.txt: $(XEN_ROOT)/docs/misra/rules.rst
>>> +   $(Q)$(srctree)/tools/convert_misra_doc.py -i $< -o cppcheck-misra.txt \
>>> +           -j cppcheck-misra.json
>>> +
>>> +# Prevent parallel make issues as script is generating both files
>>> +cppcheck-misra.json: cppcheck-misra.txt
>>
>> With this dependency the earlier rule should not list multiple targets
>> (and it generally should not, for not being a pattern rule). If I'm not
>> mistaken the way you have it the Python script would be invoked twice,
>> and all you prevent is that it is invoked twice in parallel. And then
>> please use $@ inside the rule. Additionally, with the script being an
>> in-tree one, the rule should also have a dependency on that script
>> (such that the targets would be rebuilt if the script alone changes).
> 
> I am a bit lost on the $@, previous patch adding cppcheck was changed
> to use $(Q) instead. So can you justify this request ?

I'm talking of $@ (a macro expansion), not @ as a prefix to suppress
command echoing.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.