summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/documentation/Tracking.txt
blob: fc101eba44b41a3eb2be5d3924927c10acac1c3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
2020-11-09

Tracking is used to put some marks within a copy of the source and
in the log file. uncrustify generate a HTML file with the marks.

Using a browser, one can see where, which options are working.

The command option is:

uncrustify --tracking Track.html -c config-FILE -f source-FILE -L A 2>A.txt

Tracking puts a red "M" in the source to show where the options are working.
A tracking number is used and written in the Track.html file and the output file A.txt
to make possible to link the changes together.

An example:

tracking.cpp
{
   a =     b +              111-55;
}

The config file:

indent_with_tabs = 0
sp_arith  = force
sp_assign = force

The tracking file is:

<html>
<head>
   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
   <title>Uncrustify: where do the Spaces options work</title>
</head>
<body lang="en-US">
<p>
</p>
<pre>
{
        a<a title="1,8,sp_assign"><font color="red">M</font></a>=<a title="2,9,16,sp_assign"><font color="red">M</font><
/a>b<a title="3,10,17,22,sp_arith"><font color="red">M</font></a>+<a title="4,11,18,23,27,sp_arith"><font color="red">M<
/font></a>111<a title="5,12,19,24,28,31,sp_arith"><font color="red">M</font></a>-<a title="6,13,20,25,29,32,34,sp_arith"
><font color="red">M</font></a>55<a title="7,14,21,26,30,33,35,36,sp_before_semi"><font color="red">M</font></a>;
}
</pre>
</body>
</html>

Use it with a browser and you can see the red "M"s.
Let put the cursor on the "M"s, and you see the tracking number and the option used.
(look at the picture track.jpg)