Skip to content

Commit 4ce170f

Browse files
Docs Update
1 parent abe35df commit 4ce170f

File tree

49 files changed

+2160
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2160
-157
lines changed

README.rst

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,45 @@ This repository is automatically generated. To do so, run ``./generate``. This w
55

66
The aspect tree is given below:
77

8+
- `Formatting <Root/Formatting/README.rst>`_
9+
10+
11+
- `Length <Root/Formatting/Length/README.rst>`_
12+
13+
14+
- `FileLength <Root/Formatting/Length/FileLength/README.rst>`_
15+
16+
17+
- `LineLength <Root/Formatting/Length/LineLength/README.rst>`_
18+
19+
20+
- `Quotation <Root/Formatting/Quotation/README.rst>`_
21+
22+
23+
- `Spacing <Root/Formatting/Spacing/README.rst>`_
24+
25+
26+
- `BlankLine <Root/Formatting/Spacing/BlankLine/README.rst>`_
27+
28+
29+
- `BlankLineAfterClass <Root/Formatting/Spacing/BlankLine/BlankLineAfterClass/README.rst>`_
30+
31+
32+
- `BlankLineAfterDeclaration <Root/Formatting/Spacing/BlankLine/BlankLineAfterDeclaration/README.rst>`_
33+
34+
35+
- `BlankLineAfterProcedure <Root/Formatting/Spacing/BlankLine/BlankLineAfterProcedure/README.rst>`_
36+
37+
38+
- `NewlineAtEOF <Root/Formatting/Spacing/BlankLine/NewlineAtEOF/README.rst>`_
39+
40+
41+
- `SpacesAroundOperator <Root/Formatting/Spacing/SpacesAroundOperator/README.rst>`_
42+
43+
44+
- `TrailingSpace <Root/Formatting/Spacing/TrailingSpace/README.rst>`_
45+
46+
847
- `Metadata <Root/Metadata/README.rst>`_
948

1049

@@ -80,9 +119,21 @@ The aspect tree is given below:
80119
- `ClassSmell <Root/Smell/ClassSmell/README.rst>`_
81120

82121

83-
- `ClassLength <Root/Smell/ClassSmell/ClassLength/README.rst>`_
122+
- `ClassSize <Root/Smell/ClassSmell/ClassSize/README.rst>`_
84123

85124

125+
- `ClassConstants <Root/Smell/ClassSmell/ClassSize/ClassConstants/README.rst>`_
126+
127+
128+
- `ClassInstanceVariables <Root/Smell/ClassSmell/ClassSize/ClassInstanceVariables/README.rst>`_
129+
130+
131+
- `ClassLength <Root/Smell/ClassSmell/ClassSize/ClassLength/README.rst>`_
132+
133+
134+
- `ClassMethods <Root/Smell/ClassSmell/ClassSize/ClassMethods/README.rst>`_
135+
136+
86137
- `DataClump <Root/Smell/ClassSmell/DataClump/README.rst>`_
87138

88139

@@ -92,18 +143,30 @@ The aspect tree is given below:
92143
- `Complexity <Root/Smell/Complexity/README.rst>`_
93144

94145

146+
- `CylomaticComplexity <Root/Smell/Complexity/CylomaticComplexity/README.rst>`_
147+
148+
149+
- `MaintainabilityIndex <Root/Smell/Complexity/MaintainabilityIndex/README.rst>`_
150+
151+
95152
- `MethodSmell <Root/Smell/MethodSmell/README.rst>`_
96153

97154

155+
- `MethodLength <Root/Smell/MethodSmell/MethodLength/README.rst>`_
156+
157+
158+
- `ParameterListLength <Root/Smell/MethodSmell/ParameterListLength/README.rst>`_
159+
160+
98161
- `Naming <Root/Smell/Naming/README.rst>`_
99162

100163

101164
- `Spelling <Root/Spelling/README.rst>`_
102165

103166

104-
- `aspectsYEAH <Root/Spelling/aspectsYEAH/README.rst>`_
167+
- `DictionarySpelling <Root/Spelling/DictionarySpelling/README.rst>`_
105168

106169

