Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-2132

RFC: Clarify the line wrapping/indentation rules

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Done
    • Component/s: Coding style
    • Labels:
      None

      Description

      This issue has been hijacked to gather together another of indentation style related issues which have been made subtasks of this general issue.

      Right now, the rules about wrapping lines in code says clearly that a 8-spaces indentation must be used, but later the example shows the use for a control structure (if), not for general use were people could think that 4-spaces is the norm.

      http://docs.moodle.org/dev/Coding_style#Wrapping_lines

      This is a request to clarify that by:

      1) Explicitly saying that the 8-spaces rule is for any code (general and control structures).
      2) Providing one more example of the rule in general code.

      Ciao

      PS: All this comes from CONTRIB-3562 and current inability for the codechecker to verify that indentation. So for now, better make the rule clearer.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: