Skip to content

Commit

Permalink
Docs Update
Browse files Browse the repository at this point in the history
  • Loading branch information
adtac committed Nov 20, 2016
1 parent d31142b commit 9e29742
Show file tree
Hide file tree
Showing 24 changed files with 484 additions and 37 deletions.
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Body/Existence/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Body.Existence`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+-------------------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+----------------------------------------+----------------------------------+
| **Sibling aspects** | `Existence <../Existence/README.rst>`_ | `Length <../Length/README.rst>`_ |
+---------------------+----------------------------------------+----------------------------------+
+---------------------+----------------------------------+
| **Sibling aspects** | `Length <../Length/README.rst>`_ |
+---------------------+----------------------------------+

Existence
=========
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Body/Length/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Body.Length`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+----------------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+----------------------------------------+----------------------------------+
| **Sibling aspects** | `Existence <../Existence/README.rst>`_ | `Length <../Length/README.rst>`_ |
+---------------------+----------------------------------------+----------------------------------+
+---------------------+----------------------------------------+
| **Sibling aspects** | `Existence <../Existence/README.rst>`_ |
+---------------------+----------------------------------------+

Length
======
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Body/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Body`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+---------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+------------------------------+----------------------------------------+--------------------------------------+
| **Sibling aspects** | `Body <../Body/README.rst>`_ | `Emptiness <../Emptiness/README.rst>`_ | `Shortlog <../Shortlog/README.rst>`_ |
+---------------------+------------------------------+----------------------------------------+--------------------------------------+
+---------------------+----------------------------------------+--------------------------------------+
| **Sibling aspects** | `Emptiness <../Emptiness/README.rst>`_ | `Shortlog <../Shortlog/README.rst>`_ |
+---------------------+----------------------------------------+--------------------------------------+

Body
====
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Emptiness/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Emptiness`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+--------------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+------------------------------+----------------------------------------+--------------------------------------+
| **Sibling aspects** | `Body <../Body/README.rst>`_ | `Emptiness <../Emptiness/README.rst>`_ | `Shortlog <../Shortlog/README.rst>`_ |
+---------------------+------------------------------+----------------------------------------+--------------------------------------+
+---------------------+------------------------------+--------------------------------------+
| **Sibling aspects** | `Body <../Body/README.rst>`_ | `Shortlog <../Shortlog/README.rst>`_ |
+---------------------+------------------------------+--------------------------------------+

Emptiness
=========
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+----------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+------------------------------------------------+
| **Sibling aspects** | `CommitMessage <../CommitMessage/README.rst>`_ |
+---------------------+------------------------------------------------+
+---------------------+
| **Sibling aspects** |
+---------------------+

CommitMessage
=============
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Shortlog/ColonExistence/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Shortlog.ColonExistence`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+----------------------------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
| **Sibling aspects** | `ColonExistence <../ColonExistence/README.rst>`_ | `FirstCharacter <../FirstCharacter/README.rst>`_ | `Length <../Length/README.rst>`_ | `Tense <../Tense/README.rst>`_ | `TrailingPeriod <../TrailingPeriod/README.rst>`_ |
+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
+---------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
| **Sibling aspects** | `FirstCharacter <../FirstCharacter/README.rst>`_ | `Length <../Length/README.rst>`_ | `Tense <../Tense/README.rst>`_ | `TrailingPeriod <../TrailingPeriod/README.rst>`_ |
+---------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+

ColonExistence
==============
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Shortlog/FirstCharacter/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Shortlog.FirstCharacter`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+----------------------------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
| **Sibling aspects** | `ColonExistence <../ColonExistence/README.rst>`_ | `FirstCharacter <../FirstCharacter/README.rst>`_ | `Length <../Length/README.rst>`_ | `Tense <../Tense/README.rst>`_ | `TrailingPeriod <../TrailingPeriod/README.rst>`_ |
+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
+---------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
| **Sibling aspects** | `ColonExistence <../ColonExistence/README.rst>`_ | `Length <../Length/README.rst>`_ | `Tense <../Tense/README.rst>`_ | `TrailingPeriod <../TrailingPeriod/README.rst>`_ |
+---------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+

