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

Enforce coding guidelines for trailing comma in multi-line array declaration

    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

      This is about to enforce the following policy decided recently (MDLSITE-5873).

      Policy: Trailing comma in multi-line array declaration

      Since 20th May 2020, this rule applies:

      1. The uses of a trailing comma on multi-line array declaration is required in PHP and JS.
      2. It's NOT required to change all current old-style occurrences in the codebase. We'll follow a progressive approach here (new code and modified code)

      For example for the expected format:

      $foo = [
          'a',
          'b',
          'c',
      ];

       

      This issue is about to verify these details in the codechecker. Nothing more, nothing less.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: