false unexpected end of line errors

Thread is closed for posting
2 posts, 0 answers
  1. Mike
    Mike avatar
    1 posts
    Member since:
    Feb 2015

    Posted 14 Jul 2015 Link to this post

    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).


  2. Nikolay Valchev
    Nikolay Valchev avatar
    72 posts

    Posted 17 Jul 2015 Link to this post

    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
    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
Back to Top