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

Warn about external functions being added out of place

    XMLWordPrintable

    Details

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

      Description

      In MDLSITE-6096 it was agreed that se should be creating external functions under component\external[optional_subs]\. 1 external x class x file.

      Of course, like with any coding style change, there isn't any impeding urgency of making the whole codebase to align with that agreement.

      But it's ok to warn developers about the policy above, so this issue is about to add some Sniff able to:

      • Find "incorrect" external uses: basically classes extending external_api not being in the expected location, maybe also by file name (externallib...).
      • Warn about them pointing to the policy in the Docs and recommending to consider the move.

      That's it.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: