Skip to content

Commit

Permalink
version 2.4.6a
Browse files Browse the repository at this point in the history
  • Loading branch information
christopheexakat committed Jul 21, 2022
1 parent 4056237 commit 2d67a55
Show file tree
Hide file tree
Showing 10 changed files with 327 additions and 142 deletions.
3 changes: 0 additions & 3 deletions Annex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ List of external links mentioned in this documentation.
* `Carbon <https://carbon.nesbot.com/docs/>`_
* `Carnage <https://twitter.com/giveupalready>`_
* `cat: write error: Broken pipe <https://askubuntu.com/questions/421663/cat-write-error-broken-pipe>`_
* `Change the precedence of the concatenation operator <https://wiki.php.net/rfc/concatenation_precedence>`_
* `Changes to variable handling <https://www.php.net/manual/en/migration70.incompatible.php>`_
* `Class Constant <https://www.php.net/manual/en/language.oop5.constants.php>`_
* `Classes Abstraction <https://www.php.net/abstract>`_
Expand Down Expand Up @@ -271,7 +270,6 @@ List of external links mentioned in this documentation.
* `sqlite3 <http://www.php.net/sqlite3>`_
* `Static Keyword <https://www.php.net/manual/en/language.oop5.static.php>`_
* `String functions <https://www.php.net/manual/en/ref.strings.php>`_
* `strip_tags <https://www.php.net/manual/en/function.strip-tags.php>`_
* `strtr <http://www.php.net/strtr>`_
* `Subpatterns <https://www.php.net/manual/en/regexp.reference.subpatterns.php>`_
* `Suhosin.org <https://suhosin.org/>`_
Expand All @@ -298,7 +296,6 @@ List of external links mentioned in this documentation.
* `Variable functions <https://www.php.net/manual/en/functions.variable-functions.php>`_
* `Variable scope <https://www.php.net/manual/en/language.variables.scope.php>`_
* `Variable Scope <https://www.php.net/manual/en/language.variables.scope.php>`_
* `Visibility <https://www.php.net/manual/en/language.oop5.visibility.php>`_
* `Vladimir Reznichenko <https://twitter.com/kalessil>`_
* `Void functions <https://www.php.net/manual/en/migration71.new-features.php#migration71.new-features.void-functions>`_
* `Weak references <https://www.php.net/manual/en/book.weakref.php>`_
Expand Down
27 changes: 25 additions & 2 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Release Note

Here is the release note of exakat.

**Version 2.4.7 (???, 2022-07-21)**
**Version 2.4.8 (???, 2022-08-27)**


+ Architecture
Expand All @@ -24,12 +24,32 @@ Here is the release note of exakat.
+ Tokenizer
+

**Version 2.4.6 (???, 2022-07-21)**
**Version 2.4.7 (Xu Jingzong, 2022-08-03)**


+ Architecture
+

+ Cobbler
+ New cobbler : remove brackets to single-instruction commands

+ Report
+

+ Analysis
+ Refactored analysis : Could Use Array_sum()
+ Refactored analysis : Wrong Attribute with properties

+ Tokenizer
+

**Version 2.4.6 (Li Yuanji, 2022-07-20)**


+ Architecture
+ Skip loading of WS property when only doing an audit (speed up loading)
+ Finished moved to Gremlin 3.6

+ Cobbler
+ New cobbler : adds brackets to single-instruction commands

Expand All @@ -38,9 +58,12 @@ Here is the release note of exakat.

+ Analysis
+ Refactored analysis : Wrong Type Hint with First Class Callable
+ New analysis : PHP 8.2 new functions
+ Refactored analysis : Useless Cast takes advantages of const types

+ Tokenizer
+ Typed all internal atoms
+ Added types to internal loading engine

**Version 2.4.5 (Li Yuanji, 2022-07-07)**

Expand Down
2 changes: 1 addition & 1 deletion Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Introduction
============

This is the documentation of the Exakat engine, version 2.4.5 (Build 1381), on Fri, 08 Jul 2022 10:36:02 +0000.
This is the documentation of the Exakat engine, version 2.4.7 (Build 1382), on Thu, 21 Jul 2022 14:25:31 +0000.

What is Exakat ?
----------------
Expand Down
64 changes: 64 additions & 0 deletions Reference/Cobblers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ _____
?>
.. _add-brackets-to-single-instructions-reverse-cobbler:

Reverse Cobbler
_______________

* :ref:`No anchor for Structures/RemoveBracketsAroundSingleInstruction.ini <no-anchor-for-structures-removebracketsaroundsingleinstruction.ini>`



.. _add-brackets-to-single-instructions-specs:
Expand Down Expand Up @@ -721,6 +728,63 @@ _____
+----------------+------------------------------------------------------------------+


.. _structures-removebracketsaroundsingleinstruction:

.. _remove-brackets-around-single-instruction:

