This is a migrated thread and some comments may be shown as answers.

Code cleaning deletes JavaScript references

3 Answers 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mark Ewer
Top achievements
Rank 2
Mark Ewer asked on 23 Apr 2014, 09:35 PM
I love the code cleaning feature of JustCode, but I have found a problem with it.  In Visual Studio you use a comment that starts with three slashes.  But, if you turn on the code cleaning feature to introduce header text, it deletes all of the references!  And, of course, this breaks the JavaScript IntelliSense.

So, I had this:

     /// <reference path="../../Scripts/_references.js" />
     /// <reference path="../app.js" />'use strict';
     var menuCtrl = clippyApp.controller('menuCtrl');

but JustCode turned it into this when I chose the code cleaning option

     // HEADER TEXT
     var menuCtrl = clippyApp.controller('menuCtrl');

All of the <reference> lines where deleted from the file.

3 Answers, 1 is accepted

Sort by
0
Accepted
Svetlozar
Telerik team
answered on 28 Apr 2014, 11:28 AM
Hi,

Thank you for your feedback and sorry for the inconvenience!

If you execute Introduce Header and there are existing comments in the file JustCode will remove them, because there is no way to know if these are old header text you want to remove or meaningful comments. 

However, we can assume that JavaScript references are meaningful comments that should stay intact. We have already fixed that, so please, stay tuned for our next release.

Most probably we will add an option whether we should remove or leave existing comments on Introduce Header, what do you think? 

Regards,
Svetlozar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mark Ewer
Top achievements
Rank 2
answered on 28 Apr 2014, 07:19 PM
I expected it to remove existing comments ... but the reference lines are not comments!  I don't want to run into the situation where it has multiple header blocks at the top of the file.  In my opinion, removing the comments from the top of the file makes sense, but the JavaScript references are different. 
0
Svetlozar
Telerik team
answered on 29 Apr 2014, 02:44 PM
Hello,

This is what we did, Introduce Header now removes all comments except for JavaScript references and introduces the header. It will be included in our next release, so please, stay tuned!

If you have any other problems or suggestions, please don't hesitate to write back.

Regards,
Svetlozar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Mark Ewer
Top achievements
Rank 2
Answers by
Svetlozar
Telerik team
Mark Ewer
Top achievements
Rank 2
Share this question
or