Skip to content

Commit

Permalink
Update arduino-ci-script to version 1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MCUdude committed Oct 4, 2020
1 parent 45c6dc5 commit 4683881
Show file tree
Hide file tree
Showing 11 changed files with 1,862 additions and 337 deletions.
24 changes: 0 additions & 24 deletions avr/travis-ci/arduino-ci-script/CONTRIBUTING.md

This file was deleted.

1 change: 0 additions & 1 deletion avr/travis-ci/arduino-ci-script/ISSUE_TEMPLATE.md

This file was deleted.

2 changes: 1 addition & 1 deletion avr/travis-ci/arduino-ci-script/LICENSE
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017
Copyright (c) 2020 per1234, Vitalii Tereshchuk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion avr/travis-ci/arduino-ci-script/PULL_REQUEST_TEMPLATE.md

This file was deleted.

203 changes: 128 additions & 75 deletions avr/travis-ci/arduino-ci-script/README.md
100644 → 100755

Large diffs are not rendered by default.

1,759 changes: 1,524 additions & 235 deletions avr/travis-ci/arduino-ci-script/arduino-ci-script.sh
100644 → 100755

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions avr/travis-ci/arduino-ci-script/etc/astyle-configurations/1.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# source: https://raw.githubusercontent.com/arduino/Arduino/1.8.9/build/shared/lib/formatter.conf

# This configuration file contains a selection of the available options provided by the formatting tool "Artistic Style"
# http://astyle.sourceforge.net/astyle.html
#
# If you wish to change them, don't edit this file.
# Instead, copy it in the same folder of file "preferences.txt" and modify the copy. This way, you won't lose your custom formatter settings when upgrading the IDE
# If you don't know where file preferences.txt is stored, open the IDE, File -> Preferences and you'll find a link

mode=c

# 2 spaces indentation
indent=spaces=2

# also indent macros
indent-preprocessor

# indent classes, switches (and cases), comments starting at column 1
indent-classes
indent-switches
indent-cases
indent-col1-comments

# put a space around operators
pad-oper

# put a space after if/for/while
pad-header

# if you like one-liners, keep them
keep-one-line-statements

remove-comment-prefix
46 changes: 46 additions & 0 deletions avr/travis-ci/arduino-ci-script/etc/astyle-configurations/2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# source: https://raw.githubusercontent.com/arduino/Arduino/1.8.9/build/shared/examples_formatter.conf

# This configuration file contains a selection of the available options provided by the formatting tool "Artistic Style"
# http://astyle.sourceforge.net/astyle.html
#
# If you wish to change them, don't edit this file.
# Instead, copy it in the same folder of file "preferences.txt" and modify the copy. This way, you won't lose your custom formatter settings when upgrading the IDE
# If you don't know where file preferences.txt is stored, open the IDE, File -> Preferences and you'll find a link

mode=c

# 2 spaces indentation
indent=spaces=2

# also indent macros
indent-preprocessor

# indent classes, switches (and cases), comments starting at column 1
indent-classes
indent-switches
indent-cases
indent-col1-comments

# put a space around operators
pad-oper

# put a space after if/for/while
pad-header

# if you like one-liners, keep them
keep-one-line-statements

style=java
attach-namespaces
attach-classes
attach-inlines
attach-extern-c
indent-modifiers
indent-namespaces
indent-labels
indent-preproc-block
indent-preproc-define
indent-preproc-cond
unpad-paren
add-brackets
remove-comment-prefix
125 changes: 125 additions & 0 deletions avr/travis-ci/arduino-ci-script/etc/astyle-configurations/3.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# source: https://github.com/arduino/ArduinoCore-avr/issues/71#issuecomment-466763471 2019-06-09

# formatter.conf, examples_formatter.conf
mode=c


# examples_formatter.conf
# http://astyle.sourceforge.net/astyle.html#_style=java
# Considering changing this to the synonym "style=attach", which seems more descriptive
style=java


