Commit Graph

49 Commits

Author SHA1 Message Date
Peter Vingelmann
fab103cb47 Properly handle initializer blocks with double block openers. For example:
std::map<uint32_t, uint32_t> generation_map(
    { {0, 100}, {1, 100}, {2, 100}, {3, 10}, {4, 10} });
2016-09-29 00:20:55 +02:00
Peter Vingelmann
d39345f7cd Add ample code examples in correct_style.cpp 2016-09-28 03:26:12 +02:00
Peter Vingelmann
90757717a5 Fix newline comparison on windows 2016-09-27 21:04:01 +02:00
Peter Vingelmann
2d9dba76cb Use universal newlines for comparison 2016-09-27 20:46:56 +02:00
Peter Vingelmann
fbe87c1385 Implement basic formatting check 2016-09-27 20:37:42 +02:00
Peter Vingelmann
a0df5545fa Update README.rst 2016-09-26 16:36:15 +02:00
Peter Vingelmann
7ec301d17f Add missing initializer: printChanges = false 2016-09-24 03:53:03 +02:00
Peter Vingelmann
1136d961a0 Update README.rst 2016-09-24 03:15:59 +02:00
Peter Vingelmann
5b3ab401d2 Update .astylerc 2016-09-23 23:33:29 +02:00
Peter Vingelmann
543fa70c92 Merge pull request #4 from steinwurf/fix-formatting
Fix formatting
2016-09-23 23:17:35 +02:00
Peter Vingelmann
29a4b8d4a6 Basic handling for initializer blocks in statements 2016-09-23 23:15:50 +02:00
Peter Vingelmann
45885f5fb1 Clear isInStatement after template instantiation 2016-09-23 02:42:37 +02:00
Peter Vingelmann
8853a85181 Fix block opener recognition for "auto x -> y<arg>" 2016-09-22 23:58:15 +02:00
Peter Vingelmann
0933c3c033 Suppress multiple indents in template instantiation if line ends with < 2016-09-22 22:55:55 +02:00
Peter Vingelmann
27067bcbb5 Fixed 4-space alignment if the line ends with ( 2016-09-22 22:50:24 +02:00
Peter Vingelmann
81b77fc202 Do not perform right alignment for assignment and return if line ends with ( 2016-09-22 00:29:29 +02:00
Peter Vingelmann
063a8b06b6 Remove unneeded firstLineChar member in ASBeautifier 2016-09-21 21:09:58 +02:00
Peter Vingelmann
a3ccecfa4a Remove special handling for NonInStatementArray 2016-09-21 19:57:55 +02:00
Peter Vingelmann
f4ad8a3585 Remove special handling for "new" after the = sign 2016-09-19 23:22:05 +02:00
Peter Vingelmann
c8020d8c1c Use symmetric layout for the closing bracket in template argument lists 2016-09-19 23:03:41 +02:00
Peter Vingelmann
7137b582a7 Fix line number in printChangedLine 2016-09-19 20:05:24 +02:00
Peter Vingelmann
008cc94a1e Adjust indentation when the line starts or ends with << 2016-09-19 20:04:20 +02:00
Peter Vingelmann
575c2d2e1f Add indentation for end-of-line "->"
template<typename U>
static auto test(int) ->
    decltype(std::declval<U>().function(), yes());
2016-09-19 19:23:52 +02:00
Peter Vingelmann
77516152ef Merge pull request #3 from steinwurf/add-to-buildbot
Add .astylerc, waf and related scripts
2016-09-16 23:47:16 +02:00
Peter Vingelmann
1e2a537091 Update README.rst 2016-09-16 23:45:35 +02:00
Peter Vingelmann
0cd83dc1f3 Add .astylerc, waf and related scripts 2016-09-16 23:07:49 +02:00
Peter Vingelmann
4e8f6c8745 Merge pull request #2 from steinwurf/fix-formatting
Fix formatting
2016-09-16 22:42:05 +02:00
Peter Vingelmann
5c9aefd388 registerInStatementIndent: Align with the next non-whitespace character 2016-09-16 20:58:01 +02:00
Peter Vingelmann
c9a243fd41 Print full filenames with --print-changes (so the IDE can jump to the line) 2016-09-16 19:53:37 +02:00
Peter Vingelmann
eb505347cb Keep spaceIndentCount for the current line to handle lambda expressions in multiline statements:
std::generate(data.begin(), data.end(),
              [&]() { return randval(engine); });
2016-09-16 19:44:47 +02:00
Peter Vingelmann
39a611a2e8 Fix invalid detection of >> in class headers 2016-09-15 21:31:44 +02:00
Peter Vingelmann
5d24aeba9a Fix issue when closing potential template instantiation 2016-09-15 21:12:46 +02:00
Peter Vingelmann
1548f1d070 Do not recognize the "template" disambiguator for dependent names as an actual template header 2016-09-15 20:39:58 +02:00
Peter Vingelmann
c43ddc6964 Revert template disambiguator fix 2016-09-15 19:33:20 +02:00
Peter Vingelmann
03668a9b21 Fix line numbers with --print-changes 2016-09-15 17:34:14 +02:00
Peter Vingelmann
e4ce7b36b0 Do not recognize the "template" disambiguator for dependent names as an actual template header 2016-09-15 03:06:06 +02:00
Peter Vingelmann
b1259192ff Do not try to align multiple assignments if line ends with comma 2016-09-15 02:07:08 +02:00
Peter Vingelmann
53696ac249 Do not add extra space in variadic template argument: Args&&... args 2016-09-14 21:55:53 +02:00
Peter Vingelmann
d11eb1a63d Do not terminate if no matching file was found for a wildcard 2016-09-14 20:43:41 +02:00
Peter Vingelmann
8458be2f70 Add --print-changes to print all changed lines (useful in dry-run mode) + Return the number of formatted files in this mode 2016-09-14 20:19:13 +02:00
Peter Vingelmann
91bff90bf2 Attach colon to constructor header and break line before member initializers 2016-09-14 03:46:07 +02:00
Peter Vingelmann
1bad21fe6b Provide basic indentation for template instantiation argument lists 2016-09-13 02:19:29 +02:00
Peter Vingelmann
f3cd3f7c51 Allow max-instatement-indent to be less than 40 2016-09-10 04:55:59 +02:00
Peter Vingelmann
52a1be339a Fix false detection of rvalue references in a class headers 2016-09-10 04:54:08 +02:00
Peter Vingelmann
25c4fdac73 Add firstLineChar member in ASBeautifier + Use symmetrical layout for closing brace in template argument list:
template
<
    class Argument
>
2016-09-10 04:29:09 +02:00
Peter Vingelmann
a28cde5425 Do not dedent comments in multiline class headers + Do not add InStatementIndent for commas in class headers 2016-09-10 03:25:39 +02:00
Peter Vingelmann
7b791f1827 Merge pull request #1 from steinwurf/upgrade-to-svn-r511
Upgrade to SVN r511
2016-09-09 01:58:11 +02:00
Peter Vingelmann
a80ed8000a Upgrade to SVN r511 2016-09-09 00:17:30 +02:00
Peter Vingelmann
c8638db9b4 Initial commit with astyle version 2.05.1 2016-09-08 23:34:23 +02:00