Skip to content

Commit d26789a

Browse files
Docs Update
1 parent abe35df commit d26789a

File tree

47 files changed

+2054
-140
lines changed

Some content is hidden

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

47 files changed

+2054
-140
lines changed

README.rst

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,48 @@ 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+
47+
- `UseSpaces <Root/Formatting/Spacing/UseSpaces/README.rst>`_
48+
49+
850
- `Metadata <Root/Metadata/README.rst>`_
951

1052

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

82124

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

85127

128+
- `ClassConstants <Root/Smell/ClassSmell/ClassSize/ClassConstants/README.rst>`_
129+
130+
131+
- `ClassInstanceVariables <Root/Smell/ClassSmell/ClassSize/ClassInstanceVariables/README.rst>`_
132+
133+
134+
- `ClassLength <Root/Smell/ClassSmell/ClassSize/ClassLength/README.rst>`_
135+
136+
137+
- `ClassMethods <Root/Smell/ClassSmell/ClassSize/ClassMethods/README.rst>`_
138+
139+
86140
- `DataClump <Root/Smell/ClassSmell/DataClump/README.rst>`_
87141

88142

@@ -92,18 +146,42 @@ The aspect tree is given below:
92146
- `Complexity <Root/Smell/Complexity/README.rst>`_
93147

94148

149+
- `CylomaticComplexity <Root/Smell/Complexity/CylomaticComplexity/README.rst>`_
150+
151+
152+
- `MaintainabilityIndex <Root/Smell/Complexity/MaintainabilityIndex/README.rst>`_
153+
154+
95155
- `MethodSmell <Root/Smell/MethodSmell/README.rst>`_
96156

97157

158+
- `MethodLength <Root/Smell/MethodSmell/MethodLength/README.rst>`_
159+
160+
161+
- `ParameterListLength <Root/Smell/MethodSmell/ParameterListLength/README.rst>`_
162+
163+
98164
- `Naming <Root/Smell/Naming/README.rst>`_
99165

100166

101167
- `Spelling <Root/Spelling/README.rst>`_
102168

103169

104-
- `aspectsYEAH <Root/Spelling/aspectsYEAH/README.rst>`_
170+
- `CompanySpecificWordSpelling <Root/Spelling/CompanySpecificWordSpelling/README.rst>`_
171+
172+
173+
- `GeneralWordSpelling <Root/Spelling/GeneralWordSpelling/README.rst>`_
174+
175+
176+
- `Syntax <Root/Syntax/README.rst>`_
177+
178+
179+
- `Context <Root/Syntax/Context/README.rst>`_
180+
181+
182+
- `KeyWords <Root/Syntax/KeyWords/README.rst>`_
105183

106184

107-
- `coalaCorrect <Root/Spelling/coalaCorrect/README.rst>`_
185+
- `Phrases <Root/Syntax/Phrases/README.rst>`_
108186

109187

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+
A file's length refers to number of character found in it.
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
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, leftmostchild, leftsibling):
42+
self.value=value
43+
self.leftmostchild=leftmostchild
44+
self.leftsibling=leftsibling
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+
A line's length refers to the number of character found in it.
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 results in too long lines.
51+

Root/Formatting/Length/README.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
The `Length` here refers to:
12+
13+
* each line's length in the file,
14+
* the file length.
15+
16+
Subaspects
17+
==========
18+
19+
* `FileLength <FileLength/README.rst>`_
20+
* `LineLength <LineLength/README.rst>`_
21+
Example
22+
=======
23+
24+
.. code-block:: python
25+
26+
# We assume that the maximum number of characters per line is 10
27+
# and that the maximum number of lines per files is 3.
28+
29+
def run(bear, file, filename, aspectlist):
30+
return bear.run(file, filename, aspectlist)
31+
32+
33+
Importance
34+
==========
35+
36+
Too long lines of code and too large files result in code difficult to
37+
read, understand and maintain.
38+
39+
How to fix this
40+
==========
41+
42+
Length issues can be fixed by writing shorter lines of code(splitting
43+
long lines into multiple shorter lines); writing shorter files(
44+
splitting files into modules, writing shorter methods and classes.).
45+
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+
Determines the quotations' marks used for strings and *docs*.
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 (if possible) in a 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>`_ | `Syntax <../Syntax/README.rst>`_ |
7+
+---------------------+--------------------------------------+------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+----------------------------------+
8+
9+
Formatting
10+
==========
11+
Formatting refers to 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):\x20\x20
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)