https://github.com/kiesel/code-tools
https://github.com/kiesel/code-tools
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/kiesel/code-tools
- Owner: kiesel
- License: mit
- Created: 2014-01-25T16:47:35.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-03-06T15:57:52.000Z (about 11 years ago)
- Last Synced: 2025-01-01T19:14:03.190Z (over 1 year ago)
- Language: PHP
- Size: 289 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# code-tools
[](http://travis-ci.org/kiesel/code-tools)
[](https://github.com/xp-framework/core)
[](https://github.com/xp-framework/core/blob/master/LICENCE.md)
[](http://php.net/)
This project aims to provide utilities as well as an OOP API to perform
code analysis in order to improve code quality and catch some easy to
spot errors that can slip into the code.
## Checking class references in namespace'd code
### Usage:
```sh
$ xpcli -cp path/to/repo/src/main/php net.xp_forge.cmd.CheckClassReferences path/to/file
```
### Detected errors
* Using absolute references in use is discouraged (eg. `use \foo\bar`, better: `use foo\bar`)
* Using relative references in inline code (eg. `new foo\bar\Classname()`, better: `new \foo\bar\Classname()`)
* Repeated use of alias for different classes
* Unloadable class (typo?)
* Unknown class (missing use)