Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-3830

Improve the way moodle-checker reports line numbers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • Integration
    • None

      Actually the moodle-checker reports the 1st line in a comment to be the problematic one in a number of situations.

      And that's correct enough usually.

      But it has been detected that, sometimes, specially when used for CiBoT prechecker, where the errors are filtered based in the patch diffs, it can lead to some problems, confusion.

      As a good example of this see:

      http://integration.moodle.org/job/Precheck%20remote%20branch/10941/

      There, given how diff works, the patch "inaccurately" keeps the leading /* line as unmodified and instead, it decides that the changed one is the next /* one, corresponding to another phpdoc block.

      So, at the end, CiBoT ends reporting phpdocs problems for a class that has not been modified really.

      It's just the mix of diff inaccuracy and moodle-checker using that very first line, the one causing the problem reported.

      So there are two solutions for this:

      1) Or we find a way to produce more accurate diff files from git (don't think it's possible, afaik, to be honest).
      2) Or we introduce a change to the moodle-checker to, instead of reporting the first /** line in the phpdocs, we try to, always, point to the "content" line that better describes the problem (in this case, the 1st after the open-comment one).

      Note this is not critical at all, but still noticeable when there are many functions together (say interfaces, say organizational inheritance..).

      Ciao

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.