File: code_beautifiers.txt

package info (click to toggle)
fuse-emulator 1.3.2%2Bdfsg1-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 10,456 kB
  • ctags: 9,261
  • sloc: ansic: 83,215; sh: 11,503; perl: 3,806; makefile: 1,000; yacc: 254; lex: 143
file content (42 lines) | stat: -rw-r--r-- 1,308 bytes parent folder | download | duplicates (4)
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
Uncrustify
==========
This program modifies .c or .h files, using a coding style similar to the
rest of Fuse source. It is intended for use with new code.

Copy uncrustify.cfg to $HOME/.uncrustify.cfg to set as default options,
or use:

    uncrustify -c uncrustify.cfg input.c

Web Site:

    http://uncrustify.sourceforge.net/

Known issues
------------
The configuration allow extra spaces around operators for aligning purposes,
that could bypass unwanted extra spaces. You can check this by enabling the
strict rules and doing a side-by-side comparison with both outputs.  

When using nl_if_brace to remove newlines between `if' and `{', a newline
is added between `}' and `else', so nl_brace_else is set to `remove' as a
workaround. It should be valid both `} else' and `} \n else' forms.


GNU Indent
==========
This is another code beautifier available at:

    https://www.gnu.org/software/indent/

Use:
    indent -br -ce -prs -npcs -nsaf -nsai -nsaw -nsob input.c -o output.c

Known issues
------------
There isn't an option to remove a space after switch statement, but you can
use this expression with sed: 's/switch (/switch(/g'

There isn't an option to remove spaces between parentheses in a function call
when there are no arguments, but you can use this expression with sed:
's/(  )/()/g'