FirstCharacter
==============
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Shortlog/Length/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Shortlog.Length`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+--------------------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
| **Sibling aspects** | `ColonExistence <../ColonExistence/README.rst>`_ | `FirstCharacter <../FirstCharacter/README.rst>`_ | `Length <../Length/README.rst>`_ | `Tense <../Tense/README.rst>`_ | `TrailingPeriod <../TrailingPeriod/README.rst>`_ |
+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
+---------------------+--------------------------------------------------+--------------------------------------------------+--------------------------------+--------------------------------------------------+
| **Sibling aspects** | `ColonExistence <../ColonExistence/README.rst>`_ | `FirstCharacter <../FirstCharacter/README.rst>`_ | `Tense <../Tense/README.rst>`_ | `TrailingPeriod <../TrailingPeriod/README.rst>`_ |
+---------------------+--------------------------------------------------+--------------------------------------------------+--------------------------------+--------------------------------------------------+

Length
======
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Shortlog/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Shortlog`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+-------------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+------------------------------+----------------------------------------+--------------------------------------+
| **Sibling aspects** | `Body <../Body/README.rst>`_ | `Emptiness <../Emptiness/README.rst>`_ | `Shortlog <../Shortlog/README.rst>`_ |
+---------------------+------------------------------+----------------------------------------+--------------------------------------+
+---------------------+------------------------------+----------------------------------------+
| **Sibling aspects** | `Body <../Body/README.rst>`_ | `Emptiness <../Emptiness/README.rst>`_ |
+---------------------+------------------------------+----------------------------------------+

Shortlog
========
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Shortlog/Tense/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Shortlog.Tense`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+-------------------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
| **Sibling aspects** | `ColonExistence <../ColonExistence/README.rst>`_ | `FirstCharacter <../FirstCharacter/README.rst>`_ | `Length <../Length/README.rst>`_ | `Tense <../Tense/README.rst>`_ | `TrailingPeriod <../TrailingPeriod/README.rst>`_ |
+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------------------------+
| **Sibling aspects** | `ColonExistence <../ColonExistence/README.rst>`_ | `FirstCharacter <../FirstCharacter/README.rst>`_ | `Length <../Length/README.rst>`_ | `TrailingPeriod <../TrailingPeriod/README.rst>`_ |
+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------------------------+

Tense
=====
Expand Down
6 changes: 3 additions & 3 deletions Metadata/CommitMessage/Shortlog/TrailingPeriod/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata.CommitMessage.Shortlog.TrailingPeriod`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+----------------------------------------------------+----------------------------+------------------------------------------------------------------+

+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
| **Sibling aspects** | `ColonExistence <../ColonExistence/README.rst>`_ | `FirstCharacter <../FirstCharacter/README.rst>`_ | `Length <../Length/README.rst>`_ | `Tense <../Tense/README.rst>`_ | `TrailingPeriod <../TrailingPeriod/README.rst>`_ |
+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+--------------------------------------------------+
+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+
| **Sibling aspects** | `ColonExistence <../ColonExistence/README.rst>`_ | `FirstCharacter <../FirstCharacter/README.rst>`_ | `Length <../Length/README.rst>`_ | `Tense <../Tense/README.rst>`_ |
+---------------------+--------------------------------------------------+--------------------------------------------------+----------------------------------+--------------------------------+

