Artistic Style Release Notes
Artistic Style 2.04 (November 2013)
- Add new programming language Objective‑C.
- Add new bracket style option "style=google" (-A14).
- Add new option "indent-preproc-cond" (xw) to indent preprocessor conditional statements (#118).
- Add new bracket modify options "attach-namespaces", "attach-classes", "attach-inlines", and "attach-extern-c".
- Add new option "indent-modifiers" (-xG) to indent class access modifiers one-half indent (#130).
- Add new option "remove-brackets" (-xj) to remove brackets from single line conditional statements.
- Add new option "remove-comment-prefix" (-xp) to remove the leading '*' from multi-line comments.
- Add new option "align-method-colon" (-xM) to align Objective‑C method colons.
- Add new option "pad-method-colon=#" (-xP#) to space pad Objective‑C method colons.
- Add new options "pad-method-prefix" (-xQ), and "unpad-method-prefix" (-xR) to pad the Objective‑C "-" and
"+" method prefix.
- Add new dll entry point AStyleMainUtf16 for processing C# UTF-16 strings.
- Add formatting of C++11 raw string literals (#222).
- Add "style=knf" as an alternative to "style=linux".
- Remove depreciated "bracket=" options.
- Improve recognition and formatting of pointers and references (#174 and other changes).
- Improve the recognition of block-opening brackets.
- Improve code using a static code analyzer (#195).
- Change "max-code-length" to include Objective‑C methods.
- Change "indent-elseifs" and "break-blocks" to look ahead only if in command-type brackets (speed improvement).
- Fix linux bracket styles to break the opening bracket in inline function definitions (#185).
- Fix indentation of switch block comments (#164).
- Fix enums to indent with tabs when requested (#92, #121).
- Fix formatting of rvalue reference without a name in a declaration (#219).
- Fix "pad-first-paren-out" to not pad if the following parens are empty (#232).
- Fix end-of-statement reset when comments follow closing bracket.
- Fix the ASBeautifier active and waiting stacks to delete the ASBeautifier objects before deleting the pointers.
- Fix ASBeautifier "init" to delete the tempStack vectors before deleting the tempStack.
- Fix Linux piping problem by changing "cin" input to build a stringstream before formatting.
- Fix to identify the correct bracket type when 'extern "C"' is part of the enum definition.
- Fix to clear 'extern "C"' variables when the block is closed.
- Fix unindented 'extern "C"' to not indent when in a #else preprocessor directive.
- Fix not always correctly formatting linux type brackets for enum blocks.
- Fix align-pointer in a range-based for statement (#217).
- Fix pointer-reference argument alignment to correctly position a following comment (#235).
- Fix to not attach a bracket to a line ending in a backslash '\' (#186, #214, #220).
- Fix to recognize templates using multiple lines (#85, #87, #136).
- Fix formatting of template continuation lines (#85, #87, #136).
- Fix to allow '^' as an array operator (#233).
- Fix an "enum" argument being mistaken for an enumeration (#211).
- Fix to recognize a non-instatement array after a "},{" sequence.
- Fix "pad-oper" to not pad before a following comma.
- Fix recognition of an operator when the calculation contains a bitwise "not" '~' (#166).
- Fix to allow a preprocessor statement within a preprocessor define (#238).
- Fix preprocessor comparison to check for whole words (#246).
- Fix "add-brackets" when a line contains more than one paren pairs (#181).
- Fix to allow Mac old CR line endings in the options file (#129).
- Refactor to aid debugging and improve design and decomposition:
- Move ALL preliminary indentation calculations to computePreliminaryIndentation() in ASBeautifier.
- Move calculation of 'force tab' indents to preLineWS() in ASBeautifier.
- Combine methods init() and init(ASSourceIterator*) in ASBeautifier.
- Extract method adjustParsedLineIndentation() in ASBeautifier.
- Extract method parseCurrentLine() in ASEnhancer.
- Remove astyle_main.cpp unused functions getFilesUnchanged, getOptionsFileRequired, and setOptionsFileRequired.
Artistic Style 2.03 (April 2013)
- Add new option "indent=force-tab-x=#" (-xT#) to allow a tab length that different from the indent length (3430662).
- Add new option, "pad-first-paren-out" (xd), to pad only the first paren in a series on the outside (3350356).
- Add new option "max-code-length=#" (-xC#) to limit the length of code on a line.
- Add new option "break-after-logical" (-xL) to modify a "max-code-length" line break for conditionals.
- Add new option "close-templates" (-xy) to close whitespace in the angle brackets ">" of template
definitions.
- Add formatting of C++ rvalue references (&&) using the existing "align-pointer" and "align-reference"
options.
- Add formatting of C++/CLI managed pointers (the "^" character) to the "align-pointer" option.
- Add translations for Dutch, Finnish, Italian, Japanese, Korean, Polish, Portuguese, Russian, Swedish, and Ukrainian.
- Remove byte-order-mark from ASLocalizer.cpp.
- Change the short option for delete-empty-lines from "xd" to "xe".
- Change the ASTYLE_LIB option to remove __declspec for a Visual C static library when ASTYLE_NO_VCX is also declared.
- Change to remove any space padding in a pointer to pointer (**).
- Fix "break-elseifs" to format one-line "if" and "else" statements the same as when the option is not used.
- Fix "break-elseifs" to break else-if statements when "keep-one-line-statements" also is requested.
- Fix "break-elseifs" to correctly format comments preceding the else-if.
- Fix C# not correctly identifying lambda expressions as a command-type bracket.
- Fix C# preprocessor statements adding extra empty lines when "break-blocks" is used.
- Fix C# padding "get" and "set" statements that are not headers when "break-blocks" is used.
- Fix C# to recognize the "#line" statement.
- Fix C++11 standard for range-based "for" loops (3458402, 3480095).
- Fix C++11 standard for "enum" with a base type (3458402).
- Fix C++11 standard for template closing angle brackets (no space required) (3495192).
- Fix C/C++ keyword 'extern "C"' in a preprocessor causing an extra indent (1514844, 2953388, 2963382, 3093842,
3467479).
- Fix breaking after a switch "default" statement when "break-elseifs" is used without "keep-one-line-statements"
(3559365).
- Fix in-statement arrays to indent correctly when they exceed the "max-instatement-indent".
- Fix quote continuation sometimes being processed as a preprocessor directive (3445475).
- Fix formatting of some conditional statements on a continuation-line.
- Fix Java formatting of generics with wildcards (3428140).
- Fix formatting of pointers and references to work with the new "max-code-length" option.
- Fix formatting of pointers and references after a template close.
- Fix formatting of empty attached brackets (3505002).
- Fix C comments beginning a line breaking if they follow a semi-colon (3502700).
- Fix "pad-header" not padding "return" and "throw" statements (3509134).
- Fix recognition problems with templates.
- Fix "struct" return type being mistaken for a struct.
- Fix "pad-oper" in java for-each loop.
- Fix recognition of a macro multi-line comment (3414970).
- Fix bracketTypeStack entries added by #if and #else if the # is separated from the word.
- Fix C++ breaking a line on an access modifier in a one-line block when "keep-one-line-blocks" is used.
- Fix memory leak when "ascii" option is used.
- Fix memory leak when a preprocessor statement is used without a closing #endif.
- Fix preprocessor directive to allow compiling with mingw-x64 compiler.
- Fix redirection on Windows so it does not hang when Linux line ends are used (3514712).
- Fix redirection on Linux to output the correct line ends (3514712).
- Fix non-portable return value on locale name (3452574).
- Fix assert errors caused by not checking the text length on the return from peekNextText().
- Fix spelling of "depreciated" in help message (3454735).
- Refactor to improve design and decomposition:
- Fix warning messages from Visual Studio static code analysis.
- Fix warning messages from cppcheck, except for constructor uninitialized variables (false positive).
- Remove astyle_main.h dependency from ASLocalizer.h
- Remove appendChar() from the inline functions.
- Extract methods for pointer or reference alignment in ASFormatter.
Artistic Style 2.02.1 (November 2011)
- Add to C# the recognition of pointers and address-of operators.
- Improve recognition of pointers and references (3,314,499, 3,298,204, and 2,990,608).
- Improve alignment of a reference to a pointer (*&).
- Fix crash with "align-pointer=type" when pointer to pointer (**) starts a new line (3,431,431).
- Fix breaking after a "case" statement when "break-elseifs" is used without "keep-one-line-statements" (3,421,577,
and 3,314,247).
- Fix "pad-oper" used with "keep-one-line-statements" not padding operators in a one-line "case" statement.
- Fix not recognizing a "pointer dereference" or "address of" that follows a comment (3,431,431).
- Fix "break-blocks" used with "delete-empty-lines" not correctly breaking blocks on the first run.
- Fix "pad-oper" not padding the alternate comparison operators "and" and "or" (3,342,373).
Artistic Style 2.02 (May 2011)
- Add new program module, ASLocalizer, containing language translations.
- Add new short option prefix "x" to allow for expansion of short options.
- Add new command line only option "ascii" (-I).
- Add new bracket style, "style=pico" (-A11).
- Add new bracket style, "style=lisp" (-A12).
- Add new option "align-reference=" (-W#) (3,136,744).
- Add new options ignore-exclude-errors (-i) and ignore-exclude-errors-x (-xi) (3,259,910).
- Add new option "style=break" for Allman style brackets.
- Add new option "style=attach" for Java style brackets.
- Add processing of UTF-16 files by converting to UTF-8 and back to UTF-16.
- Add Microsoft C++ extensions for try-finally and try-except statements (3,222,216).
- Add "override" and "sealed" modifiers (Visual C specific) to preCommandHeaders vector (3,167,978).
- Add "case" and "default" to the list of formatters in ASFormatter (3,276,212).
- Remove "indent-brackets" and "indent-blocks" from the valid options.
- Remove "volatile" from headers and remove comparisons in ASBeautifier.
- Change "delete-empty-lines" short option from "x" to "xd".
- Change "max-instatement-indent" maximum value from 80 to 120 (3,255,930).
- Change "brackets=horstman" to "brackets=run-in", used for both Horstmann and Pico styles.
- Change C enumerations to allow in-statement indents (3,280,454).
- Change functions setting the "indent-brackets" and "indent-blocks" variables from public to protected.
- Change to indent lines beginning with an assignment operator (3,292,880).
- Change to abort if UTF-32 files are detected.
- Change "Cannot set native locale" error message from cout to cerr (3,139,873).
- Fix Linux infinite loop when a directory name is entered instead of a file name.
- Fix trying to process directories as files when a wildcard is used without recursive (3,134,108).
- Fix processing a "const" variable as a "const" method when it follows a header (3,168,156).
- Fix indentation of a one-line block that follows a header.
- Fix breaking a preprocessor define that has code after a comment end (3,132,531).
- Fix "pad-oper" padding a dereference that follows a C-style cast (3,259,713).
- Fix "unpad-parens" not recognizing an xor (^) operator (3,285,639).
- Fix "break-blocks" procedure for "case" and "default" headers.
- Fix "add-brackets" adding brackets to the "while" of a "do-while" loop (3,267,880).
- Fix "add-brackets" adding brackets to an empty statement.
- Fix "pad-paren" used with "align-pointer=name" incorrectly adding an extra space.
- Fix not clearing a flag when a "?" conditional is included in an "if" statement (2,989,638).
- Fix incorrect indentation when "volatile" modifier is used (3,279,856).
- Fix indentation for Microsoft "#pragma region" and "#pragma endregion" preprocessor directives.
- Fix not printing a zero for formatted numbers.
- Fix indentation of a class opening bracket followed by a class modifier on the same line when indent-namespaces
and indent-classes are used.
- Refactor to aid debugging, improve speed, and improve the design and decomposition:
- Extract method processProcessor() from beautify() in ASBeautifier.
- Extract method computePreliminaryIndentation() from beautify() in ASBeautifier.
- Extract method parseCurrentLine() from beautify() in ASBeautifier.
- Remove unnecessary copies to outBuffer variable in ASBeautifier.
- Add preCommandHeaders vector to ASBeautifier and remove the "const" modifier comparisons.
- Change static vectors to member variables.
- Add isDigit() function to avoid the assert statements in Visual C.
Artistic Style 2.01 (November 2010)
- Add recognition of language characters supported by the native locale.
- Add formatting of numbers according to the native locale.
- Add checksum verification to source file output.
- Add formatting of MFC macros BEGIN_DISPATCH_MAP, BEGIN_EVENT_MAP, and BEGIN_PROPPAGEIDS.
- Add error message if --recursive is used without a wildcard in the file name.
- Add private (unusable) copy constructors for classes with dynamic allocation.
- Add error message if the "cin" stream cannot be processed because a pipe is used.
- Improve recognition of ARRAY_TYPE brackets.
- Improve formatting of multi-line comments when the number of leading spaces must be changed.
- Improve formatting of embedded SQL when the number of leading spaces must be changed.
- Improve recognition of C++ templates.
- Change --style=linux to always use a minimum conditional indent of one-half the indent length.
- Change --pad-oper to pad operators in block parens.
- Change to indent OpenMP pragmas with the code.
- Change to display all (instead of one) option errors before abort.
- Change the second argument of the fpError typedef from "char*" to "const char*".
- Change Linux Makefiles to allow external values for CFLAGS and LDFLAGS.
- Change all destructors to virtual.
- Fix crash when --break-blocks is used and there is no closing bracket.
- Fix deleting the previous line when a closing bracket follows a comment close.
- Fix not recognizing text in quotes when identifying struct access modifiers.
- Fix not popping the paren stack when a bracket precedes an end of line comment.
- Fix not breaking a closing bracket when empty parens are enclosed in a single line block.
- Fix indenting of C# anonymous statement closing bracket.
- Fix recognition of C# non in-statement arrays.
- Fix breaking single line blocks for C# abstract methods.
- Fix not always clearing isNonInStatementArray flag.
- Fix indenting "case" statements in a preprocessor definition when --indent-preprocessor is not requested.
- Fix not recognizing the "volatile" type qualifier as a keyword.
- Fix class initializers not being recognized as an in-statement indent.
- Fix indenting Java abstract methods when "new" starts the line and brackets are broken.
- Fix broken initializer lines (ending with comma) when there is more than one space after the type.
- Fix --brackets=attach inserting a bracket inside comments following a preprocessor statement.
- Fix --brackets=attach attaching an array bracket from a one line block to the previous line.
- Fix --brackets=horstmann not breaking a comment line when the comment ends the line with a bracket.
- Fix --pad-oper to recognize all * and & operators within a function call.
- Fix --unpad-paren to recognize * and & operators within a function call.
- Fix --pad-paren used with --delete-empty-lines causing a space to be added at end of line in some cases.
- Fix --pad-paren padding a closing paren followed by a block paren.
- Fix --add-brackets when a header is followed by a semi-colon.
- Fix --align-pointer to pad or unpad pointers followed by parens or comments.
- Fix --align-pointer to pad or unpad pointers following a scope resolution operator.
- Fix --align-pointer to pad or unpad pointers that end the line.
- Fix --align-pointer used with --pad-parens-out causing a space to be padded for each run.
- Fix --break-blocks used with --delete-empty-lines causing an assert error when end of file is reached.
- Fix --break-blocks used with --delete-empty-lines causing an assert error for some combinations of comment lines.
- Fix --break-blocks used with --delete-empty-lines causing a duplicate line in some cases.
- Fix --break-blocks used with --delete-empty-lines not always breaking opening blocks.
- Fix --break-blocks used with --delete-empty-lines not always deleting empty lines for closing blocks.
- Fix --break-blocks used with --fill-empty-lines not always correctly filling empty lines in a switch statement.
- Fix --unpad-paren used with --pad-paren-in not padding between opening parens when multiple parens are used.
- Fix --pad-oper incorrectly padding a template with a default parameter.
- Fix ASBeautifier findOperator() method to recognize a C# lambda (=>) operator.
- Fix ASFormatter nextLine() method to output an entire operator instead of individual characters.
- Fix incorrectly identifying "*" as pointers in block parens.
- Fix MinGW -Wshadow warnings.
- Fix VS2010 "string subscript out of range" asserts.
- Refactor:
- Remove template definition for parseOptions() by using a vector reference instead of iterators as function arguments.
- New ASOptions class to encapsulate global functions used by both the console and library builds.
- Replace argc and argv in processOptions() with a vector to simplify test cases.
- Replace IS_OPTION and IS_OPTIONS macros with ASOptions methods.
- Replace GET_PARAM and GET_PARAMS macros with ASOptions methods.
- Extract ASFormatter methods checkIfTemplateOpener() and isClosingHeader().
Previous releases are available in the Release Notes Archives.