SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-2122

Python plugin failes to parse a source file with a non-blank last line

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: PYTHON-1.0
    • Fix Version/s: PYTHON-1.1
    • Component/s: Python
    • Labels:
      None
    • Environment:
      Observed on Windows; probably all affected
    • Number of attachments :
      1

      Description

      The plugin throws a parse error if a source file failes to end with a blank line (containing only "\n"). See attached example.

        Activity

        Hide
        Evgeny Mandrikov added a comment -

        For the record: parser fails on the following sequence of tokens - "INDENT, DEDENT'.

        Show
        Evgeny Mandrikov added a comment - For the record: parser fails on the following sequence of tokens - "INDENT, DEDENT'.
        Hide
        Evgeny Mandrikov added a comment -

        Most probably issue comes from Lexer, which should not generate INDENT token for such line.

        Show
        Evgeny Mandrikov added a comment - Most probably issue comes from Lexer, which should not generate INDENT token for such line.
        Hide
        Evgeny Mandrikov added a comment -

        Fixed.

        Show
        Evgeny Mandrikov added a comment - Fixed.
        Hide
        Waleri Enns added a comment -

        tested

        Show
        Waleri Enns added a comment - tested

          People

          • Assignee:
            Evgeny Mandrikov
            Reporter:
            Waleri Enns
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: