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

CodeChecker: false positives in recognising block classes when looking for illegal $PAGE usage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Deferred
    • Affects Version/s: 3.8.2
    • Fix Version/s: None
    • Component/s: Local: Code checker
    • Labels:
      None
    • Affected Branches:
      MOODLE_38_STABLE

      Description

      When we worked on CONTRIB-8031, Eloy Lafuente (stronk7) was worred that the block class detection would cause false positives, and he was right.

      For example this has just been raised in dev chat https://github.com/QuentinFombaron/moodle-block_point_view/blob/549584b973782981bb2b397fb2b3f18e6d24efdd/edit_form.php#L559

      The class is class block_point_view_edit_form extends block_edit_form, so the use of $PAGE there is correct, but we flag it.

      (And, it is not possible to rename the class, because Moodle naming rules require the class name to start with the component name - unless you use namespaces.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              timhunt Tim Hunt
              Participants:
              Component watchers:
              moodle.com, Eloy Lafuente (stronk7)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: