Re: Ignoring blocks of code..?
Simon Harris <[email protected]> Fri, 15 Apr 2005 01:12:17 +1000
| Newsgroups | gmane.comp.java.simian.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Mark, This is an interesting and ongoing debate in the simian user community; ie what to do about duplicates that you wish to ignore. There are a few options. One would be to mark-up the source code. If you are using C#, this is already possible as #region #endregion markers are already supported. If this doesn't work for you, or you are using some other language, another option would be to come up with some other kind of tag to indicate that simian should ignore it. Yet another possible solution would be have a file containing code fragments that are consider "legal" duplicates. And one final, yet somewhat volatile, approach would be to have a file containing files and line number ranges of code blocks to ignore. One thing that has come up occasionally is that duplicate blocks that one considers to be "legal" may well be candidates for code generation - thought his doesn't sound like it's the case in your situation. Or even template methods - though I have a general disdain for these. Any and all of these are possible, it's really a matter of what you think would work for you. Regards, Simon On 15/04/2005, at 12:19 AM, Mark Webb wrote: > > > Is there any way to ignore blocks of code from parsing? > > We have a number of code snippets that are flagged as duplicates, but > really are not (about a half dozen over 4million lines of code). > > It would be useful if there were either a directive I can put in the > code, or a flag I can pass to Simian that can ignore all code segments > that I have validated manually. > > If not, might this be something that can be added in a future version? > > Cheers > Mark > -- Simon Harris RedHill Consulting, Pty. Ltd. 12/55-67 Batman Street West Melbourne VIC 3003 http://www.redhillconsulting.com.au mob: +61 417 505 611 yahoo/skype: haruki_zaemon