MStyle plugin restricted to *my* sources

Here you can present and discuss ideas about features you would like to have in the MDT. Every suggestion is welcome.

MStyle plugin restricted to *my* sources

Postby ReinhardHahn » 04 Jul 2012, 10:25

In addition to our yesterday's discussion about acknowlegding single warnings from the MStyle plugin I just want to tell you about the two typical use cases for us.

(1) In our project code, there are some parts (modules, layered_products) which are in complete not in our code ownership. So we normally don't change anything in this code and therefore are not interested in any warnings about code smells from there

-> therefore it would be great, if we could exclude certain directories from the MStyle analysis

(2) In our project code, there are many cases where we change original product code to fullfill our requirements. This is typically done in files named <class_name>_mods.magik. In these files the changed methods are often identical to the original method except for some very few lines. I try to keep the sources that way that these lines are marked by
Code: Select all
# OLD
#  <original code>
# END
# NEW
   <my code>
# END
Of course we are normally not interested in warnings about the code parts, which are unchanged with respect to the product code.

-> For this case it would be helpful, if we could permamently acknowlegde warnings concerning these parts, which we are not interested in to be analysed. Such an Acknowledgement should also remain unchanged if the selection or severity of the warning messages are changed. They should only be cleared, if explicitly done (for one acknowledgement, for a file, for a part tree or for the whole project)

-> Another more sophisticated solution would be
-- (a) define regular expressions for file names concerned (e.g. ".*(_mods/.*magik|.*_mods.magik)")
-- (b) define a regular expression for starting analysis (e.g. "^ # NEW")
-- (c) define a reqular expression for stop analyses (e.g. "^ # END")
-- If you are analysing a file named according to (a)
-- and if you analyse an element (method, define_shared_constant, etc) containing a line fulfilling (b) before a line fulfilling (c)
-- then automatically acknolegde all errors/warnings etc outside all ranges defined by (b) and (c) within that element

-> There should be a possibility to switch on/off the display of acknowledged messages.
ReinhardHahn
 
Posts: 1
Joined: 11 Jan 2010, 11:13

Re: MStyle plugin restricted to *my* sources

Postby Blazej » 04 Jul 2012, 15:42

Hello Reinhard,

You have a couple of really good ideas and we will consider them strongly while working on the next MStyle. This is the first version of this plug-in so there is surely a lot of room for improvement.

As for point (1) there is a workaround, I guess. You can always select/deselect certain directories using the combination of Ctrl and/or Shift keys and running the code check only on wanted containers. It should work for the time being until we make upgrades.
Błażej Sytar
MDT Support Team
ASTEC Sp. z o.o.
Blazej
 
Posts: 6
Joined: 29 Jun 2010, 12:33


Return to Wish list

Who is online

Users browsing this forum: No registered users and 1 guest

cron