java - audit checker for comments -


i have java program runs automatically every morning , contains several methods independent of each other. have testing, comment out of methods not using. problem bc forget uncomment code , program may run few days without catching on not running.

is there way set automated check this?

solution: have decided add counter count number methods run , return error when number wrong.

auditing randomly inserted comments? bad idea.

use revision control, git project, if aren't already. things simple:

(if use revision control, down @ #2, , ignore rest of answer)

enter image description here

  1. in above image 'remote repository' store pristine, current development version (no testing-comments).

  2. set unit tests execute pulling latest sources repository.

  3. for hacking around, pull separate copy (in image 'local repository', , corresponding 'working directory') , commenting/uncommenting/testing there.

  4. unless 'push' changes 'remote repository', unit tests run non-commented, clean version available on 'remote repository'.

  5. when done testing , have worthwhile added code, commit , 'push' 'remote repository'.

  6. next time tests run, have new (good) code.

  7. profit.

note: 'remote repository' , 'local repository' terms. can on same machine too.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -