Bugslist: Difference between revisions

From John's wiki
Jump to navigation Jump to search
Line 345: Line 345:


For security reasons write access to [https://svn.jj5.net/jjrepo/ jjrepo] is only available for [[User:Sixsigma|John]]. It's basically my private repository. If you'd like to hack on projects where you do have checkin permissions on the Subversion repository, along with infrastructure for running your code, then why not head over to [https://www.progclub.org/ ProgClub] and [https://www.progclub.org/wiki/Register register]?
For security reasons write access to [https://svn.jj5.net/jjrepo/ jjrepo] is only available for [[User:Sixsigma|John]]. It's basically my private repository. If you'd like to hack on projects where you do have checkin permissions on the Subversion repository, along with infrastructure for running your code, then why not head over to [https://www.progclub.org/ ProgClub] and [https://www.progclub.org/wiki/Register register]?
== Notes from the code ==
Following are notes from the source code, generated by bugslist.php!
=== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/?pathrev=1489 /] ===
==== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489 bugslist.php] ====
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l31 bugslist.php]: Windows is unsupported... no effort has been made to be compatible with the Windows file system. If you would like to fix that I will accept your patch!
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l40 bugslist.php]: START: error level definitions
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l42 bugslist.php]: there's a bunch of error handling stuff we setup up-front
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l44 bugslist.php]: program errors are things which shouldn't happen, they are numbered from 10 to 19. User errors are things that happen when the user makes a mistake or certain runtime conditions occur, they are numbered from 20 to 99. External program errors are between 100 and 199.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l49 bugslist.php]: error levels for external program errors are calculated by adding 100 to the external program error level for non-zero error levels. So you can determine the external program error level by subtracting 100 (assuming the external program error level wasn't negative or greater than 99).
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l84 bugslist.php]: END: error level definitions
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l89 bugslist.php]: START: error handling configuration
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l108 bugslist.php]: END: error handling configuration
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l113 bugslist.php]: START: global configuration
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l115 bugslist.php]: we set constants and configure globals before loading the config file(s)...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l121 bugslist.php]: END: global configuration
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l126 bugslist.php]: START: loading config file(s)...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l139 bugslist.php]: we have an application config file, include it. note that if it's the same as the local config file it will only be included once.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l149 bugslist.php]: we have a local config file... include it:
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l159 bugslist.php]: END: loading config file(s)
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l163 bugslist.php]: here we set constants which may have been provided in the config file.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l168 bugslist.php]: Main application logic starts here...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l178 bugslist.php]: configure our global defines, this should be done before loading the config file(s)...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l182 bugslist.php]: Following is the meta-data from SVN. Note that the svn keyward 'Header' is not used. To configure svn keywords: svn propset svn:keywords "Date Revision Author HeadURL Id" bugslist.php
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l303 bugslist.php]: flag whether running in DEBUG mode or not...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l305 bugslist.php]: can conditionally switch on debug output...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l314 bugslist.php]: item types. Doesn't include aliases like 'SEE', 'FIXME', 'NICE', etc.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l321 bugslist.php]: FIXME is an alias for TODO
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l328 bugslist.php]: SEE/REF are aliases...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l330 bugslist.php]: NICE is an alias for TODO
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l365 bugslist.php]: FIXME is a HIGH priority TODO
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l374 bugslist.php]: NICE is LOW priority TODO
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l520 bugslist.php]: configure regular expressions:
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l541 bugslist.php]: $file_extension_include and $file_extension_exclude are file extensions supported or not. For debugging purposes an included 'phar' and excluded 'properties' and 'xcf' are omitted so they should show up in 'unknown file types'...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l574 bugslist.php]: defines set in set_user_constants() can optionally be defined by the user in their config file(s).
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l580 bugslist.php]: 10 takes 9m 30s
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l581 bugslist.php]: 20 takes 6m 11s
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l582 bugslist.php]: 30 takes 5m 19s
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l583 bugslist.php]: 40 takes 4m 29s
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l584 bugslist.php]: 50 takes 3m 55s
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l585 bugslist.php]: 60 takes 3m 39s
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l586 bugslist.php]: 70 takes 3m 14s
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l587 bugslist.php]: 80 takes 2m 53s
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l588 bugslist.php]: 90 takes 2m 45s
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l589 bugslist.php]: 100 takes 2m 41s (or may fail)
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l590 bugslist.php]: 110 fails
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l591 bugslist.php]: 150 fails
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l617 bugslist.php]: exception_handler(...) will exit (at time of writing!) but just to be safe:
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l626 bugslist.php]: a few cheeky globals... who doesn't love globals!?
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l670 bugslist.php]: START: path validation
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l699 bugslist.php]: END: path validation
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l704 bugslist.php]: START: file validaton
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l725 bugslist.php]: END: file validation
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l747 bugslist.php]: START: svn integration
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l760 bugslist.php]: parse_svn() will have potentially stale data if 'svn up' isn't called prior. But we don't want to call 'svn up' all the time (especially from unit tests) because it's slooooooowwwww. So better to just live with the stale revision info from parse_svn() when it's not really needed. Read the code for parse_svn() to see what might be out-of-date.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l775 bugslist.php]: END: svn integration
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l780 bugslist.php]: START: file/directory processing
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l837 bugslist.php]: END: file/directory processing
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l867 bugslist.php]: START: $data sorting
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l942 bugslist.php]: END: $data sorting
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l947 bugslist.php]: START: reporting
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l984 bugslist.php]: END: reporting
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l1255 bugslist.php]: last in wins!
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l1979 bugslist.php]: this check is redundant now that the filters are regular expressions
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l2851 bugslist.php]: VCS type can be 'none', 'svn', or 'git' presently
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l2854 bugslist.php]: $counter tracks the number of pushd()'s so we can undo with popd()...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l2859 bugslist.php]: if we pushd( '..' ) on '/' the current directory doesn't change, and we're done.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l2890 bugslist.php]: we don't call shell() because we don't want to exit on error (we ignore errors here)...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l2921 bugslist.php]: this function assumes we're in the project directory
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l2922 bugslist.php]: svn commits are LOW priority COMMIT items
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3096 bugslist.php]: being a bit anal here, probably only need to test either $path or $file for null...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3100 bugslist.php]: add previous item:
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3127 bugslist.php]: $slash_index won't be zero.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3159 bugslist.php]: being a bit anal here, probably only need to test either $path or $file for null...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3163 bugslist.php]: add last item:
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3240 bugslist.php]: this is ugly, but it's fast and safe (at time of writing!)
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3279 bugslist.php]: at this point it's OK to override the $file variable
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3319 bugslist.php]: clear the progress report
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3866 bugslist.php]: priority for FIXME can be different to TODO
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3878 bugslist.php]: priority for NICE can be different to TODO
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3938 bugslist.php]: $item_type is null to return false on invalid spec
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3954 bugslist.php]: if we can't find the priority from the spec warn then fallthrough to get by item type...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l3978 bugslist.php]: we can't find a priority so assume CRITICAL
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l4480 bugslist.php]: '*' is total
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l4581 bugslist.php]: we could imagine support for other types and/or is_numeric()...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l4844 bugslist.php]: START: reset lower headings
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l4854 bugslist.php]: END: reset lower headings
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l4881 bugslist.php]: START: errors_off: only call PHP functions until errors are back on
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l4900 bugslist.php]: END: errors_off: we can call our own functions again now...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l4974 bugslist.php]: wildcards are supported
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l4989 bugslist.php]: wildcards are supported
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l5001 bugslist.php]: following are functions which could probably be factored into a library.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l5082 bugslist.php]: errors_on() enables error handling so we can fail if we encounter an error.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l5092 bugslist.php]: errors_off() disables error handling so we can ignore errors. If you turn off errors you must turn them back on. You can't nest calls to errors_on/off() so it's a good idea if you disable errors that you only call PHP functions from your code until you have turned errors back on.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l5280 bugslist.php]: if $fail is false then a boolean success value is returned. If $fail is true (the default) the process is terminated on error.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bugslist.php?pathrev=1489#l5339 bugslist.php]: returns false if no directory, true on success, or exits otherwise.
=== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin?pathrev=1489 bin] ===
==== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489 open-doco.sh] ====
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l24 open-doco.sh]: open up a file explorer to optionally review log files...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l30 open-doco.sh]: give Firefox time to open...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l35 open-doco.sh]: give Firefox time to open...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l40 open-doco.sh]: give Firefox time to open...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l45 open-doco.sh]: give Firefox time to open...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l50 open-doco.sh]: give Firefox time to open...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l55 open-doco.sh]: give Kate time to open...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l60 open-doco.sh]: give Kate time to open...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l65 open-doco.sh]: give Kate time to open...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l70 open-doco.sh]: give Kate time to open...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/bin/open-doco.sh?pathrev=1489#l75 open-doco.sh]: give Kate time to open...
=== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test?pathrev=1489 test] ===
==== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/fast.sh?pathrev=1489 fast.sh] ====
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/fast.sh?pathrev=1489#l7 fast.sh]: list slow tests to skip here:
==== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/new.sh?pathrev=1489 new.sh] ====
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/new.sh?pathrev=1489#l13 new.sh]: don't edit this file. Edit process.sh...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/new.sh?pathrev=1489#l19 new.sh]: don't edit this file. Edit process.sh...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/new.sh?pathrev=1489#l31 new.sh]: include your arguments on the following line. If you have multiple equivalent tests (same input/output) you can duplicate the following line with different arguments.
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/new.sh?pathrev=1489#l36 new.sh]: the process.sh script is not executed (it is sourced).
==== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/test.inc.sh?pathrev=1489 test.inc.sh] ====
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/test.inc.sh?pathrev=1489#l2 test.inc.sh]: this file is sourced by a script runner. It defines a bunch of functions to run various kinds of tests.
=== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/args?pathrev=1489 test/args] ===
==== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/args/run.sh?pathrev=1489 run.sh] ====
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/args/run.sh?pathrev=1489#l128 run.sh]: not a good idea to pass '/' or anything with lots of data in it...
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/args/run.sh?pathrev=1489#l140 run.sh]: processing /tmp probably isn't a good idea...
=== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/errors?pathrev=1489 test/errors] ===
==== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/errors/run.sh?pathrev=1489 run.sh] ====
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/errors/run.sh?pathrev=1489#l15 run.sh]: tests errors on/off functions
=== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/pushd?pathrev=1489 test/pushd] ===
==== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/pushd/run.php?pathrev=1489 run.php] ====
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/pushd/run.php?pathrev=1489#l11 run.php]: popd should fail if uninitialised...
=== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/vcs-type?pathrev=1489 test/vcs-type] ===
==== [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/vcs-type/run.sh?pathrev=1489 run.sh] ====
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/vcs-type/run.sh?pathrev=1489#l6 run.sh]: just succeed if we're not on John's machine (but print a warning!)
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/vcs-type/run.sh?pathrev=1489#l34 run.sh]: tests for 'none'
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/vcs-type/run.sh?pathrev=1489#l42 run.sh]: tests for 'svn'
* [[User:Sixsigma|JE]]: [https://svn.jj5.net/jjrepo/jj5-bin/trunk/bin/bugslist.d/test/vcs-type/run.sh?pathrev=1489#l50 run.sh]: tests for 'git'

Revision as of 15:57, 2 March 2020

bugslist.php is John's TODO list management script. If you use this script you might be interested in ProgClub Timestamp so you can copy/paste the comment label syntax, or configure KDE so you don't have to. For other projects see projects.

Status

Released! But there's work to do.

Version

bugslist.php v0.1.1488
Copyright © 2016-2017 John Elliot V
License GPLv3+: GNU GPL version 3 or later.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Version control info

Timestamp.......: 2017-03-12 17:38:30 +1100 (Sun, 12 Mar 2017)
UTC timestamp...: 2017-03-12 06:38:30Z
Date............: 2017-03-12
Time............: 17:38:30
Author..........: jj5
File............: bugslist.php
Revision........: 1488
URL.............: bugslist.php

Administration

Contributors

People who have contributed to this project. Newest on top.

Copyright

Copyright © 2016, Contributors.

License

Licensed under the GNU GPL version 3 or later.

Resources

Source code

You can read the source code.

You can browse the repository.

You can checkout the latest stable script, or the full stable system (including tests and release scripts).

You can checkout the latest development script, or the full development system (including tests and release scripts).

Links

Help

Usage: php path/to/bugslist.php [OPTION]...
This is a source code processing and reporting tool to help with software
development project management. It processes files in the specified
directory and matches special comment syntax to get notes and work items
which it then reports on. Output reports are in MediaWiki wiki text syntax
designed to be included in your project wiki.

Comment label syntax

The heart of bugslist.php is the comment label syntax you use in your
source code. It's basically:
  DATE USER DASH TYPE[PRIORITY][:!] TEXT
For example: 2017-03-12 jj5 - HACK[HIGH]: expedient, you say?
The date is in ISO format, the user must be a valid UNIX user, and the dash
is just to try and limit false positives. The TYPE indicates what sort of
item this is; it can be one of the types listed below. Your type can be
suffixed with an optional priority within square brackets. After the
optional priority your type must be suffixed with punctuation, either ':' or
'!'. The TEXT follows until the end of the line and on to subsequent lines too.

Item types

The following item types are supported in comment labels:
Type................: Description..............................: Priority..:
 Red-flags..........:
  WARNING...........: something to be careful of...............: HIGH
  TEMP..............: a note for code that should be removed...: HIGH
 Stuff to do........:
  BUG...............: something that needs to be fixed.........: HIGH
  TEST..............: something that needs to be tested........: HIGH
  TODO..............: something that needs to be done..........: MEDIUM
   FIXME............: a HIGH priority alias for TODO...........: HIGH
   NICE.............: a LOW priority alias for TODO............: LOW
  HACK..............: something that needs to be improved......: LOW
  CONSIDER..........: something to consider or think about.....: LOW
   THINK............: an alias for CONSIDER....................: LOW
 Stuff that's done..:
  FIXED.............: a BUG that has been fixed................: HIGH
  DONE..............: something that has been done.............: MEDIUM
  COMMIT............: a VCS commit log.........................: LOW
 Notes..............:
  REFERENCE.........: a reference, e.g. a URL..................: LOW
   REF..............: an alias for REFERENCE...................: LOW
   SEE..............: an alias for REFERENCE...................: LOW
  NOTE..............: notes, or items without a label..........: LOW
  DEBUG.............: an item for debugging purposes...........: DEBUG

Item priority

You can use a priority number, priority letter, or priority name to
indicate a priority:
  #: Abbr: Name:      Default:
  0: C, !: CRITICAL:  N/A
  1:    H:     HIGH:  WARNING, TEMP, BUG, TEST, FIXME, FIXED
  2:    M:   MEDIUM:  TODO, DONE
  3:    L:      LOW:  HACK, COMMIT, REFERENCE, NOTE, NICE, CONSIDER
  4:    D:    DEBUG:  DEBUG

Comment syntax

Comment syntax for various programming languges is supported:
  Plain text...: comment labels begin at the first character on the line
  C++, etc //..: comment labels begin after '// ' (the space is important)
  HTML/XML.....: comment labels are within: <!-- -->
  Perl #.......: comment labels begin after '# ' (the space is important)
  C/CSS........: comment labels are within: /* */

Program options

File-system options

-p, --path=PATH       process files in PATH, current directory if omitted
-f, --file=LIST       process files in comma-separated LIST, relative to PATH
-i, --include=EXTENSIONS  comma-separated list of included file extensions
-e, --exclude=EXTENSIONS  comma-separated list of excluded file extensions
                      Note: excludes override includes. This is useful when
                        you want to exclude missing extensions () which
                        are included by default.
-s, --skip=REGEXES    comma-separated list of regexes for paths to skip
-k, --keep=REGEXES    comma-separated list of regexes for paths to keep
                      ** BE VERY CAREFUL **
                      Case sensitive expressions. Use '^' to match start of
                      path, '$' to match end of path, etc.
                      Note: keeps override skips

Filtering options

-u, --user=USER       include items for USER
-d, --date=DATE       include items for DATE
    --today           include items for today only (default if not debugging)
    --yesterday       include items for yesterday only
-t, --type=TYPE       include items by type, will affect report order.
                      Duplicates are ignored.
-y, --priority=PRIORITY  include items with particular PRIORITY.
    --all             report on all users, dates, types, and priorities.

Reporting options

-a, --aggregate=FIELD report aggregation. Duplicates are ignored.
                      A heading is printed for each aggregated field.
-c, --collate=FIELD   report sorting. Duplicates are ignored.
                      Default sorting uses binary comparision rather than
                      locale sensitive comparison which is probably what
                      you want. For --aggregate and --collate uppercase
                      FIELD sorts descending.
                      e.g. 'dUp' selects by date, user desc, and path
-h, --heading=FORMAT
                      heading format options. Duplicates are ignored.
-o, --output=FIELD|FORMAT|OPTIONS
                      report output options. Duplicates are ignored.
-l, --level           level of heading to start at (default 2)
    --na              output 'N/A' when no report data
+N, --natural         use locale sensitive sorting instead of binary sorting
+B, --binary          use binary sorting (This is the default. Redundant? :)
+Q, --quiet           disable warnings, stats, and progress on stderr
+S, --show-stats      enable statistics report on stderr
-S, --hide-stats      disable statistics report on stderr (default)
+P, --show-progress   enable progress report on stderr
-P, --hide-progress   disable progress report on stderr (default)
+O, --show-options    report on user options on stderr
-O, --hide-options    disable user options report (default)
+W, --show-warnings   report warnings on stderr (default)
-W, --hide-warnings   disable warnings

Other options

    --help            display this help text and exit
    --web-help        open documentation in Firefox
    --version         display version information and exit
+V, --vcs             parse version control (Subversion) logs
+D, --debug           some handy defaults, when debugging or not
+X, --exit            exit without reporting (useful with --show-stats)

Format specifications

USER

 USER is comma-separated list of usernames.
 Use '*' for all users; '?' for current user.

DATE

 DATE is ISO formatted date prefix, e.g.:
  '2016' for all items in 2016,
  '2016-01' for items in Jan 2016,
  '2016-,01,02' for items in Jan/Feb 2016,
  '2016-01-,01,02' for items on 1st/2nd Jan 2106,
  '2016-01-02,2016-01-04' for 2nd/4th Jan 2016.
 Use '*' for all dates.

TYPE

 TYPE is a string of abbreviations or comma-separated list of item types.
 Supported types are:
  Red-flags:
   w: WARNING....: something to be careful of
   m: TEMP.......: a note for code that should be removed
  Stuff to do:
   b: BUG........: something that needs to be fixed
   e: TEST.......: something that needs to be tested
   t: TODO.......: something that needs to be done
   h: HACK.......: something that needs to be improved
   c: CONSIDER...: something to consider
  Stuff that's done:
   f: FIXED......: a BUG that has been fixed
   d: DONE.......: something that has been done
   v: COMMIT.....: a VCS commit log
  Notes:
   r: REFERENCE..: a reference, e.g. a URL
   s: REFERENCE..:
   n: NOTE.......: notes, or items without a label
   g: DEBUG......: an item for debugging purposes
  e.g. 'TODO, NOTE' or 'bht' for 'BUG, HACK, TODO'
 Use '*' for all types.

PRIORITY

 PRIORITY is a comma-separeted list of priorities or a range of priorities
 indicated with a dash '-' between a low and a high priority.
 A priority can be indicated by a priority number, a priority letter or
 abbreviation, or a priority name. Use '*' for all priorities.
 Supported values are:
  #: Abbr: Name...:
  0: C, !: CRITICAL
  1:    H:     HIGH
  2:    M:   MEDIUM
  3:    L:      LOW
  4:    D:    DEBUG

FIELD

 FIELD is a string of abbreviations or comma-separated list of fields.
 Supported fields are:
   u: user: select username
   d: date: select date
   g: long date: select date in long format
   t: type: select item type
   y: priority: select item priority
   e: filemtime: select file modification timestamp
   b: both: select path and file
   p: path: select path
   f: file: select file, do not prefix path.
         This may not be what you want, may merge
         files from different directories.
   l: line: select line number
   m: name: select file name
   k: link: select link to file (for specific revision)
   s: reference: select reference (or text if not REFERENCE)
   i: initials: select Wiki initials initials (requires config)
   n: new-lines: select number of new lines
   o: old-lines: select number of old lines
   c: line-diff: select lines difference
   r: revision: select VCS revision number
   w: code: select work code
   x: text: select item text

FORMAT

 FORMAT is a string of abbreviations or comma-separated list of format
   options.
 Supported format options are:
   U: plain-user: don't format user
   D: plain-date: don't format date
   T: plain-type: don't format type
   Y: plain-priority: don't format priority
   E: plain-filemtime: don't format filemtime
   B: plain-both: don't format path/file
   P: plain-path: don't format path
   F: plain-file: don't format file
   L: plain-line: don't format line
   M: plain-name: don't format name
   K: plain-link: don't format link
   S: plain-reference: don't format reference
   I: plain-initials: don't format initials
   N: plain-new-lines: don't format new lines
   O: plain-old-lines: don't format old lines
   C: plain-line-diff: don't format line diff
   R: plain-revision: don't format VCS revision number
   W: plain-code: don't format work code
   X: plain-text: don't format item text
 e.g. 'UT' disables formatting for user and type values.

OPTIONS

 OPTIONS is a string of abbreviations or comma-separated list of report
   options.
 Supported report options are:
   h: html: output to HTML instead of wiki text
   a: table: output to HTML/wiki table instead of list
 e.g. 'ha' selects HTML with tables

Feedback

Report bugs to: jj5@progclub.org

Specifications

Functional specification

See help for information about how the script is supposed to work.

Technical specification

The script is a PHP CLI script.

Notes

Notes for implementers

If you are interested in incorporating this software into your project, here's what you need to know:

Just copy-and-paste your way to victory! Feel free to ask questions.

Notes for developers

If you're interested in contributing to this software, here's what you need to know:

Send your patch to jj5@progclub.org along with a statement that you are willing to be listed in the contributors section of the documentation and willing to license your contribution under the license.

For security reasons write access to jjrepo is only available for John. It's basically my private repository. If you'd like to hack on projects where you do have checkin permissions on the Subversion repository, along with infrastructure for running your code, then why not head over to ProgClub and register?