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

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

XMLWordPrintable

    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MDL-48855_master
    • 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

      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.

            simoncoggins Simon Coggins
            simoncoggins Simon Coggins
            David Monllaó David Monllaó
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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