Skip to content

Add "out of order" case for @param error #33

@cowwoc

Description

@cowwoc

Given:

        /**
         * Land and the buildings on it, along with its natural resources such as crops, minerals, or water.
         *
         * @class
         * @property {uri.<property>} uri the property's URI
         * @property {String} listing the URI of the property listing
         * @property {String} address the property address
         * @property {String} postalCode the property postal code
         * @property {Number} askingPrice the asking price for the property
         * @property {String} currency the currency of all prices
         * @property {Number} municipalEvaluationPrice the municipal evaluation price of the property (null if not set)
         * @property {Number} municipalEvaluationYear the municipal evaluation year (null if not set)
         * @property {Number} schoolTaxes the annual school taxes (null if not set)
         * @property {Number} municipalTaxes the annual municipal taxes (null if not set)
         * @property {Number} energyCost the annual energy cost (null if not set)
         * @property {Number} rooms the number of rooms in the property
         * @property {Number} bedrooms the number of bedrooms in the property (null if not set)
         * @property {Number} bathrooms the number of bathrooms in the property (null if not set)
         * @property {Number} powderRooms the number of powder rooms in the property (null if not set)
         * @property {Number} garages the number of garages in the property (null if not set)
         * @property {Number} constructionYear the year the property was constructed (null if not set)
         * @property {Number} lotArea the lot area, in meters^2 (null if not set)
         *
         * @param {uri.<property>} uri the property's URI
         * @param {String} listing the URI of the property listing
         * @param {String} address the property address
         * @param {String} postalCode the property postal code
         * @param {Number} askingPrice the asking price for the property
         * @param {String} currency the currency of all prices
         * @param {Number} municipalEvaluationPrice the municipal evaluation price of the property (null if not set)
         * @param {Number} municipalEvaluationYear the municipal evaluation year (null if not set)
         * @param {Number} schoolTaxes the annual school taxes (null if not set)
         * @param {Number} municipalTaxes the annual municipal taxes (null if not set)
         * @param {Number} energyCost the annual energy cost (null if not set)
         * @param {Number} rooms the number of rooms in the property
         * @param {Number} bedrooms the number of bedrooms in the property (null if not set)
         * @param {Number} bathrooms the number of bathrooms in the property (null if not set)
         * @param {Number} powderRooms the number of powder rooms in the property (null if not set)
         * @param {Number} garages the number of garages in the property (null if not set)
         * @param {Number} constructionYear the year the property was constructed (null if not set)
         * @param {Number} lotArea the lot area, in meters^2 (null if not set)
         * @return {Property} the property
         */
        function Property(uri, listing, address, postalCode, askingPrice, currency, municipalEvaluationPrice,
            municipalEvaluationYear, municipalTaxes, schoolTaxes, energyCost, rooms, bedrooms, bathrooms, powderRooms,
            garages, constructionYear, lotArea)
        {
                  ...
                }

I get tons of warnings like:

Invalid JsDoc @param argument name at ../../../target/classes/js/net/Property.js :
    38 |   * @param {Number} municipalEvaluationPrice the municipal evaluation price of the property (null if not set)
    39 |   * @param {Number} municipalEvaluationYear the municipal evaluation year (null if not set)
    40 |   * @param {Number} schoolTaxes the annual school taxes (null if not set)
-------------^
    41 |   * @param {Number} municipalTaxes the annual municipal taxes (null if not set)
    42 |   * @param {Number} energyCost the annual energy cost (null if not set)

It's not clear why the warnings begin at this line while previous lines pass.

Action items:

  1. Figure out why line is triggering an error. Is it a bug? If so, fix it.
  2. Improve error message to explain what value was encountered versus what value was expected. Looking at the source-code, the error message should provide the values of jsDocName and param.name. Knowing these values would certainly help us figure out whether this is user-error or a bug in the plugin.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions