Skip to content

Commit 351a83f

Browse files
Docs Update
1 parent d26789a commit 351a83f

File tree

39 files changed

+292
-203
lines changed

39 files changed

+292
-203
lines changed

README.rst

+2-17
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ The aspect tree is given below:
4444
- `TrailingSpace <Root/Formatting/Spacing/TrailingSpace/README.rst>`_
4545

4646

47-
- `UseSpaces <Root/Formatting/Spacing/UseSpaces/README.rst>`_
48-
49-
5047
- `Metadata <Root/Metadata/README.rst>`_
5148

5249

@@ -167,21 +164,9 @@ The aspect tree is given below:
167164
- `Spelling <Root/Spelling/README.rst>`_
168165

169166

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>`_
167+
- `DictionarySpelling <Root/Spelling/DictionarySpelling/README.rst>`_
183168

184169

185-
- `Phrases <Root/Syntax/Phrases/README.rst>`_
170+
- `OrgSpecificWordSpelling <Root/Spelling/OrgSpecificWordSpelling/README.rst>`_
186171

187172

Root/Formatting/Length/FileLength/README.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
FileLength
1010
==========
11-
A file's length refers to number of character found in it.
11+
Number of lines found in a file.
1212

1313
Tastes
1414
========
@@ -32,16 +32,16 @@ This aspect does not have any sub aspects.
3232
Example
3333
=======
3434

35-
.. code-block:: python
35+
.. code-block:: Python 3
3636

3737
# This file would be a large file if we assume that the max number of
3838
# lines per file is 10
3939

40-
class node:
41-
def __init__(self, value, leftmostchild, leftsibling):
40+
class Node:
41+
def __init__(self, value, left_most_child, left_sibling):
4242
self.value=value
43-
self.leftmostchild=leftmostchild
44-
self.leftsibling=leftsibling
43+
self.left_most_child=left_most_child
44+
self.left_sibling=left_sibling
4545

4646
# This is example is just showing what this aspect is about, because
4747
# the max number of lines per file is usually 999.

Root/Formatting/Length/LineLength/README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
LineLength
1010
==========
11-
A line's length refers to the number of character found in it.
11+
Number of characters found in a line of code.
1212

1313
Tastes
1414
========
@@ -47,5 +47,5 @@ How to fix this
4747

4848
Splitting long lines of code into multiple shorter lines whenever
4949
possible. Avoiding the usage of in-line language specific constructs
50-
whenever they results in too long lines.
50+
whenever they result in too long lines.
5151

Root/Formatting/Length/README.rst

+5-8
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
Length
1010
======
11-
The `Length` here refers to:
12-
13-
* each line's length in the file,
14-
* the file length.
11+
Hold sub-aspects for file and line length.
1512

1613
Subaspects
1714
==========
@@ -21,7 +18,7 @@ Subaspects
2118
Example
2219
=======
2320

24-
.. code-block:: python
21+
.. code-block:: Python
2522
2623
# We assume that the maximum number of characters per line is 10
2724
# and that the maximum number of lines per files is 3.
@@ -39,7 +36,7 @@ read, understand and maintain.
3936
How to fix this
4037
==========
4138

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.).
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.).
4542

Root/Formatting/Quotation/README.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Quotation
1010
=========
11-
Determines the quotations' marks used for strings and *docs*.
11+
Quotation mark used for strings and docstrings.
1212

1313
Tastes
1414
========
@@ -32,7 +32,7 @@ This aspect does not have any sub aspects.
3232
Example
3333
=======
3434

35-
.. code-block:: python
35+
.. code-block:: Python
3636
3737
# Here is an example of code where both '' and "" quotation mark
3838
# Are used.
@@ -44,7 +44,7 @@ Example
4444
Importance
4545
==========
4646

47-
Using the same quotation (if possible) in a code, improve on its
47+
Using the same quotation whenever possible in the code, improve on its
4848
readability by introducing consistency.
4949

5050
How to fix this

Root/Formatting/README.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
| ``Root.Formatting`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
33
+---------------------+----------------------------+------------------------------------------------------------------+
44

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-
+---------------------+--------------------------------------+------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+----------------------------------+
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+
+---------------------+--------------------------------------+------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+
88