TrailingPeriod
==============
Expand Down
6 changes: 3 additions & 3 deletions Metadata/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
| ``Metadata`` | `Parent <//github.com/coala/aspect-docs/blob/master/README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+--------------+-------------------------------------------------------------------+------------------------------------------------------------------+

+---------------------+--------------------------------------+
| **Sibling aspects** | `Metadata <../Metadata/README.rst>`_ |
+---------------------+--------------------------------------+
+---------------------+------------------------------------------+
| **Sibling aspects** | `Redundancy <../Redundancy/README.rst>`_ |
+---------------------+------------------------------------------+

Metadata
========
Expand Down
30 changes: 30 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,33 @@ The aspect tree is given below:
- `TrailingPeriod <Metadata/CommitMessage/Shortlog/TrailingPeriod/README.rst>`_


- `Redundancy <Redundancy/README.rst>`_


- `Clone <Redundancy/Clone/README.rst>`_


- `UnreachableCode <Redundancy/UnreachableCode/README.rst>`_


- `UnreachableStatement <Redundancy/UnreachableCode/UnreachableStatement/README.rst>`_


- `UnusedFunction <Redundancy/UnreachableCode/UnusedFunction/README.rst>`_


- `UnusedImport <Redundancy/UnusedImport/README.rst>`_


- `UnusedVariable <Redundancy/UnusedVariable/README.rst>`_


- `UnusedGlobalVariable <Redundancy/UnusedVariable/UnusedGlobalVariable/README.rst>`_


- `UnusedLocalVariable <Redundancy/UnusedVariable/UnusedLocalVariable/README.rst>`_


- `UnusedParameter <Redundancy/UnusedVariable/UnusedParameter/README.rst>`_


70 changes: 70 additions & 0 deletions Redundancy/Clone/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
+----------------------+----------------------------+------------------------------------------------------------------+
| ``Redundancy.Clone`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+----------------------+----------------------------+------------------------------------------------------------------+

+---------------------+----------------------------------------------------+----------------------------------------------+--------------------------------------------------+
| **Sibling aspects** | `UnreachableCode <../UnreachableCode/README.rst>`_ | `UnusedImport <../UnusedImport/README.rst>`_ | `UnusedVariable <../UnusedVariable/README.rst>`_ |
+---------------------+----------------------------------------------------+----------------------------------------------+--------------------------------------------------+

Clone
=====
Code clones are multiple pieces of source code in your
codebase that are very similar.

Settings
========

+--------------------+---------------------------------------------------------+---------------------------------------------------------+
| Setting | Meaning | Values |
+====================+=========================================================+=========================================================+
| | | |
|``min_clone_token`` | The number of tokens that have to be equal for it to be | **20** |
| | detected as a code clone. | |
| | | |
+--------------------+---------------------------------------------------------+---------------------------------------------------------+


\* bold denotes default value

Subaspects
==========

This aspect does not have any sub aspects.

Example
=======

.. code-block:: C++

extern int array_a[];
extern int array_b[];

int sum_a = 0;

for (int i = 0; i < 4; i++)
sum_a += array_a[i];

int average_a = sum_a / 4;

int sum_b = 0;

for (int i = 0; i < 4; i++)
sum_b += array_b[i];

int average_b = sum_b / 4;


Importance
==========

Code clones make editing more difficult due to unnecessary increases
in complexity and length.

How to fix this
==========

Usually code clones can be simplified to only one occurrence. In a
lot of cases, both just use different values or variables and can
be reduced to one function called with different parameters or
loops.

29 changes: 29 additions & 0 deletions Redundancy/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
+----------------+-------------------------------------------------------------------+------------------------------------------------------------------+
| ``Redundancy`` | `Parent <//github.com/coala/aspect-docs/blob/master/README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+----------------+-------------------------------------------------------------------+------------------------------------------------------------------+

+---------------------+--------------------------------------+
| **Sibling aspects** | `Metadata <../Metadata/README.rst>`_ |
+---------------------+--------------------------------------+

Redundancy
==========
This aspect describes redundancy in your source code.

Subaspects
==========

* `Clone <Clone/README.rst>`_
* `UnreachableCode <UnreachableCode/README.rst>`_
* `UnusedImport <UnusedImport/README.rst>`_
* `UnusedVariable <UnusedVariable/README.rst>`_
Importance
==========

Redundant code makes your code harder to read and understand.

How to fix this
==========

Redundant code can usually be removed without consequences.

Loading

0 comments on commit 9e29742

Please sign in to comment.