[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coreutils] considering uncrustify for automatic indentation: prepare
From: |
Jim Meyering |
Subject: |
[coreutils] considering uncrustify for automatic indentation: prepare |
Date: |
Mon, 31 May 2010 11:12:14 +0200 |
[PATCH 1/4] stat: use gnulib's alignof module
[PATCH 2/4] maint: correct indentation of case_GETOPT_* macro uses
[PATCH 3/4] maint: replace each "for (;;)" with "while (true)"
[PATCH 4/4] maint: make spacing around "=" consistent, even in IF_LINT
I've been considering using uncrustify to automatically
format coreutils, and have begun addressing some of the
issues that exposed. For example, it doesn't handle the
syntactically unrecognizable case_GETOPT_* macros, so
I have a manual post-processing step that "outdents"
them to make them align with other "case" statements.
Some were over-indented.
uncrustify mis-handled the sole alignof #define, so I've
removed that in favor of using the gnulib module.
Rather than try to make an exception to an exception to
the spacing-in-degenerate-for-statement rule, I've simply
replaced all of them with "while (true)" or "while (1)".
Finally, I've made changes like this:
- struct stat *stats IF_LINT (= 0);
+ struct stat *stats IF_LINT ( = 0);
so that uncrustify doesn't need to know that this "=" is
somehow different from all others.
- [coreutils] considering uncrustify for automatic indentation: prepare,
Jim Meyering <=
- [coreutils] [PATCH 1/4] stat: use gnulib's alignof module, Jim Meyering, 2010/05/31
- [coreutils] [PATCH 2/4] maint: correct indentation of case_GETOPT_* macro uses, Jim Meyering, 2010/05/31
- [coreutils] [PATCH 4/4] maint: make spacing around "=" consistent, even in IF_LINT, Jim Meyering, 2010/05/31
- [coreutils] [PATCH 3/4] maint: replace each "for (; ; )" with "while (true)", Jim Meyering, 2010/05/31
- Re: [coreutils] considering uncrustify for automatic indentation: prepare, Pádraig Brady, 2010/05/31