<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Artistic Style - Release Notes</title> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" /> <link href="styles.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>Artistic Style Release Notes</h1> <p> </p> <h3>Artistic Style 3.1 (January 2018)</h3> <ul> <li>Add new options "project", "project=####", and "project=none" (#11).</li> <li>Add new options, "break-return-type" and "break-return-type-decl" (358, 286, 205, 16). </li> <li>Add new options, "attach-return-type" and "attach-return-type-decl" (358, 286, 205, 16). </li> <li>Add new option "style=ratliff", as an alternate name for banner style.</li> <li>Add new environment variable ARTISTIC_STYLE_PROJECT_OPTIONS (#11).</li> <li>Add multiple extensions to the command line file paths option.</li> <li>Improve recognition of unary + and - when using pad-oper.</li> <li>Change the Windows default options file location from USERPROFILE to APPDATA.</li> <li>Change options file input to accept UTF-16, or UTF-8 with a BOM (or signature).</li> <li>Change "unsigned short" data type to c++11 "char16_t".</li> <li>Change translations for new project options file.</li> <li>Fix utf8LengthFromUtf16() calculation being less than the actual length.</li> <li>Fix multiply followed by a dereference for "align-pointer=type".</li> <li>Fix recognition of a uniform class initializer in a base class initialization (#441).</li> <li>Fix indentation of "volatile" keyword not used in a method definition (#450).</li> <li>Fix indentation of "final" keyword not used in a method definition (#450).</li> <li>Fix indentation of compound literals in an argument list (#456).</li> <li>Fix indentation of trailing return type method following a constructor (#463).</li> <li>Fix space padding of closing brace before a dot (#468).</li> <li>Fix Objective-C to allow for "Extern C" statements in the source files (#443, 444, 446).</li> <li>Fix Objective-C to allow for method definitions without a specified return type (#447).</li> <li>Fix Objective-C to allow for method definitions with multiple param types.</li> <li>Fix Objective-C to replace tabbed padding with a space.</li> <li>Fix Objective-C formatting of line-end comments with "unpad-return-type".</li> <li>Fix Objective-C "align-method-colon" to ignore ternary (?) operators.</li> <li>Fix C# base class constructor indentation (#459).</li> <li>Fix C# indentation of method declaration containing a colon (#465)</li> <li>Fix C/C++ to allow "interface" as a non-keyword (#445).</li> <li>Fix Java to allow "default" as a non-switch keyword.</li> <li>Fix line ends initialization if no line end has been read.</li> <li>Fix Java build from including ASLocalizer in the shared library.</li> <li>Fix to check for AStyleWx line tags after C style comments.</li> <li>Fix boundary conditions and other errors discovered by fuzzing.</li> <li>Refactoring: <ul> <li>Extract method isNumericVariable() in ASFormatter class.</li> <li>Extract method isTopLevel() in ASBeautifier class.</li> <li>Extract method fileExists() in Console class.</li> <li>Rename ASEncoding variable from "utf8_16" to "encode".</li> <li>Rename ASBeautifier vector from squareBracketDepthStack to parenDepthStack.</li> <li>Combine style options in ASOptions class to avoid compiler limits.</li> </ul> </li> </ul> <h3>Artistic Style 3.0.1 (May 2017)</h3> <ul> <li>Fix crash caused by certain class initializer formats (#435).</li> <li>Fix "final" identifier not being recognized as a pre-command header (#433).</li> <li>Fix recognition of certain rvalue reference variables.</li> </ul> <h3>Artistic Style 3.0 (April 2017)</h3> <ul> <li>Add new option "indent-after-parens" (#396, 152, 108, 79).</li> <li>Add new option "attach-closing-while" (#177).</li> <li>Add "style=run-in" as an alternative for "style=horstmann".</li> <li>Add "break-closing-braces" to "style=stroustrup" (#267).</li> <li>Add formatting for C++11 trailing return type methods.</li> <li>Add new class ASPeekStream using RAII to allow early method returns.</li> <li>Change affected variable names to new AStyle terminology.</li> <li>Change some vector push_back() statements to emplace_back().</li> <li>Fix memory leak when using "indent-preproc-define".</li> <li>Fix sometimes splitting an r-value reference when "pad-oper" is used.</li> <li>Fix in-statement-indent brace check not always checking a brace (#421).</li> <li>Fix formatting of C# get/set and add/remove when braces are attached (#430).</li> <li>Fix formatting of C# generic constraints (#430).</li> <li>Fix padding of C# null conditional operator.</li> <li>Fix attach-inlines to not attach a brace followed by a run-in comment.</li> <li>Fix not always breaking lines after "add-braces" (#341).</li> <li>Fix unpadding the "in" in a foreach statement (#386).</li> <li>Fix boundary conditions discovered by american fuzzy lop fuzzer (#370).</li> <li>Refactoring: <ul> <li>Replace NULL with C++11 nullptr.</li> <li>Rename Utf8_16 class to ASEncoding.</li> <li>Move ASConsole constructor and destructor from inline to non-inline.</li> <li>Move console error stream (cerr) from global to ASConsole class.</li> <li>Move ASConsole pointer in ASOptions from global to a class member.</li> <li>Move findHeader and findOperator methods from ASBeautifier to ASBase.</li> <li>Minor changes from PVS-Studio analyzer.</li> <li>Minor changes from clang-tidy.</li> </ul> </li> </ul> <h3>Artistic Style 2.06 (December 2016)</h3> <ul> <li>Add new bracket style option "style=mozilla".</li> <li>Add new option "break-one-line-headers" (#33, 64, 367).</li> <li>Add new option "indent-continuation".</li> <li>Add new option "pad-comma" (#100).</li> <li>Add removing spaces before a comma (#100).</li> <li>Add new Objective‑C options "pad-return-type" (-xq) and "unpad-return-type" (-xr).</li> <li>Add new Objective‑C options "pad-param-type" (-xS) and "unpad-param-type" (-xs).</li> <li>Add formatting of C++14 single-quote digit separators (#337).</li> <li>Add indentation for CORBA IDL module statement (#414).</li> <li>Add translations for Bulgarian, Estonian, Greek, Hungarian, Norwegian, and Romanian.</li> <li>Remove lineend option from formatCinToCout function.</li> <li>Improve align-method-colon and apply to Objective‑C method calls.</li> <li>Improve recognition of header guards in preprocessor statements.</li> <li>Improve recognition of C++11 uniform initializer brackets (#381, 411, 415).</li> <li>Improve the processing of quoted strings and verbatim strings.</li> <li>Change align-method-colon short first line to align on the longest line instead of the first line.</li> <li>Change to not break empty one line brackets to support new "break-one-line-headers".</li> <li>Change add-brackets to not add to one line blocks to support new "break-one-line-headers".</li> <li>Change add-brackets to not add to one line statements in support new "break-one-line-headers".</li> <li>Fix not recognizing an escaped space character within a quote (#403).</li> <li>Fix not recognizing "else" brackets as COMMAND_TYPE (#400).</li> <li>Fix attaching "if" statements to a #else preprocessor directive (#356).</li> <li>Fix not clearing global variables for a new file (#364).</li> <li>Fix not recognizing an rvalue reference in a template (#404).</li> <li>Fix breaking a line when processing the first line of a file (#400).</li> <li>Fix breaking a line in an exponential (#392).</li> <li>Fix indentation of an "enum" without following brackets (#401, 384).</li> <li>Fix indentation of arguments using preceding commas (#355).</li> <li>Fix indentation of Pico style one line blocks.</li> <li>Fix not padding header for "new" or "delete" followed by parens.</li> <li>Fix template variable not being cleared at end of a statement (#380).</li> <li>Fix "close-templates" to only close ending angle brackets (#375).</li> <li>Fix pad-oper to not pad a + or - following an open bracket (#378).</li> <li>Fix C# to recognize "using" as a header.</li> <li>Fix C# to always recognize "forever" as a header.</li> <li>Fix Pico style not always computing the indentation for one line blocks.</li> <li>Fix indentation of Objective-C @interface statement (#333).</li> <li>Fix assert error when Objective-C "@" is followed by whitespace.</li> <li>Fix end of line comments for "pad-method-prefix" and "unpad-method-prefix".</li> <li>Fix end of line comments for "pad-method-colon".</li> <li>Refactoring: <ul> <li>Consolidate scattered ASFormatter conditional statements into a padParenObjC method.</li> <li>Remove BracketMode STROUSTRUP_MODE and change it to LINUX_MODE.</li> <li>Remove ASBase methods from being inlined as class definitions.</li> <li>Replace C char arrays in astyle_main.cpp with C++ strings.</li> <li>Return language translation as a mutable variable.</li> <li>Portability changes for additional compiler support (#352).</li> <li>Minor changes based on results of the Clang-Tidy. </li> </ul> </li> </ul> <h3>Artistic Style 2.05.1 (December 2014)</h3> <ul> <li>Fix incorrectly reporting files containing disabled formatting as being formatted.</li> <li>Fix incorrect handling of quoted arguments in the options file (#321).</li> <li>Fix error in identifying an enum return type as an enumeration (#322, 323).</li> <li>Fix error in identifying an enum argument as an enumeration (#327).</li> <li>Fix recognition of Qt keywords when used as variables in C++ (#329).</li> <li>Fix recognition of a pointer in a C++ cast (#316).</li> <li>Fix removing trailing whitespace after a changed pointer or reference cast.</li> </ul> <h3>Artistic Style 2.05 (November 2014)</h3> <ul> <li>Add new bracket style option "style=vtk" (#155).</li> <li>Add new option "indent-preproc-block" to indent blocks of preprocessor directives (#21, #114, #229, #242, #294).</li> <li>Add new option, "dry-run", to run AStyle without updating the files (#184, #285).</li> <li>Add new options, "html" (-!") and "html=###", to display the HTML help documentation in the default browser. </li> <li>Add tags "*INDENT-OFF*" and "*INDENT_ON*" to disable formatting of source code blocks (#2, #47, #55, #78, #110, #176).</li> <li>Add tag *NOPAD* to disable selected formatting on a single line.</li> <li>Add '__attribute__ ((visibility ("default")))' to Linux exported functions.</li> <li>Remove option "style=ansi" and make it depreciated (#146).</li> <li>Remove fix for broken 'case' statements from release 2.02.1, Nov 21, 2011.</li> <li>Improve Korean translation (#256).</li> <li>Change shared libraries to include the version number as part of the file name (#264)</li> <li>Change "help" display to stdout to allow piping and redirection (#63).</li> <li>Change "version" display to stdout. </li> <li>Change headers to include foreach, forever, Q_FOREACH, and Q_FOREVER (#98, #154).</li> <li>Change compiler definition ASTYLE_NO_VCX (no Visual Studio exports) to ASTYLE_NO_EXPORTS.</li> <li>Change shared library error handler argument from "char*" to "const char*".</li> <li>Fix not recognizing noexcept, interrupt, and autoreleasepool as pre-command headers (#225, #259).</li> <li>Fix formatting of C++11 uniform initializer brackets (#253, #257, #260, #284).</li> <li>Fix to not automatically space pad C++11 uniform initializer brackets (#275).</li> <li>Fix formatting of enums with leading commas (#159, #179, #270).</li> <li>Fix formatting of logical && operator in class initializers (#290).</li> <li>Fix flagging a 'const' variable as a 'const' method (#275).</li> <li>Fix piping and redirection adding an extra character to the output (#245, #252, #305). </li> <li>Fix "indent-modifiers" to attach class access modifiers to Horstmann style brackets. </li> <li>Fix ASFormatter to correctly recognize the end of a C++ raw string literal (#261).</li> <li>Fix to recognize C++11 "enum class" as an enum (#303).</li> <li>Fix indent of C++11 "noexecpt" statements within a class (#260, #304).</li> <li>Fix not resetting templateDepth when a template was not found (#295).</li> <li>Fix formatting of multiplication in a block paren (#144).</li> <li>Fix whitespace padding when formatting an rvalue references (#297).</li> <li>Fix to recognize an rvalue reference without a name (#265).</li> <li>Fix to not identify an operator overload method as a calculation (#296).</li> <li>Fix concatenating multiplication with a pointer dereference (#291).</li> <li>Fix recognition of a pointer dereference following a question mark (#213).</li> <li>Fix extra space after a trailing reference type (#300).</li> <li>Fix _asm blocks not being identified as a block opener and the variable not cleared on exit (#163).</li> <li>Fix indentation of line comments before a "class" opening bracket.</li> <li>Fix indentation of line comments before a "namespace" opening bracket.</li> <li>Fix isBracketType() method to correctly process a NULL_TYPE.</li> <li>Fix unpad-paren to recognize additional variables (#43, #132, #143). </li> <li>Fix indentation of C# "let" statements.</li> <li>Fix a few omissions with "fill-empty-lines".</li> <li>Fix file read to read 64K blocks of data.</li> <li>Refactor to un-obfuscate (clarify) the code, and improve design and decomposition: <ul> <li>Extract class Utf8_16 from ASConsole. </li> <li>Replace Linux dependency on iconv with a Utf8_16 class for ASLibrary.</li> <li>Move global "using" statements to the astyle namespace in astyle.h and ASLocalizer.h. </li> <li>Move shared library declarations from astyle.h to astyle_main.h.</li> <li>Move indentable macros from ASEnhancer to ASResource and create static pairs.</li> <li>Simplify ASBeautifier procedure to identify the colon (:) type.</li> <li>Major refactoring in ASBeautifier to create separate variables for an enum, a class statement and a class initializer.<br /> This was needed to fix the processing of C++11 uniform initializers in a class initializer. </li> <li>Minor changes to ASFormatter and ASBeautifier based on results of the Clang analyzer. </li> <li>Change several methods in astyle_main to "const".</li> </ul> </li> </ul> <h3>Artistic Style 2.04 (November 2013)</h3> <ul> <li>Add new programming language Objective‑C.</li> <li>Add new bracket style option "style=google" (-A14). </li> <li>Add new option "indent-preproc-cond" (xw) to indent preprocessor conditional statements (#118). </li> <li>Add new bracket modify options "attach-namespaces", "attach-classes", "attach-inlines", and "attach-extern-c". </li> <li>Add new option "indent-modifiers" (-xG) to indent class access modifiers one-half indent (#130). </li> <li>Add new option "remove-brackets" (-xj) to remove brackets from single line conditional statements.</li> <li>Add new option "remove-comment-prefix" (-xp) to remove the leading '*' from multi-line comments. </li> <li>Add new option "align-method-colon" (-xM) to align Objective‑C method colons. </li> <li>Add new option "pad-method-colon=#" (-xP#) to space pad Objective‑C method colons. </li> <li>Add new options "pad-method-prefix" (-xQ), and "unpad-method-prefix" (-xR) to pad the Objective‑C "-" and "+" method prefix. </li> <li>Add new dll entry point AStyleMainUtf16 for processing C# UTF-16 strings. </li> <li>Add formatting of C++11 raw string literals (#222). </li> <li>Add "style=knf" as an alternative to "style=linux".</li> <li>Remove depreciated "bracket=" options.</li> <li>Improve recognition and formatting of pointers and references (#174 and other changes). </li> <li>Improve the recognition of block-opening brackets.</li> <li>Improve code using a static code analyzer (#195).</li> <li>Change "max-code-length" to include Objective‑C methods.</li> <li>Change "indent-elseifs" and "break-blocks" to look ahead only if in command-type brackets (speed improvement). </li> <li>Fix linux bracket styles to break the opening bracket in inline function definitions (#185). </li> <li>Fix indentation of switch block comments (#164). </li> <li>Fix enums to indent with tabs when requested (#92, #121). </li> <li>Fix formatting of rvalue reference without a name in a declaration (#219). </li> <li>Fix "pad-first-paren-out" to not pad if the following parens are empty (#232). </li> <li>Fix end-of-statement reset when comments follow closing bracket.</li> <li>Fix the ASBeautifier active and waiting stacks to delete the ASBeautifier objects before deleting the pointers. </li> <li>Fix ASBeautifier "init" to delete the tempStack vectors before deleting the tempStack.</li> <li>Fix Linux piping problem by changing "cin" input to build a stringstream before formatting. </li> <li>Fix to identify the correct bracket type when 'extern "C"' is part of the enum definition. </li> <li>Fix to clear 'extern "C"' variables when the block is closed. </li> <li>Fix unindented 'extern "C"' to not indent when in a #else preprocessor directive.</li> <li>Fix not always correctly formatting linux type brackets for enum blocks.</li> <li>Fix align-pointer in a range-based for statement (#217).</li> <li>Fix pointer-reference argument alignment to correctly position a following comment (#235).</li> <li>Fix to not attach a bracket to a line ending in a backslash '\' (#186, #214, #220). </li> <li>Fix to recognize templates using multiple lines (#85, #87, #136).</li> <li>Fix formatting of template continuation lines (#85, #87, #136).</li> <li>Fix to allow '^' as an array operator (#233). </li> <li>Fix an "enum" argument being mistaken for an enumeration (#211).</li> <li>Fix to recognize a non-instatement array after a "},{" sequence.</li> <li>Fix "pad-oper" to not pad before a following comma. </li> <li>Fix recognition of an operator when the calculation contains a bitwise "not" '~' (#166).</li> <li>Fix to allow a preprocessor statement within a preprocessor define (#238).</li> <li>Fix preprocessor comparison to check for whole words (#246).</li> <li>Fix "add-brackets" when a line contains more than one paren pairs (#181).</li> <li>Fix to allow Mac old CR line endings in the options file (#129).</li> <li>Refactor to aid debugging and improve design and decomposition: <ul> <li>Move ALL preliminary indentation calculations to computePreliminaryIndentation() in ASBeautifier.</li> <li>Move calculation of 'force tab' indents to preLineWS() in ASBeautifier. </li> <li>Combine methods init() and init(ASSourceIterator*) in ASBeautifier.</li> <li>Extract method adjustParsedLineIndentation() in ASBeautifier.</li> <li>Extract method parseCurrentLine() in ASEnhancer. </li> <li>Remove astyle_main.cpp unused functions getFilesUnchanged, getOptionsFileRequired, and setOptionsFileRequired. </li> </ul> </li> </ul> <h3>Artistic Style 2.03 (April 2013)</h3> <ul> <li>Add new option "indent=force-tab-x=#" (-xT#) to allow a tab length that different from the indent length (3430662). </li> <li>Add new option, "pad-first-paren-out" (xd), to pad only the first paren in a series on the outside (3350356). </li> <li>Add new option "max-code-length=#" (-xC#) to limit the length of code on a line. </li> <li>Add new option "break-after-logical" (-xL) to modify a "max-code-length" line break for conditionals. </li> <li>Add new option "close-templates" (-xy) to close whitespace in the angle brackets ">" of template definitions.</li> <li>Add formatting of C++ rvalue references (&&) using the existing "align-pointer" and "align-reference" options.</li> <li>Add formatting of C++/CLI managed pointers (the "^" character) to the "align-pointer" option.</li> <li>Add translations for Dutch, Finnish, Italian, Japanese, Korean, Polish, Portuguese, Russian, Swedish, and Ukrainian. </li> <li>Remove byte-order-mark from ASLocalizer.cpp.</li> <li>Change the short option for delete-empty-lines from "xd" to "xe".</li> <li>Change the ASTYLE_LIB option to remove __declspec for a Visual C static library when ASTYLE_NO_VCX is also declared. </li> <li>Change to remove any space padding in a pointer to pointer (**).</li> <li>Fix "break-elseifs" to format one-line "if" and "else" statements the same as when the option is not used. </li> <li>Fix "break-elseifs" to break else-if statements when "keep-one-line-statements" also is requested. </li> <li>Fix "break-elseifs" to correctly format comments preceding the else-if. </li> <li>Fix C# not correctly identifying lambda expressions as a command-type bracket.</li> <li>Fix C# preprocessor statements adding extra empty lines when "break-blocks" is used. </li> <li>Fix C# padding "get" and "set" statements that are not headers when "break-blocks" is used. </li> <li>Fix C# to recognize the "#line" statement. </li> <li>Fix C++11 standard for range-based "for" loops (3458402, 3480095). </li> <li>Fix C++11 standard for "enum" with a base type (3458402). </li> <li>Fix C++11 standard for template closing angle brackets (no space required) (3495192). </li> <li>Fix C/C++ keyword 'extern "C"' in a preprocessor causing an extra indent (1514844, 2953388, 2963382, 3093842, <span>3467479)</span>. </li> <li>Fix breaking after a switch "default" statement when "break-elseifs" is used without "keep-one-line-statements" (<span>3559365</span>). </li> <li>Fix in-statement arrays to indent correctly when they exceed the "max-instatement-indent". </li> <li>Fix quote continuation sometimes being processed as a preprocessor directive (3445475).</li> <li>Fix formatting of some conditional statements on a continuation-line.</li> <li>Fix Java formatting of generics with wildcards (3428140).</li> <li>Fix formatting of pointers and references to work with the new "max-code-length" option. </li> <li>Fix formatting of pointers and references after a template close.</li> <li>Fix formatting of empty attached brackets (3505002).</li> <li>Fix C comments beginning a line breaking if they follow a semi-colon (3502700).</li> <li>Fix "pad-header" not padding "return" and "throw" statements (3509134).</li> <li>Fix recognition problems with templates.</li> <li>Fix "struct" return type being mistaken for a struct.</li> <li>Fix "pad-oper" in java for-each loop.</li> <li>Fix recognition of a macro multi-line comment (3414970).</li> <li>Fix bracketTypeStack entries added by #if and #else if the # is separated from the word. </li> <li>Fix C++ breaking a line on an access modifier in a one-line block when "keep-one-line-blocks" is used. </li> <li>Fix memory leak when "ascii" option is used.</li> <li>Fix memory leak when a preprocessor statement is used without a closing #endif.</li> <li>Fix preprocessor directive to allow compiling with mingw-x64 compiler.</li> <li>Fix redirection on Windows so it does not hang when Linux line ends are used (3514712).</li> <li>Fix redirection on Linux to output the correct line ends (3514712).</li> <li>Fix non-portable return value on locale name (3452574). </li> <li>Fix assert errors caused by not checking the text length on the return from peekNextText().</li> <li>Fix spelling of "depreciated" in help message (3454735).</li> <li>Refactor to improve design and decomposition: <ul> <li>Fix warning messages from Visual Studio static code analysis.</li> <li>Fix warning messages from cppcheck, except for constructor uninitialized variables (false positive). </li> <li>Remove astyle_main.h dependency from ASLocalizer.h </li> <li>Remove appendChar() from the inline functions.</li> <li>Extract methods for pointer or reference alignment in ASFormatter. </li> </ul> </li> </ul> <p> </p> <p> <strong>Previous releases are available in the <a href="http://astyle.sourceforge.net/notesArchives.html">Release Notes Archives</a>.</strong></p> <p> </p> <p style="margin-left: -0.4in; text-align: center;"> <a href="http://sourceforge.net/projects/astyle"> <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" /></a></p> <p> </p> </body> </html>