Example
Dependencies: FXAS21002 FXOS8700Q
simple-mbed-cloud-client/mbed-cloud-client/update-client-hub/.astylerc@0:11cc2b7889af, 2019-11-19 (annotated)
- Committer:
- maygup01
- Date:
- Tue Nov 19 09:49:38 2019 +0000
- Revision:
- 0:11cc2b7889af
Example
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maygup01 | 0:11cc2b7889af | 1 | # Mbed OS code style definition file for astyle |
maygup01 | 0:11cc2b7889af | 2 | |
maygup01 | 0:11cc2b7889af | 3 | # Don't create backup files, let git handle it |
maygup01 | 0:11cc2b7889af | 4 | suffix=none |
maygup01 | 0:11cc2b7889af | 5 | |
maygup01 | 0:11cc2b7889af | 6 | # K&R style |
maygup01 | 0:11cc2b7889af | 7 | style=kr |
maygup01 | 0:11cc2b7889af | 8 | |
maygup01 | 0:11cc2b7889af | 9 | # 1 TBS addition to k&r, add braces to one liners |
maygup01 | 0:11cc2b7889af | 10 | # Use -j as it was changed in astyle from brackets to braces, this way it is compatible with older astyle versions |
maygup01 | 0:11cc2b7889af | 11 | -j |
maygup01 | 0:11cc2b7889af | 12 | |
maygup01 | 0:11cc2b7889af | 13 | # 4 spaces, convert tabs to spaces |
maygup01 | 0:11cc2b7889af | 14 | indent=spaces=4 |
maygup01 | 0:11cc2b7889af | 15 | convert-tabs |
maygup01 | 0:11cc2b7889af | 16 | |
maygup01 | 0:11cc2b7889af | 17 | # Indent switches and cases |
maygup01 | 0:11cc2b7889af | 18 | indent-switches |
maygup01 | 0:11cc2b7889af | 19 | |
maygup01 | 0:11cc2b7889af | 20 | # Remove spaces in and around parentheses |
maygup01 | 0:11cc2b7889af | 21 | unpad-paren |
maygup01 | 0:11cc2b7889af | 22 | |
maygup01 | 0:11cc2b7889af | 23 | # Insert a space after if, while, for, and around operators |
maygup01 | 0:11cc2b7889af | 24 | pad-header |
maygup01 | 0:11cc2b7889af | 25 | pad-oper |
maygup01 | 0:11cc2b7889af | 26 | |
maygup01 | 0:11cc2b7889af | 27 | # Pointer/reference operators go next to the name (on the right) |
maygup01 | 0:11cc2b7889af | 28 | align-pointer=name |
maygup01 | 0:11cc2b7889af | 29 | align-reference=name |
maygup01 | 0:11cc2b7889af | 30 | |
maygup01 | 0:11cc2b7889af | 31 | # Attach { for classes and namespaces |
maygup01 | 0:11cc2b7889af | 32 | attach-namespaces |
maygup01 | 0:11cc2b7889af | 33 | attach-classes |
maygup01 | 0:11cc2b7889af | 34 | |
maygup01 | 0:11cc2b7889af | 35 | # Extend longer lines, define maximum 120 value. This results in aligned code, |
maygup01 | 0:11cc2b7889af | 36 | # otherwise the lines are broken and not consistent |
maygup01 | 0:11cc2b7889af | 37 | max-continuation-indent=120 |
maygup01 | 0:11cc2b7889af | 38 | |
maygup01 | 0:11cc2b7889af | 39 | |
maygup01 | 0:11cc2b7889af | 40 | # Style formatting options for Update Client codebase. |
maygup01 | 0:11cc2b7889af | 41 | |
maygup01 | 0:11cc2b7889af | 42 | # Each line no greater than 120 characters. |
maygup01 | 0:11cc2b7889af | 43 | --max-code-length=120 |
maygup01 | 0:11cc2b7889af | 44 | |
maygup01 | 0:11cc2b7889af | 45 | # Display only files that have been formatted. |
maygup01 | 0:11cc2b7889af | 46 | -Q |
maygup01 | 0:11cc2b7889af | 47 | |
maygup01 | 0:11cc2b7889af | 48 | # Keep one-line blocks, especially for union initialization of error structs. |
maygup01 | 0:11cc2b7889af | 49 | --keep-one-line-blocks |
maygup01 | 0:11cc2b7889af | 50 | |
maygup01 | 0:11cc2b7889af | 51 | # Indent pre-processor block |
maygup01 | 0:11cc2b7889af | 52 | # --indent-preproc-block |
maygup01 | 0:11cc2b7889af | 53 | |
maygup01 | 0:11cc2b7889af | 54 | # Delete empty lines |
maygup01 | 0:11cc2b7889af | 55 | # --delete-empty-lines |
maygup01 | 0:11cc2b7889af | 56 | |
maygup01 | 0:11cc2b7889af | 57 | # Attach the return type to a function definition or declaration. |
maygup01 | 0:11cc2b7889af | 58 | --attach-return-type # Definition |
maygup01 | 0:11cc2b7889af | 59 | --attach-return-type-decl # Declaration |