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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 3.8.2
    • Local: Code checker
    • None
    • MOODLE_38_STABLE

      When we worked on CONTRIB-8031, 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.)

            moodle.com Moodle HQ
            timhunt Tim Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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