107-
- `coalaCorrect <Root/Spelling/coalaCorrect/README.rst>`_
170+
- `OrgSpecificWordSpelling <Root/Spelling/OrgSpecificWordSpelling/README.rst>`_
108171

109172

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
+---------------------------------------+----------------------------+------------------------------------------------------------------+
2+
| ``Root.Formatting.Length.FileLength`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
3+
+---------------------------------------+----------------------------+------------------------------------------------------------------+
4+
5+
+---------------------+------------------------------------------+
6+
| **Sibling aspects** | `LineLength <../LineLength/README.rst>`_ |
7+
+---------------------+------------------------------------------+
8+
9+
FileLength
10+
==========
11+
Number of lines found in a file.
12+
13+
Tastes
14+
========
15+
16+
+--------------------+-----------------------------------+-----------------------------------+
17+
| Taste | Meaning | Values |
18+
+====================+===================================+===================================+
19+
| | | |
20+
|``max_file_length`` | Maximum number of line for a file | **999** +
21+
| | | |
22+
+--------------------+-----------------------------------+-----------------------------------+
23+
24+
25+
\* bold denotes default value
26+
27+
Subaspects
28+
==========
29+
30+
This aspect does not have any sub aspects.
31+
32+
Example
33+
=======
34+
35+
.. code-block:: Python 3
36+
37+
# This file would be a large file if we assume that the max number of
38+
# lines per file is 10
39+
40+
class Node:
41+
def __init__(self, value, left_most_child, left_sibling):
42+
self.value=value
43+
self.left_most_child=left_most_child
44+
self.left_sibling=left_sibling
45+
46+
# This is example is just showing what this aspect is about, because
47+
# the max number of lines per file is usually 999.
48+
49+
50+
Importance
51+
==========
52+
53+
Too long programs (or files) are difficult to read, maintain and
54+
understand.
55+
56+
How to fix this
57+
==========
58+
59+
Splitting files into modules, writing shorter methods and classes.
60+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
+---------------------------------------+----------------------------+------------------------------------------------------------------+
2+
| ``Root.Formatting.Length.LineLength`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
3+
+---------------------------------------+----------------------------+------------------------------------------------------------------+
4+
5+
+---------------------+------------------------------------------+
6+
| **Sibling aspects** | `FileLength <../FileLength/README.rst>`_ |
7+
+---------------------+------------------------------------------+
8+
9+
LineLength
10+
==========
11+
Number of characters found in a line of code.
12+
13+
Tastes
14+
========
15+
16+
+--------------------+-----------------------------------------+-----------------------------------------+
17+
| Taste | Meaning | Values |
18+
+====================+=========================================+=========================================+
19+
| | | |
20+
|``max_line_length`` | Maximum number of character for a line. | **80**, 79, 100, 120, 160 +
21+
| | | |
22+
+--------------------+-----------------------------------------+-----------------------------------------+
23+
24+
25+
\* bold denotes default value
26+
27+
Subaspects
28+
==========
29+
30+
This aspect does not have any sub aspects.
31+
32+
Example
33+
=======
34+
35+
.. code-block::
36+
37+
print('The length of this line is 38')
38+
39+
40+
Importance
41+
==========
42+
43+
Too long lines make code very difficult to read and maintain.
44+
45+
How to fix this
46+
==========
47+
48+
Splitting long lines of code into multiple shorter lines whenever
49+
possible. Avoiding the usage of in-line language specific constructs
50+
whenever they result in too long lines.
51+

Root/Formatting/Length/README.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
+----------------------------+----------------------------+------------------------------------------------------------------+
2+
| ``Root.Formatting.Length`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
3+
+----------------------------+----------------------------+------------------------------------------------------------------+
4+
5+
+---------------------+----------------------------------------+------------------------------------+
6+
| **Sibling aspects** | `Quotation <../Quotation/README.rst>`_ | `Spacing <../Spacing/README.rst>`_ |
7+
+---------------------+----------------------------------------+------------------------------------+
8+
9+
Length
10+
======
11+
Hold sub-aspects for file and line length.
12+
13+
Subaspects
14+
==========
15+
16+
* `FileLength <FileLength/README.rst>`_
17+
* `LineLength <LineLength/README.rst>`_
18+
Example
19+
=======
20+
21+
.. code-block:: Python
22+
23+
# We assume that the maximum number of characters per line is 10
24+
# and that the maximum number of lines per files is 3.
25+
26+
def run(bear, file, filename, aspectlist):
27+
return bear.run(file, filename, aspectlist)
28+
29+
30+
Importance
31+
==========
32+
33+
Too long lines of code and too large files result in code difficult to
34+
read, understand and maintain.
35+
36+
How to fix this
37+
==========
38+
39+
Length issues can be fixed by writing shorter lines of code (splitting
40+
long lines into multiple shorter lines); writing shorter files
41+
(splitting files into modules, writing shorter methods and classes.).
42+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
+-------------------------------+----------------------------+------------------------------------------------------------------+
2+
| ``Root.Formatting.Quotation`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
3+
+-------------------------------+----------------------------+------------------------------------------------------------------+
4+
5+
+---------------------+----------------------------------+------------------------------------+
6+
| **Sibling aspects** | `Length <../Length/README.rst>`_ | `Spacing <../Spacing/README.rst>`_ |
7+
+---------------------+----------------------------------+------------------------------------+
8+
9+
Quotation
10+
=========
11+
Quotation mark used for strings and docstrings.
12+
13+
Tastes
14+
========
15+
16+
+------------------------+------------------------------------+------------------------------------+
17+
| Taste | Meaning | Values |
18+
+========================+====================================+====================================+
19+
| | | |
20+
|``preferred_quotation`` | Represents the preferred quotation | **'**, " +
21+
| | | |
22+
+------------------------+------------------------------------+------------------------------------+
23+
24+
25+
\* bold denotes default value
26+
27+
Subaspects
28+
==========
29+
30+
This aspect does not have any sub aspects.
31+
32+
Example
33+
=======
34+
35+
.. code-block:: Python
36+
37+
# Here is an example of code where both '' and "" quotation mark
38+
# Are used.
39+
40+
string = 'coala is always written with lowercase c.'
41+
string = "coala is always written with lowercase c."
42+
43+
44+
Importance
45+
==========
46+
47+
Using the same quotation whenever possible in the code, improve on its
48+
readability by introducing consistency.
49+
50+
How to fix this
51+
==========
52+
53+
Choosing a preferred quotation and using it everywhere (if possible).
54+

Root/Formatting/README.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
+---------------------+----------------------------+------------------------------------------------------------------+
2+
| ``Root.Formatting`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
3+
+---------------------+----------------------------+------------------------------------------------------------------+
4+
5+
+---------------------+--------------------------------------+------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+
6+
| **Sibling aspects** | `Metadata <../Metadata/README.rst>`_ | `Redundancy <../Redundancy/README.rst>`_ | `Security <../Security/README.rst>`_ | `Smell <../Smell/README.rst>`_ | `Spelling <../Spelling/README.rst>`_ |
7+
+---------------------+--------------------------------------+------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+
8+
9+
Formatting
10+
==========
11+
The visual appearance of source code.
12+
13+
Subaspects
14+
==========
15+
16+
* `Length <Length/README.rst>`_
17+
* `Quotation <Quotation/README.rst>`_
18+
* `Spacing <Spacing/README.rst>`_
19+
Example
20+
=======
21+
22+
.. code-block:: Python
23+
24+
# Here is an example of Python code with lots of
25+
# formatting issues including: trailing spaces, missing spaces
26+
# around operators, strange and inconsistent indentation etc.
27+
28+
z = 'hello'+'world'
29+
def f ( a):
30+
pass
31+
32+
33+
Importance
34+
==========
35+
36+
A coding style (the of rules or guidelines used when writing the
37+
source code) can drastically affect the readability, and
38+
maintainability of a program and might as well introduce bugs.
39+
40+
How to fix this
41+
==========
42+
43+
Defining a clearly and thoughtful coding style (based on the available
44+
ones given the programming language in use) and strictly respect it or
45+
apply it through out the implementation of a project.
46+

0 commit comments

Comments
 (0)