Exakat 1.2.7 review
Exakat 1.2.7 received an intensive bug cleaning treatment. Lots of false positives went away, and won’t be bother you for a long time. The documentation was revamped with a lot new sections and content. In the mean time, we added support for the PHP ext/cmark extension. ‘Use the Exakat 1.2.7 review, Luke’, as they say far away.
Exakat documentation
Exakat documentation is hosted by Read the doc, including each version, and downloadable versions (PDF, epub, HTML): check the menu on the left, at the bottom.
Real Case examples
Each Exakat analysis includes various illustrations. The first example are usually situational code, that focus on brevity to explain quickly the ins and outs of the problem. They provide insight to understand how a piece of code is an issue, in a simple and pragmatic way.
Then, you’ll find real examples. Those are hand picked from thousands of open source code which undergo an exakat audit. The code is then explained and reviewed. The actual code may be find online: find the VCS hosting server (mostly github), and check the file and line.
Parametrized analysis
Last month, we introduced parametrized analysis. You can find the first ones in the ‘Configuration’ section of the docs, and in each specific section that describe an analysis.
To keep our philosophy of no-needed-configuration, all those parameters are using a default and reasonable value. This way, you can just run the analysis straight after installation. Later, when you realize that a custom value is fitter for your application and your team, you can always add a specific configuration.
The directive goes either in the config/exakat.ini file, for global configuration, or in the projects/*/config.ini file, for project-by-project configuration.
Currently, 5 analysis have parameters, like Too many children or Too many Parameters. More will come.
Promote your favorite tutorial
For each analysis documentation, we include external links. Those links provide more background information, and help complete the explanations from the analysis. There are several types of links :
- PHP documentation: the official source of everything
- Tutorial: explaining how to use a PHP feature, or why a coding rule was edited.
- Argumentations: some analysis have been hotly debated. Before choosing them, make sure you read from the experts.
Do you know tutorials that would fit in the Exakat documentation ? We’d like to hear from you! More context and information is always helpful when reviewing code. Send us a note on @exakat, or a PR on the web site, or simply a mail : contact@exakat.io.
ext/cmark
PHP has an extension for binding with CMarkdown. ext/cmark is a PHP extension by Remi Collet and Joe Watkins. It provides access to a reference implementation of Markdown. In particular, the cmark extension provides a Parser and a Renderer, turn MarkDown code into HTML, Latex or else.
Exakat now recognize cmark in the code.
Happy PHP code reviews
All the 344 analyzers are presented in the docs, including the repulsive Should Use array_column(): Avoid writing a whole slow loop, and use the native array_column(). It’s an unusual bug (2%).
You can check all of the exakat reports at the gallery: exakat gallery.
Download Exakat on exakat.io, install it with Docker, upgrade it with ‘exakat.phar upgrade -u’ and like us on github.