Skip to content

Commit 9f7b8c9

Browse files
committed
Users/Tutorial.rst: Output examples added
Added the examples of output when a user runs coala on coala-tutorial code. Closes coala/coala#4254
1 parent d22d9db commit 9f7b8c9

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Users/Tutorial.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,55 @@ coala will now ask you for missing values that are needed to perform the
6666
analysis, which in this case is only the ``use_spaces`` setting. We
6767
recommend setting it to ``True``.
6868

69+
::
70+
71+
Please enter a value for the setting "use_spaces" (True if spaces
72+
are to be used instead of tabs.) needed by SpaceConsistencyBear
73+
for section "cli"
74+
6975
coala will now check the code and, in case you use the tutorial code,
7076
yield one result. SpaceConsistencyBear will detect a trailing whitespace at
7177
the end of the line, after ``#include <stdio.h>`` in the ``main.c`` file. coala
7278
will then ask you to remove the trailing space, by applying the suggested
7379
patch (option 2).
7480

81+
::
82+
83+
Executing section cli...
84+
85+
src/main.c
86+
| 1| #include·<stdio.h>·
87+
| | [NORMAL] SpaceConsistencyBear:
88+
| | Line contains following spacing inconsistencies:
89+
| | - Trailing whitespaces.
90+
|----| | /path/coala-tutorial/src/main.c
91+
| |++++| /path/coala-tutorial/src/main.c
92+
| 1| |-#include <stdio.h>
93+
| | 1|+#include <stdio.h>
94+
| 2| 2|
95+
| 3| 3| int main(void) {
96+
| 4| 4| printf("Welcome to coala. Keep following the
97+
tutorial, you are doing a great job so far!\n");
98+
| | *0: Do nothing
99+
| | 1: Open file(s)
100+
| | 2: Apply patch
101+
| | 3: Print more info
102+
| | 4: Add ignore comment
103+
| | Enter number (Ctrl-D to exit): 2
104+
105+
If the patch was applied succesfully, you should see something like this:
106+
107+
::
108+
109+
| | Patch applied successfully.
110+
| | *0: Do nothing
111+
| | 1: Open file(s)
112+
| | 2: Print more info
113+
| | 3: Add ignore comment
114+
| | Enter number (Ctrl-D to exit):
115+
116+
Exit by pressing Ctrl-D.
117+
75118
You can also run coala in non interactive mode (given that all the settings
76119
required by the bears you are using are provided in the ``.coafile``)
77120

0 commit comments

Comments
 (0)