Source Code Analysis
Source Code Analysis
This tutorial gives you a general overview how to do static code analysis from within the PHP container.
* available-tools * work-inside-the-php-container
Awesome-ci
Awesome-ci is a collection of tools for analysing your workspace and its files. You can for example check for:
- git conflicts
- git ignored files that have not been removed from the git index
- trailing spaces and newlines
- non-utf8 files or utf8 files with bom
- windows line feeds
- null-byte characters
- empty files
- syntax errors for various languages
- inline css or js code
- customized regex
Some of the bundled tools even allow for automatic fixing.
tool awesome ci
# 1. Enter your PHP containerhost> ./bash
# 2. Go to your project folder
# 3. Run the tools
# 4. Run tools with more options
# 5. Various syntax checksPHPCS
PHPCS is a code style analyser for PHP.
tool phpcs
# 1. Enter your PHP containerhost> ./bash
# 2. Go to your project folder
# 3. Run itESLint
ESLint is a Javascript static source code analyzer.
tool eslint
# 1. Enter your PHP containerhost> ./bash
# 2. Go to your project folder
# 3. Run it