facebook

JavaScript validation – strict line ending

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #251474 Reply

    fermataintl
    Member

    I am getting a warning on a simple if statement regarding strict line ending. Here is the code:

            if (this.text.length > 0)
                this.text += ' ';   // The line is not empty, so we need to put out a space.

    The warning is: Strict line ending error: ‘)’.

    It only happens on that one if statement. Is this a bug or am I misunderstanding something here?

    Thanks.
    Dean

    #251475 Reply

    fermataintl
    Member

    Also, I did not see the warning show up on the Problems tab.

    Dean

    #251678 Reply

    Riyad Kalla
    Member

    Dean,
    I can’t reproduce this using the code snippet above in an empty JavaScript file named test.js, here is my content:

    
    function something()
    {
    if (this.text.length > 0)
                this.text += ' ';   // The line is not empty, so we need to put out a space.
    }
    

    Can you give me a full file snippet that exhibits the behavior you are seeing? Also try right clicking on your project, go to MyEclipse > Remove all validation markers, then rebuild it. Does the marker come back?

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: JavaScript validation – strict line ending

You must be logged in to post in the forum log in