grunt-checkcodedoc
Checks a codebase to make sure all methods are documented properly.
Last updated 5 years ago by simbro .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install grunt-checkcodedoc 
SYNC missed versions from official npm registry.

checkcodedoc

Checks a codebase to make sure all methods are documented properly.

Getting Started

This plugin requires Grunt.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install checkcodedoc --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('checkcodedoc');

The "checkcodedoc" task

Overview

In your project's Gruntfile, add a section named checkcodedoc to the data object passed into grunt.initConfig().

    checkcodedoc: {
      default_options: {
        options: {
            reporter: 'xml',
            reporterOutput: 'build/codedoc-checks/output.xml'
        },
        files: {
            'tmp/default_options': ['test/fixtures/checkcodedoc.js']
        }
      }
    },

Options

options.paramDocPattern

Type: String Default value: /@param\s*\{(.+)\}\s(.+)/

The format of document method arguments.

options.shortDocWarnings

Type: Boolean Default value: true

If set, then a warning will be generated for methods with only a single line of description.

options.enforceStrictTypes

Type: Boolean Default value: true

If set, then an error will be generated for each method parameter that does not specify a strict JavaScript type.


#### Files Options
The list of files to be scanned can be broken down into items, which contain arrays of filepaths, see the following example:


```js
    checkcodedoc: {
      default_options: {
        options: {
            reporter: 'xml',
            reporterOutput: 'tmp/output.xml',
            verbose: false
        },
        files: {
			'root': ['Gruntfile.js, kaarma.conf.js'],
            'appfiles': ['app/**/*.js'],
			'shared:' ['shared/*.js', 'lib/**/*.js],
			'testfiles': ['test/fixtures/*.js', 'test/specs/**.js']
        }
      }
    }

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2015 . Licensed under the MIT license.

Current Tags

  • 0.1.0                                ...           latest (5 years ago)

1 Versions

  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |