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

Remove all illegal whitespace from core

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.10.8, 3.11.4
    • 3.9.10, 3.10.7, 3.11.3, 4.0
    • General

      Since the beginning of the time, we have a CI job that ensures that the illegal whitespace in core (3rd party libraries and some special files apart) doesn't grow.

      https://integration.moodle.org/view/master/job/02.%20Illegal%20whitespace%20(master)/

      Illegal whitespace is:

      • trailing whitespace
      • tabs instead of 4-spaces for indentation.

      The job works by saving the latest execution # of illegal occurrences (currently 889 in master) and ensuring that it doesn't grow ever.

      In practice, there are only a few old core files containing such an illegal whitespace (again, keeping apart 3rd party libs and some few special files):

      • lib/dtl/dbdata.xsd
      • lib/lexer.php
      • lib/tests/html2text_test.php
      • mod/wiki/README
      • mod/wiki/diff/diff_nwiki.php
      • mod/wiki/diff/difflib.php
      • mod/wiki/editors/wiki/buttons.js
      • mod/wiki/parser/markups/nwiki.php
      • mod/wiki/parser/utils.php
      • webservice/wsdoc.php

      (with wiki accounting for 99% of cases)

      So this issue is about to reduce the counter to 0, because existing cases are coding style violations and don't have any reason to exist.

      This can be applied only to master (as a improvement) or, alternatively, fix it in all supported branches. Impact is going to be very minimal because the affected files are rarely modified, so no problems backporting are expected. Up to the integrators to decide, I'll prepare the 3 supported branches, just in case.

      It shouldn't affect anything and it's easy to verify as far as the diff using --ignore-all-space should be (99%, because there is one exception in a test) empty.

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 50 minutes
                1h 50m

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