1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Introducing Artistic Style: new IDE autoformatter

This commit is contained in:
Federico Fissore
2013-10-14 17:31:35 +02:00
parent cb7b62f43e
commit 56bdebb8d7
7 changed files with 192 additions and 5 deletions

View File

@ -259,6 +259,11 @@
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/man/**/*"/>
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/man"/>
</delete>
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="macosx" usetimestamp="true" />
<unzip src="macosx/libastylej-2.03.zip" dest="macosx" overwrite="true"/>
<copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/Arduino.app/Contents/Resources/Java/lib/" />
<chmod perm="755" file="macosx/work/Arduino.app/Contents/Resources/Java/lib/libastylej.jnilib" />
</target>
<target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
@ -470,6 +475,11 @@
<copy todir="linux/work" file="linux/dist/arduino" />
<chmod perm="755" file="linux/work/arduino" />
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="linux" usetimestamp="true" />
<unzip src="linux/libastylej-2.03.zip" dest="linux" overwrite="true"/>
<copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" />
<chmod perm="755" file="linux/work/lib/libastylej.so" />
</target>
<target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
@ -485,6 +495,7 @@
<arg value="-xjf"/>
<arg value="../../avr_tools_linux32.tar.bz2"/>
</exec>
</target>
<target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
@ -659,6 +670,10 @@
<fileset file="windows/eeprom.h" />
</copy>
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" />
<unzip src="windows/libastylej-2.03.zip" dest="windows" overwrite="true"/>
<copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" />
<!-- Copy bossac.exe tool -->
<copy todir="windows/work/hardware/tools">
<fileset file="windows/bossac.exe" />

View File

@ -0,0 +1,28 @@
# 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
# 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