99
Formatting
1010
==========
11-
Formatting refers to the visual appearance of source code.
11+
The visual appearance of source code.
1212

1313
Subaspects
1414
==========
@@ -19,14 +19,14 @@ Subaspects
1919
Example
2020
=======
2121

22-
.. code-block:: python
22+
.. code-block:: Python
2323
24-
# Here is an example of python code with lots of
24+
# Here is an example of Python code with lots of
2525
# formatting issues including: trailing spaces, missing spaces
2626
# around operators, strange and inconsistent indentation etc.
2727
2828
z = 'hello'+'world'
29-
def f ( a):\x20\x20
29+
def f ( a):
3030
pass
3131
3232

Root/Formatting/Spacing/BlankLine/BlankLineAfterClass/README.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
BlankLineAfterClass
1010
===================
11-
Blank lines after classes refer to the blank lines found after classes'
12-
definitions.
11+
Those found after classes' definitions.
1312

1413
Tastes
1514
========
@@ -34,7 +33,7 @@ This aspect does not have any sub aspects.
3433
Example
3534
=======
3635

37-
.. code-block:: python
36+
.. code-block:: Python 3
3837

3938
class SomeClass:
4039
def __init__(self):

Root/Formatting/Spacing/BlankLine/BlankLineAfterDeclaration/README.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
BlankLineAfterDeclaration
1010
=========================
11-
Blank lines after declaration refer to the blank lines found after
12-
declarations.
11+
Those found after declarations.
1312

1413
Tastes
1514
========
@@ -35,9 +34,15 @@ Example
3534

3635
.. code-block:: C
3736
37+
#include <stdio.h>
38+
3839
int main ()
3940
{
4041
int a;
42+
float b;
43+
44+
scanf("%d%f", &a, &b);
45+
printf("a = %d and b = %f", a, b);
4146
return 0;
4247
}
4348

Root/Formatting/Spacing/BlankLine/BlankLineAfterProcedure/README.rst

+6-7
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
BlankLineAfterProcedure
1010
=======================
11-
Blank lines after procedures` refer to the blank lines found after
12-
procedures or functions.
11+
Those found after procedures or functions.
1312

1413
Tastes
1514
========
@@ -19,7 +18,7 @@ Tastes
1918
+=================================+=====================================================+=====================================================+
2019
| | | |
2120
|``blank_lines_after_procedures`` | Represents the number of blank lines to use after a | **1**, 0, 2 |
22-
| | procedure or a function | |
21+
| | procedure ora function | |
2322
| | | |
2423
+---------------------------------+-----------------------------------------------------+-----------------------------------------------------+
2524

@@ -34,13 +33,13 @@ This aspect does not have any sub aspects.
3433
Example
3534
=======
3635

37-
.. code-block:: C++
36+
.. code-block:: C
3837
38+
#include <stdio.h>
39+
3940
void proc(void){
4041
printf("this does nothing");
41-
}
42-
43-
int add(float a, float b){
42+
} int add(float a, float b){
4443
return a + b;
4544
}
4645

Root/Formatting/Spacing/BlankLine/NewlineAtEOF/README.rst

+6-7
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
NewlineAtEOF
1010
============
11-
A newline character (usually '\n', aka CR or CRLF) at found at the end of
12-
file.
11+
Newline character (usually '\\n', aka CR) found at the end of file.
1312

1413
Tastes
1514
========
@@ -33,18 +32,18 @@ This aspect does not have any sub aspects.
3332
Example
3433
=======
3534

36-
.. code-block:: python
35+
.. code-block:: Python
3736
3837
def do_nothing():
39-
pass\n
38+
pass
4039
4140
4241
Importance
4342
==========
4443

45-
A text file, under unix, consists of a series of lines, each of which
46-
ends with a newline character (\n). A file that is not empty and does
47-
not end with a newline is therefore not a text file.
44+
A text file consists of a series of lines, each of which ends with a
45+
newline character (\\n). A file that is not empty and does not end
46+
with a newline is therefore not a text file.
4847

4948
It's not just bad style, it can lead to unexpected behavior, utilities
5049
that are supposed to operate on text files may not cope well with files

Root/Formatting/Spacing/BlankLine/README.rst

+7-9
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
| ``Root.Formatting.Spacing.BlankLine`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
33
+---------------------------------------+----------------------------+------------------------------------------------------------------+
44