# examples_formatter.conf
attach-namespaces

# examples_formatter.conf
attach-classes

# examples_formatter.conf
attach-inlines

# examples_formatter.conf
attach-extern-c


# formatter.conf, examples_formatter.conf
indent=spaces=2

# formatter.conf, examples_formatter.conf
indent-classes

# formatter.conf, examples_formatter.conf
indent-switches

# formatter.conf, examples_formatter.conf
indent-cases

# formatter.conf, examples_formatter.conf
indent-col1-comments

# examples_formatter.conf
indent-modifiers

# examples_formatter.conf
indent-namespaces

# examples_formatter.conf
indent-labels

# examples_formatter.conf
indent-preproc-define


# formatter.conf, examples_formatter.conf
pad-header

# formatter.conf, examples_formatter.conf
pad-oper

# examples_formatter.conf
unpad-paren


# formatter.conf, examples_formatter.conf
remove-comment-prefix

# formatter.conf, examples_formatter.conf
# http://astyle.sourceforge.net/astyle.html#_keep-one-line-statements
# "Don't break complex statements and multiple statements residing on a single line."
# I don't like one line complex statements, but I guess since it's in formatter.conf it must stay.
keep-one-line-statements



# Options from examples_formatter.conf that I think should be removed:

# http://astyle.sourceforge.net/astyle.html#_indent-preproc-block
# "Indent preprocessor blocks at brace level zero and immediately within a namespace. There are restrictions on what will be indented. Blocks within methods, classes, arrays, etc., will not be indented. Blocks containing braces or multi-line define statements will not be indented. Without this option the preprocessor block is not indented."
# This does indent for #ifdef, but not for #ifndef, so it's quite inconsistent
# Indentation of preprocessor directives as done by this option is not very common in Arduino AVR Boards core, and where it is used, it's typically done inconsistently throughout the file
indent-preproc-block

# http://astyle.sourceforge.net/astyle.html#_indent-preproc-cond
# "Indent preprocessor conditional statements to the same level as the source code."
# Indentation of preprocessor directives as done by this option is very rare in Arduino AVR Boards core
indent-preproc-cond



# Options I have not implemented from formatter.conf or examples_formatter.conf:

# examples_formatter.conf
# Not a valid option in the latest version of AStyle. I think the correct option name is "add-braces", which I do use in my configuration
# add-brackets

# formatter.conf, examples_formatter.conf
# Not a valid option in the latest version of AStyle.
# indent-preprocessor



# Options I have added:

# http://astyle.sourceforge.net/astyle.html#_add-braces
# "I believe this is the correct option name to use instead the "add-brackets" option used in examples_formatter.conf. "add-brackets" is not a valid option in the latest version of AStyle"
add-braces

# http://astyle.sourceforge.net/astyle.html#_convert-tabs
# "Converts tabs into spaces in the non-indentation part of the line."
# AStyle is already configured to use spaces for indentation by indent=spaces=2. The Arduino IDE uses spaces instead of tabs by default.
convert-tabs

# http://astyle.sourceforge.net/astyle.html#_attach-return-type
# "Attach the return type to the function name in function definitions."
attach-return-type

# http://astyle.sourceforge.net/astyle.html#_attach-return-type
# "Attach the return type to the function name in function declarations."
attach-return-type-decl

# http://astyle.sourceforge.net/astyle.html#_align-pointer
# "Attach a pointer or reference operator (*, &, or ^) to either the variable type (left) or variable name (right), or place it between the type and name (middle)."
# In Arduino AVR Boards core, name alignment of pointers is somewhat more common, though all possible styles are used
# I don't care which style is chosen (type, middle, name), but I do think one should be chosen and used.
align-pointer=name
1 change: 1 addition & 0 deletions avr/travis-ci/arduino-ci-script/etc/autoformat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shfmt -i 2 -w ../arduino-ci-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ba
propert
te
exampels

0 comments on commit 4683881

Please sign in to comment.