Good find and thanks for providing the fix. I use this task a lot and would like to see the issue fixed in CVS.
I think it would help Gert and the other committers if you would file a bug in the bug tracker on SF and then attach the patch of the fix to that issue. I would think that it would a) cause the issue not to get lost and b) make it easier to apply the fix and commit it into CVS. Jason >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On >Behalf Of Bertrand Belair >Sent: Saturday, May 14, 2005 6:42 AM >To: nantcontrib-developer@lists.sourceforge.net >Subject: [NAntC-Dev] CodeStats - Incorrect Comment Count > >Hi, > >I was using the CodeStats task and discovered that it produces >inaccurate results for block comments in C#. >It does not correctly count the lines of comments within a >block comment (/* ... */ spread across multiple lines). > >The following modifications of lines 313 and 318 appear to >solve the problem in the small sampling I have done. > >Line 313, from: > if(line.IndexOf(_commentStarSlash)== 0) { > >Line 313, to: > if(line.IndexOf(_commentStarSlash)==-1) { > > >Line 318, from: > if(line.IndexOf(_commentStarSlash)>0) { > >Line 318, to: > if(line.IndexOf(_commentStarSlash)>=0) { > > >For example: >-- example ---------------------------------------- >// comment >// > >/* >comment >*/ > >using System; >-- example ---------------------------------------- > >With the existing code: >Total: 8 - Comment: 3 - Empty: 2 > >With the above changes: >Total: 8 - Comment: 5 - Empty: 2 > > >Bert > > >______________________________________________________________________ >Post your free ad now! http://personals.yahoo.ca > > >------------------------------------------------------- >This SF.Net email is sponsored by Oracle Space Sweepstakes >Want to be the first software developer in space? >Enter now for the Oracle Space Sweepstakes! >http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click >_______________________________________________ >NAntContrib-Developer mailing list >NAntContrib-Developer@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer > ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_idt12&alloc_id344&op=click _______________________________________________ NAntContrib-Developer mailing list NAntContrib-Developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer