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

File tags.txt recommends a command that produces warnings and needs reviewing

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1. Checkout the code
      2. Execute the ctags command included in tags.txt on a unix-like system (doesn't work on OS X by default as described in file)
      3. It should run without errors

      Show
      1. Checkout the code 2. Execute the ctags command included in tags.txt on a unix-like system (doesn't work on OS X by default as described in file) 3. It should run without errors
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull Master Branch:
      MDL-48855_master

      Description

      If I run the ctags command listed in tags.txt I get some warnings:

      $ ctags -R --languages=php --exclude="CVS" --php-kinds=f \
      > --regex-PHP='/abstract class ([^ ]*)/\1/c/' \
      > --regex-PHP='/interface ([^ ]*)/\1/c/' \
      > --regex-PHP='/(public |static |abstract |protected |private )+function ([^ (]*)/\2/f/'
      ctags: Warning: calendar/externallib.php:103: null expansion of name pattern "\2"
      ctags: Warning: calendar/externallib.php:275: null expansion of name pattern "\2"
      ctags: Warning: calendar/externallib.php:400: null expansion of name pattern "\2"
      ctags: Warning: mod/quiz/report/statistics/statistics_table.php:390: null expansion of name pattern "\2"
      

      This seems to be because of extra spaces between the 'function' keyword and the function name. While ideally the code would be consistent, it is pretty easy to make the tags command a bit more robust to whitespace differences which avoids the warnings.

      See attached patch.

        Attachments

          Activity

            People

            • Assignee:
              simoncoggins Simon Coggins
              Reporter:
              simoncoggins Simon Coggins
              Peer reviewer:
              David Monllaó
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              David Mudrák (@mudrd8mz), Helen Foster, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                2/Feb/15