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

Add jsdoc validation checks

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.10.4, 3.11, 4.0
    • Fix Version/s: None
    • Component/s: JavaScript
    • Labels:
      None
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE

      Description

      This is a followup of MDL-71113, where generating core's JS documentation with jsdoc was added. Original comment and code proposed there was:

      I'm going to fail testing of this as I've just realised that we should have a Github Action check for any errors.

      It's a really easy check:

      npx jsdoc -c .grunt/jsdoc/jsdoc.conf.js --pedantic
      

      Proposed diff:

      index c85fd54b84e..2de0119a599 100644
      --- a/.github/workflows/push.yml
      +++ b/.github/workflows/push.yml
      @@ -38,6 +38,9 @@ jobs:
                 git reset -- npm-shrinkwrap.json
                 git diff --cached --exit-code
       
      +      - name: JSDoc Error failures
      +        run: npx jsdoc -c .grunt/jsdoc/jsdoc.conf.js --pedantic
      +
         PHPUnit:
           runs-on: ${{ matrix.os }}
           services:
      

      It was agreed to create this followup to allow the weekly cycle to continue and have some more time to see how and where this could be implemented.

      In this issue we should be able to decide, and implement:

      • What we want to be reported.
      • What should lead to a failure in the check.
      • Where we can add that new check (core's GHA/Travis, CiBoT, moodle-plugin-ci, grunt....)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated: