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

false unexpected end of line errors

1 Answer 23 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mike
Top achievements
Rank 1
Mike asked on 14 Jul 2015, 02:12 PM

JustCode is incorrectly flagging some common JavaScript code as "JavaScript: unexpected end of line" when declaring an inline new object (as part of an MVC view). This option is controlled by JustCode User Options->Code ​Analysis -> Problems->JavaScript->Language Errors and the only way I know of to turn this off is by changing all language erros to be warnings or ingored entirely for JavaScript. I don't want to do this as I want legitimate errors to be flagged. An example is the following:

 

var url = '@Html.Raw(Url.Action("Forms", new {           <- error flagged here      
              numberOfWeeks = ViewBag.NumberOfWeeks,
              columnIndex = "colIndex",
              fiscalYear = "fy",
              formType = ViewBag.FormType,
              orgType = ViewBag.OrgType,
              workflowStatus = ViewBag.WorkflowStatus,
              orgName = ViewBag.OrgName,
              ParentLevel = Model.OrgLevel - 1,// ViewBag.ParentLevel,
              StartMonth = ViewBag.StartMonthString,
              EndMonth = ViewBag.EndMonthString
          }
          ))';                                                                     <- error flagged here

 

Please let me know if there is a workaround for this or if this has been fixed (please proved release number).

 Thanks

1 Answer, 1 is accepted

Sort by
0
Nikolay Valchev
Telerik team
answered on 17 Jul 2015, 07:08 AM
Hello Mike,

Thank you for the report!
We reproduced the Good-Code-Red you mentioned and logged it in our backlog system for further fixing, so stay tuned!
Unfortunately, there is no other workaround apart from ignoring the false error.

If you have any further questions or remarks, do not hesitate to address them to us!

Best Regards,
Nikolay Valchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Code Analysis
Asked by
Mike
Top achievements
Rank 1
Answers by
Nikolay Valchev
Telerik team
Share this question
or