Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-19247

PHP CodeSniffer: tool for coding standard consistency

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Inactive
    • Icon: Minor Minor
    • None
    • 2.0
    • Administration
    • None
    • MOODLE_20_STABLE

      To help improve the consistency and readability of Moodle code, I've added a standalone version of PEAR PHP_CodeSniffer in lib/pear. I've also added a small CLI script called phpcs

      The tool produces a report (per-file, summary or XML) of requested files, or of recursed directories.

      I've modified the PEAR code slightly so that it will default to the Moodle standard. Other standards have been removed.

      Another modification is to detect the presence of a "thirdpartylibs.xml" file in folders. This file is used to ignore any non-moodle code, because we won't be changing them so there is no need to report their errors. I've created one for lib/. This file could be used to help us manage the 3rd party library updates and track their licenses and versions.

      Coding guidelines used to create the CodeSniffer Moodle Standard: http://docs.moodle.org/en/Development:Coding_style#Files

            Unassigned Unassigned
            nicolasconnault Nicolas Connault (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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