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

[PATCH 0/3] xen-analysis.py: Enable Xen deviation tag at the end of the line



This serie is enabling the xen-analysis tool to parse and substitute correctly
a deviation tag put at the end of the line containing a deviation to be 
deviated.

Before this serie the only way to deviate a violation was to put the tag in the
line above:

/* SAF-<id>-safe deviate the bla bla bla */
<line containing the violation>

But there are places in the code base where using the tag in the line above is
not convinient, for example:

if ( (expression) &&
     ((expression with violation) ||
     (expression) )
{
  [...]
}

In the above example is better to have the suppression comment at the end of the
line:

if ( (expression) &&
     ((expression with violation) || /* SAF-<id>-safe deviate the bla bla bla */
     (expression) )
{
  [...]
}

This clearly brings up the question about the code style line length, which in
this case needs to be amended for Xen deviation tags that goes above the limit.

Luca Fancellu (3):
  xen-analysis.py: Use named group for tag regex
  xen-analysis.py: Substitute only the comment instead of the line
  xen-analysis.py: Accept deviation comment at the end of the line

 docs/misra/documenting-violations.rst         | 10 ++++
 xen/scripts/xen_analysis/cppcheck_analysis.py |  4 +-
 xen/scripts/xen_analysis/generic_analysis.py  | 14 +++--
 xen/scripts/xen_analysis/tag_database.py      | 59 ++++++++++++++-----
 xen/scripts/xen_analysis/utils.py             |  2 +-
 5 files changed, 67 insertions(+), 22 deletions(-)

-- 
2.34.1




 


Rackspace

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