no-stack-dub-sack / apexdox-vs-code

A lightweight VS Code extension that makes documenting your Salesforce Apex files an easy, integrated experience.
Other
49 stars 7 forks source link

Allow @return token (without 's') #19

Closed berardo closed 3 years ago

berardo commented 4 years ago

Hi Peter,

Thanks for this really useful plugin, I appreciate it.

I'm wondering if you found any particular issue with the token @return, as you renamed it to @returns ~1 year ago.

If your point was to solely make it consistent with TypeDoc (and consequently your Typescript docblocks), that'd make sense if Salesforce didn't seem to recommend @return as part of ApexDoc.

Moreover, PMD also takes ApexDoc as its source of truth of the documentation part for Apex code analysis, which makes ApexDox snippets for Apex methods always leaving us with the issue:

Missing ApexDoc @return (rule: Documentation-ApexDoc)apex pmdApexDoc

Is there any chance to revert it back to the singular version, or maybe accept both when html docs are generated?

FWIW, you can find PMD's ApexDocRule here.

Happy to work on a PR if you want it.

Thank you

no-stack-dub-sack commented 4 years ago

Actually, I've been thinking about this recently myself. I'm super busy lately, but if you're willing to open a PR for this, we could get this change in ASAP. Let me know what you think. I think perhaps the best approach would be to allow both so we don't break any previous documentation.

berardo commented 4 years ago

Hi Peter,

I was not able to test it myself, but I prepared a pull request.

Thanks

no-stack-dub-sack commented 4 years ago

Great, thanks - sorry for the delay, was out of town. Will test and get back to you.