aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/whitespace.pl
AgeCommit message (Collapse)Author
2015-10-19Add perl function indent_ctor_init_lists to whitespace.plGravatar K. \"pestophagous\" Heller
whitespace.pl can now do a better job (although surely still not 100% perfect job) of formatting constructor member initialization lists according to the rules described in the current CodingStyle file. Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05Fix perl warning in whitespce.plGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-22Small tweaks to our whitespace handlingGravatar Dirk Hohndel
This is still not (and likely will never be) intended to just be blindly run and mechanically applied to all files. It tries to implement our rules but it is not perfect and more importantly, we have parts of the code where we intentionally break our rules for various reasons of readability in that particular situation. But running this against the sources files you touch often will point out things that are wrong and should be fixed. This fixes the indentation for continuation lines and the handling of the for each style loops (clang 3.5 should have this built in - I'll play with the current development version of this later). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-06Make it executable and remove magic whitespace on shebang line.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-05Another small tweak to whitespace toolGravatar Dirk Hohndel
clang-format doesn't appear to reindent multi line #define statements correctly - so this hopefully will clean those up. The included whitespace corrections to the code should stay in place when using the updated tool. This includes cleaning up some multi-line comments that were messed up the last time around as well as a few other minor changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-03Whitespace cleanupGravatar Dirk Hohndel
Minor change to the perl postprocessing script and resulting changes to the affected source files. This deals with two issues: - "foreach"-like structures were not always treated correctly - some longer calculations that ended on "+ constant" were reformatted in a rather unatractive manner In one source file (divelist.c) I ended up adding braces to the sources... trying to cascade the indentation further down without having the block there seemed a lot more trouble than it's worth. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16Continue to improve whitespace cleanup helperGravatar Dirk Hohndel
The more I try the cleanup helper, the more corner cases I find... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-13Fine tuning of the whitespace / coding style post processingGravatar Dirk Hohndel
The struct / class regex was way too relaxed. Having the parent class on the same line usually looks better. clang-format appears to do something odd with continuation strings - even with UseTab: Always it indents those with four spaces. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-12Add a simplistic tool to clean up whitespaceGravatar Dirk Hohndel
This hasn't been tested enought, but it seems to get really close. It assumes that clang-format is in your patch. Run perl scripys/whitespace.pl FILENAME and you'll get a diff of what it things is wrong with that file. If you like what you see, simply pipe the output into patch -p0 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>