Mainly 3 types of commenting needs to be done
- Main page
- Module pages(Non class) eg: index.php
- Class pages
Sample
Project
Comment
Tips
-
Regexp for searching functions
//line containing 'function(' not starting with '}/' ^(?!(.*)\}\/)(.*)function\s+(.+)()
Little more advanced version
^(?!(.*)\}\/)(.*)function\s+([^\(\r\n\=]+)\(
OR if there is something like $function->, to avoid it
^(?!(.*)\}\/)(.*)function([^->=,'",\r,\n]+)\s+([^\r\n]+)
For ES6 JS Classes
Make sure the methods are preceded only by a single tab(no addiional spaces). And use the rexexp below
^\t([^\s,\r,\n]+)([^\(\r\n\=]+)\(
|
|