Remove Brackets Around Single Instruction
+++++++++++++++++++++++++++++++++++++++++
This cobbler removes brackets when they are not compulsory. This applies to single instruction, on for(), foreach(), while(), do...while() structures.

This also means that any refactoring that grows the instruction again to multiple instructions has to add the brackets again.

There is no gain in speed or code lenght by removing those brackets.



.. _remove-brackets-around-single-instruction-before:

Before
______
.. code-block:: php
<?php
foreach($i = 0; $i < 10; ++$i) { $total += 1; }
?>
.. _remove-brackets-around-single-instruction-after:

After
_____
.. code-block:: php
<?php
foreach($i = 0; $i < 10; ++$i) $total += 1;
?>
.. _remove-brackets-around-single-instruction-reverse-cobbler:

Reverse Cobbler
_______________

* :ref:`add-brackets-to-single-instructions`



.. _remove-brackets-around-single-instruction-specs:

Specs
_____

+----------------+--------------------------------------------------+
| Short Name | Structures/RemoveBracketsAroundSingleInstruction |
+----------------+--------------------------------------------------+
| Exakat version | 2.3.0 |
+----------------+--------------------------------------------------+
| Available in | |
+----------------+--------------------------------------------------+


.. _structures-removedollarcurly:

.. _remove-dollar-curly:
Expand Down
10 changes: 5 additions & 5 deletions Reference/Reports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The Beauty Canon report displays one result per line. This report lists all issu

The title of the analysis is listed on the left, and the analysis short name is listed on the right, for further documentation.

This analysis uses Analysis as default rule. It may otherwise parametered with the -T option.
This analysis uses Analysis as default rule. It may otherwise configured with the -T option.



Expand Down Expand Up @@ -184,7 +184,7 @@ ___________

The ClassReview report focuses on reviewing classes, traits and interfaces.

The ClassReview report focuses on good code hygiene for classes, interfaces and traits.
The ` :ref:`report-classreview` `` report focuses on good code hygiene for classes, interfaces, enumerations and traits.

It checks the internal structure of classes, and suggest visibility, typehint updates.

Expand Down Expand Up @@ -259,7 +259,7 @@ ______________

The Clustergrammar report format data for a clustergrammer diagram.

Clustergrammer is a visualisation tool that may be found online. After generation of this report, a TEXT file is available in the project directory. Upload it on `http://amp.pharm.mssm.edu/clustergrammer/ <http://amp.pharm.mssm.edu/clustergrammer/>`_ to visualize it.
` :ref:`report-clustergrammer` ` is a visualisation tool that may be found online. After generation of this report, a TEXT file is available in the project directory. Upload it on `http://amp.pharm.mssm.edu/clustergrammer/ <http://amp.pharm.mssm.edu/clustergrammer/>`_ to visualize it.

See a live report here : `Clustergrammer <http://amp.pharm.mssm.edu/clustergrammer/viz_sim_mats/5a8d41bf3a82d32a9dacddd9/clustergrammer.txt>`_.

Expand Down Expand Up @@ -970,7 +970,7 @@ __________

Builds a list of ruleset, based on the number of issues from the previous audit.

Exakatyaml helpls with the configuration of exakat in a CI. It builds a list of ruleset, based on the number of issues from the previous audit.
Exakatyaml helps with the configuration of exakat in a CI. It builds a list of ruleset, based on the number of issues from the previous audit.

Continuous Integration require steps that yield no issues. This is good for analysis that yield no results : in a word, all analysis that are currently clean should be in the CI. That way, any return will be monitored.

Expand Down Expand Up @@ -2765,7 +2765,7 @@ Some issues spotted by Exakat may be fixed automagically by Rector. Rector offer

For example, `CombinedAssignRector <https://github.com/rectorphp/rector/blob/master/docs/AllRectorsOverview.md#combinedassignrector>`_, simplifies ``$value = $value + 5`` into ``+$value += 5;``. On Exakat, the rule `Structures/CouldUseShortAssignation <(https://exakat.readthedocs.io/en/latest/Rules.html#could-use-short-assignation>`_ spot those too.

Not all exakat rules are covered by Rector, and vice-versa. `CompactToVariablesRector <https://github.com/rectorphp/rector/blob/master/docs/AllRectorsOverview.md#compacttovariablesrector>`_ aims à skipping usage of compact(), while `Structures/CouldUseCompact <https://exakat.readthedocs.io/en/latest/Rules.html#could-use-compact>`_ suggest the contrary.
Not all exakat rules are covered by Rector, and vice-versa. `CompactToVariablesRector <https://github.com/rectorphp/rector/blob/master/docs/AllRectorsOverview.md#compacttovariablesrector>`_ aims at skipping usage of compact(), while `Structures/CouldUseCompact <https://exakat.readthedocs.io/en/latest/Rules.html#could-use-compact>`_ suggest the contrary.

Rector and Exakat both use different approaches to code review. It is recommended to review the changes before committing them.

Expand Down

0 comments on commit 2d67a55

Please sign in to comment.