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

Grunt window gherkinlint does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.7.5, 3.8.2
    • 3.7.4, 3.8.1, 3.9
    • JavaScript
    • MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MDL-67953-master
    • Hide

      Notes

      1. Must be tested on Windows and Linux-like OS

      Testing

      1. Run gherkinlint across the entire codebase:

        grunt gherkinlint
        

        1. Confirm that there were no failures reported
      2. Open mod/forum/tests/behat/add_forum.feature in your preferred editor
      3. Add a single space at the start of the "{{Feature: }}" line (line 2)
      4. Run the check again:

        grunt gherkinlint
        

        1. Confirm that the error was detected

          Running "gherkinlint" task
          	/Users/nicols/Sites/moodles/s38/moodle/mod/forum/tests/behat/add_forum.feature
            2    Wrong indentation for "Feature", expected indentation level of 0, but got 1    indentation
          

      5. Run grunt watch:

        grunt watch
        

      6. Touch the file in some way (literally just save it again)
        1. Confirm that the error was detected again

      38 and master only

      1. Run the check with just one file:

        grunt gherkinlint --files=mod/forum/tests/behat/add_forum.feature
        

        1. Confirm that the error was detected again
      2. Run on a different file:

        grunt gherkinlint --files=mod/forum/tests/behat/add_forum_inline.feature
        

        1. Confirm that no error was shown
      3. Change into the mod/forum directory
      4. Run the grunt watch command again:

        cd mod/forum
        grunt watch
        

      5. Touch the file in some way (literally just save it again)
        1. Confirm that the error was detected again
      Show
      Notes Must be tested on Windows and Linux-like OS Testing Run gherkinlint across the entire codebase: grunt gherkinlint Confirm that there were no failures reported Open mod/forum/tests/behat/add_forum.feature in your preferred editor Add a single space at the start of the "{{Feature: }}" line (line 2) Run the check again: grunt gherkinlint Confirm that the error was detected Running "gherkinlint" task /Users/nicols/Sites/moodles/s38/moodle/mod/forum/tests/behat/add_forum.feature 2 Wrong indentation for "Feature", expected indentation level of 0, but got 1 indentation Run grunt watch: grunt watch Touch the file in some way (literally just save it again) Confirm that the error was detected again 38 and master only Run the check with just one file: grunt gherkinlint --files=mod/forum/tests/behat/add_forum.feature Confirm that the error was detected again Run on a different file: grunt gherkinlint --files=mod/forum/tests/behat/add_forum_inline.feature Confirm that no error was shown Change into the mod/forum directory Run the grunt watch command again: cd mod/forum grunt watch Touch the file in some way (literally just save it again) Confirm that the error was detected again

      When running under windows, the grunt.util.spawn call is too long when running the gherkinlint command.

      There is no 'nice' solution to this. We must use the Linter directly. Thankfully this is actually easy.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 30 minutes
                2h 30m

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