Skip to content

RickWong/CodeMonitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeMonitor

CodeMonitor allows you to monitor and alert on changes to specific functions, methods and/or entire classes.

Example usage

  • Make sure your entire team is aware of changes to that sensitive method
  • Keep track of changes to specific methods in that composer package you use

Example

$ php codemon.php init 
Enter source base path [/Users/mathieu/Projects/CodeMonitor]: 
Enter directory to store my data in [/Users/mathieu/Projects/CodeMonitor/.codemon/]: 
Wrote database structure to /Users/mathieu/Projects/CodeMonitor/.codemon/sigs.db
Wrote configuration to /Users/mathieu/Projects/CodeMonitor/.codemon/config.json

$ php codemon.php watch -c ./.codemon/config.json Controller_Test
Found Controller_Test in /Users/mathieu/Projects/CodeMonitor/tests/src/controller/index.php. Watch this? [Y/n]: Y
[ADDED] Controller_Test

$ php codemon.php check -c ./.codemon/config.json
[CHANGED] /Users/mathieu/Projects/CodeMonitor/tests/src/controller/index.php: Controller_Test
--- Original
+++ New
@@ @@
 class Controller_Test
 {
     public function thisIsMyMethod()
     {
+        if (1) {
+            doSomethingUnsafe();
+        }
     }
 }
 
$ php codemon.php watch -c ./.codemon/config.json Controller_Test::thisIsMyMethod
Found Controller_Test::thisIsMyMethod in /Users/mathieu/Projects/CodeMonitor/tests/src/controller/index.php. Watch this? [Y/n]: Y
[ADDED] Controller_Test::thisIsMyMethod

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%