5-
+---------------------+--------------------------------------------------------------+------------------------------------------------+----------------------------------------+
6-
| **Sibling aspects** | `SpacesAroundOperator <../SpacesAroundOperator/README.rst>`_ | `TrailingSpace <../TrailingSpace/README.rst>`_ | `UseSpaces <../UseSpaces/README.rst>`_ |
7-
+---------------------+--------------------------------------------------------------+------------------------------------------------+----------------------------------------+
5+
+---------------------+--------------------------------------------------------------+------------------------------------------------+
6+
| **Sibling aspects** | `SpacesAroundOperator <../SpacesAroundOperator/README.rst>`_ | `TrailingSpace <../TrailingSpace/README.rst>`_ |
7+
+---------------------+--------------------------------------------------------------+------------------------------------------------+
88

99
BlankLine
1010
=========
11-
A blank line refers to a line containing zero characters.
11+
A line with zero characters.
1212

1313
Subaspects
1414
==========
@@ -20,14 +20,12 @@ Subaspects
2020
Example
2121
=======
2222

23-
.. code-block:: python
23+
.. code-block:: Python 3
2424

25-
name = input('What is your name?
26-
')
25+
name = input('What is your name?')
2726

2827

29-
print('Hi, {}'.format(name))
30-
28+
print('Hi, {}'.format(name))
3129

3230

3331
Importance

Root/Formatting/Spacing/README.rst

+5-7
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,26 @@
88

99
Spacing
1010
=======
11-
Spacing refers to all whitespace found between non-whitespace characters.
11+
All whitespace found between non-whitespace characters.
1212

1313
Subaspects
1414
==========
1515

1616
* `BlankLine <BlankLine/README.rst>`_
1717
* `SpacesAroundOperator <SpacesAroundOperator/README.rst>`_
1818
* `TrailingSpace <TrailingSpace/README.rst>`_
19-
* `UseSpaces <UseSpaces/README.rst>`_
2019
Example
2120
=======
2221

23-
.. code-block:: python
22+
.. code-block:: Python
2423
25-
# Here is an example of code with spacing issues including trailing
26-
# spaces(encoded as \x20 as we don't want them in our code),
27-
# optional/useless blank lines and missing space around operators.
24+
# Here is an example of code with spacing issues including
25+
# unnecessary blank lines and missing space around operators.
2826
2927
3028
3129
def func( ):
32-
return. 37*-+2\x20
30+
return 37*-+2
3331
3432
3533
Importance

Root/Formatting/Spacing/SpacesAroundOperator/README.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
| ``Root.Formatting.Spacing.SpacesAroundOperator`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
33
+--------------------------------------------------+----------------------------+------------------------------------------------------------------+
44

5-
+---------------------+----------------------------------------+------------------------------------------------+----------------------------------------+
6-
| **Sibling aspects** | `BlankLine <../BlankLine/README.rst>`_ | `TrailingSpace <../TrailingSpace/README.rst>`_ | `UseSpaces <../UseSpaces/README.rst>`_ |
7-
+---------------------+----------------------------------------+------------------------------------------------+----------------------------------------+
5+
+---------------------+----------------------------------------+------------------------------------------------+
6+
| **Sibling aspects** | `BlankLine <../BlankLine/README.rst>`_ | `TrailingSpace <../TrailingSpace/README.rst>`_ |
7+
+---------------------+----------------------------------------+------------------------------------------------+
88

99
SpacesAroundOperator
1010
====================
@@ -40,10 +40,10 @@ This aspect does not have any sub aspects.
4040
Example
4141
=======
4242

43-
.. code-block:: python
43+
.. code-block:: Python
4444
45-
def f(a):
46-
return 37+-+a[42-x : y**3]
45+
def f(a, x):
46+
return 37+a[42 - x]
4747
4848
4949
Importance
@@ -55,6 +55,6 @@ operators improves on the readability of the code.
5555
How to fix this
5656
==========
5757

58-
`SpacesAroundOperator` issues can be fixed by simply specifying (and
59-
using) a number of whitespace to be use after each operator.
58+
`SpacesAroundOperator` issues can be fixed by simply specifying and
59+
the number of whitespace to be used after each operator.
6060

0 commit comments

Comments
 (0)