Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-6195

Codechecker whitespace sniffs seem to be off

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Local: Code checker
    • Labels:
      None
    • Plugin Version:
      2.5.2
    • Affected Branches:
      MOODLE_31_STABLE

      Description

      This may be related to CONTRIB-6146.

      Codechecker seems to be misreporting indenting when scanning plugins. On previous builds of codechecker (2011040400) the utility reported no errors, however the build from (2016031400) is reporting lines that SHOULD NOT be indented as needing to be indented multiple spaces.

      It seems to be misreporting lines that immediately follow lines have been split due to their length.
      Here are some examples from my plugin:

      https://github.com/sbourget/moodle-mod_pcast/blob/master/edit.php#L106
      #106: $episode->mediafile·=·$draftitemid;
      Line indented incorrectly; expected at least 24 spaces, found 0

      https://github.com/sbourget/moodle-mod_pcast/blob/master/edit_form.php#L74
      #74: ········//·Media·File.
      Line indented incorrectly; expected at least 12 spaces, found 8

      Note: Once codechecker misreports one line, it identifies every line in the rest of the file as being incorrectly indented.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              sbourget Stephen Bourget
              Participants:
              Component watchers:
              moodle.com, Eloy Lafuente (stronk7)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: