Add calamaresstyle script
This commit is contained in:
parent
e3741c4d26
commit
79bf4f3b5a
@ -43,6 +43,10 @@ MyClass::myMethod( QStringList list, const QString& name )
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can use the `hacking/calamaresstyle` script to run
|
||||||
|
[astyle](http://astyle.sf.net) on your code and have it formatted the right
|
||||||
|
way.
|
||||||
|
|
||||||
Naming
|
Naming
|
||||||
------
|
------
|
||||||
* Use CamelCase for everything.
|
* Use CamelCase for everything.
|
||||||
|
13
hacking/astylerc
Normal file
13
hacking/astylerc
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Do not create a backup file
|
||||||
|
suffix=none
|
||||||
|
|
||||||
|
indent=spaces=4
|
||||||
|
|
||||||
|
# Brackets
|
||||||
|
style=break
|
||||||
|
remove-brackets # Remove brackets on single-line `if` and `for` (requires astyle 2.04)
|
||||||
|
|
||||||
|
# Spaces
|
||||||
|
pad-paren-in
|
||||||
|
pad-header
|
||||||
|
align-pointer=type
|
6
hacking/calamaresstyle
Executable file
6
hacking/calamaresstyle
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Calls astyle with settings matching Calamares coding style
|
||||||
|
# Requires astyle >= 2.04
|
||||||
|
set -e
|
||||||
|
|
||||||
|
astyle --options=$(dirname $0)/astylerc "$@"
|
Loading…
Reference in New Issue
Block a user