| Summary: | Completion proposal causes validation warning | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Michael Rennie <Michael_Rennie> | ||||
| Component: | General | Assignee: | Chris Jaun <cmjaun> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cmjaun | ||||
| Version: | 3.2 | Flags: | thatnitind:
review+
Michael_Rennie: review+ |
||||
| Target Milestone: | 3.2.3 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
woops, noticed I forgot to specify the build: 1.2.0.v201006041342-7C78FGDF9JgLWLMLM4Vsye That error message is correct. You do not have a return statement in your function. I think the only bug here is that "return" does not show that error as well. Created attachment 178437 [details]
patch
fix works good for me. the erroneous warnings no longer appear Checked into 3.2.3 and HEAD. |
build: steps: 1. create a test script like the following /** * */ function Test() { } 2. in the doc section start typing @ret and hit Ctrl+space - you should get the completion @returns entered. 3. add some postamble to the tag like 'a new test' to look like the following /** * @returns a new test */ function Test() { } 4. save the file - notice a new validator warning that you are missing a return type description and that the word 'new' is underlined?? Expected That everything would be fine. If I change @returns to @return all warnings go away. I would expect that since JSDT proposed @returns that it would be ok to use without warning (the JSDoc spec states they are synonyms for each other). Maybe if the validator can't handle @returns it should not be proposed as a completion?