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

Grunt window gherkinlint does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.7.4, 3.8.1, 3.9
    • Fix Version/s: 3.7.5, 3.8.2
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull 3.7 Branch:
    • Pull 3.8 Branch:
    • Pull Master Branch:
      MDL-67953-master

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Tim Hunt
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Mar/20

                  Time Tracking

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