Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AStyle definition file and travis astyle check #6014

Closed
wants to merge 22 commits into from

Commits on Mar 14, 2018

  1. Add Astyle configuration file for mbed OS

    This follows what is in the codebase in most cases (K&R with few exceptions).
    This should follow also how online compiler formats the code.
    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    fe7569d View commit details
    Browse the repository at this point in the history
  2. Add astyleignore file

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    82e8aa0 View commit details
    Browse the repository at this point in the history
  3. Travis: add astyle

    Fetch 3.1 astyle from website (install from ubuntu contains old 2.05).
    Print version to verify and run on our codebase
    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    44bd7b0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ac9f57a View commit details
    Browse the repository at this point in the history
  5. AStyle: options update

    This should reflect these rules that we have defined since mbed 2:
    
    ```
    Indentation - 4 spaces. Please do not use tabs.
    Braces - K&R (see the exception 1 TBS below)
    1 TBS -use braces for statements if, else, while, for (exception from K&R) Reference: http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS
    One line per statement
    Preprocessor macro starts at the beginning of a new line, the code inside is indented accordingly the code above it
    Cases within switch are indented (exception from K&R)
    Space after statements if, while, for, switch, same applies to binary and ternary operators
    Each line has preferably at most 120 characters
    For pointers, '*' is adjacent to a data name (analogin_t *obj) or a function name (analog_t *get_analogin_object())
    Don't leave trailing spaces at the end of lines
    Empty lines should have no trailing spaces
    Unix line endings are default option for files
    Use capital letters for macros
    A file should have an empty line at the end
    ```
    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    8a341f1 View commit details
    Browse the repository at this point in the history
  6. platform: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    bc5f843 View commit details
    Browse the repository at this point in the history
  7. hal: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    453da17 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f99f9dc View commit details
    Browse the repository at this point in the history
  9. netsocket: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    15fe790 View commit details
    Browse the repository at this point in the history
  10. nanostack: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    b502faa View commit details
    Browse the repository at this point in the history
  11. lorawan: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    0dd6aba View commit details
    Browse the repository at this point in the history
  12. filesystem: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    0a4cd64 View commit details
    Browse the repository at this point in the history
  13. uvisor: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    b15554c View commit details
    Browse the repository at this point in the history
  14. events: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    774aa9c View commit details
    Browse the repository at this point in the history
  15. drivers: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    9f5058a View commit details
    Browse the repository at this point in the history
  16. TESTS: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    1743833 View commit details
    Browse the repository at this point in the history
  17. ble: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    5c945b3 View commit details
    Browse the repository at this point in the history
  18. rtos: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    6d8dd0c View commit details
    Browse the repository at this point in the history
  19. celullar: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    35d03a6 View commit details
    Browse the repository at this point in the history
  20. nvstore: astyle update

    0xc0170 committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    a1cb121 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2018

  1. astyle update to new files

    0xc0170 committed Mar 15, 2018
    Configuration menu
    Copy the full SHA
    ef9dbc5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    83b47ef View commit details
    Browse the repository at this point in the history