Activity for Artistic Style

  • André Simon André Simon posted a comment on ticket #596

    It is related to the last line of the raw string having no indent. It seems to be an older bug or regression.

  • Zenju Zenju modified a comment on ticket #596

    The two examples above are "complete" meaning, pasting each of them into a new cpp file and formatting keeps them unchanged (with the Astyle config from above), rather than fixing the broken switch and lambda layouts. This was tested with your latest version from Jan 30th, freshly compiled from gitlab. For some reason the presence of the raw string literals is responsible for the layout corruption. When deleting them, both the lambda and switch lay out correctly.

  • Zenju Zenju posted a comment on ticket #596

    The two examples above are "complete" meaning, pasting each of them into a new cpp file and formatting keeps them unchanged (with the Astyle config from above), rather than fixing the broken switch and lambda layouts. This was tested with your latests version from Jan 30th, freshly compiled from gitlab. For some reason the presence of the raw string literals is responsible for the layout corruption. When deleting them, both the lambda and switch lay out correctly.

  • André Simon André Simon posted a comment on ticket #596

    Hi, is it possible the bad formatting is triggered by other code before? I cannot replicate your isolated examples (not related to the last change).

  • Zenju Zenju posted a comment on ticket #596

    The raw string literals seem to be preserved now, unfortunately there are regressions: For example the layout of the switch statement in the following test sample is broken (using same astyle config as above): std::string test() { return std::string(R"( <tr> <td>)") + R"(</td> <td><span style="font-weight: 600;">)" + R"(</span></td> )"; } void generateLogFileName(const ProcessSummary& summary) { const std::wstring failStatus = [&] { switch (summary.result) { case TaskResult::success: break; case...

  • André Simon André Simon posted a comment on ticket #596

    I pushed a fix to git

  • André Simon André Simon committed [r706] on Code

    updated version to 3.6.14

  • André Simon André Simon posted a comment on ticket #605

    I pushed a fix in the git repo.

  • André Simon André Simon posted a comment on ticket #604

    I have pushed a fix to the git repo

  • André Simon André Simon modified ticket #555

    Unexpected indent in immediately called lambda

  • André Simon André Simon modified ticket #603

    Lines starting with #define and end with ',' are pre-padded with space

  • André Simon André Simon posted a comment on ticket #603

    duplicate issue

  • André Simon André Simon modified ticket #605

    Negative numbers are aligned and others not

  • André Simon André Simon modified ticket #604

    Lines starting with #define and end with ',' are pre-padded with space

  • Kristof Dewilde Kristof Dewilde created ticket #605

    Negative numbers are aligned and others not

  • Kristof Dewilde Kristof Dewilde created ticket #604

    Lines starting with #define and end with ',' are pre-padded with space

  • Kristof Dewilde Kristof Dewilde created ticket #603

    Lines starting with #define and end with ',' are pre-padded with space

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.13.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.13-x64.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.13.tar.bz2

  • André Simon André Simon committed [r705] on Code

    updated version to 3.6.12

  • Gisle Vanem Gisle Vanem posted a comment on ticket #599

    I get this too in ver. 3.6.12. An align-pointer=name has no effect on e.g. this: protected: virtual void DoDataExchange (CDataExchange* pDX); DECLARE_MESSAGE_MAP() I want virtual void DoDataExchange (CDataExchange *pDX); but astyle does not make it so.

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.12.tar.bz2

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.12-x64.zip

  • Francis CLERC Francis CLERC posted a comment on ticket #602

    Hi, Please ignore this issue as I was not able to reproduce it. Sorry for the inconvenience. Thanks!

  • Francis CLERC Francis CLERC created ticket #602

    When Astyle fails to open a specified file, the file is emptied

  • André Simon André Simon posted a comment on ticket #598

    Thx, I pushed an update into the git repo

  • Francis CLERC Francis CLERC modified a comment on ticket #598

    Hello Simon, Thank you for your reply an for looking at this, Unfortunately I tested on the version 3.6.10 and it seems that the lamdas are no longer indented Original indenting int func() { auto addLambda = [](int a, int b) { return a + b; }; } Then I run astyle-3.6.10-x64> .\astyle.exe --style=allman --indent=spaces=3 --indent-lambda MyFile.c Which gives me int func() { auto addLambda = [](int a, int b) { return a + b; }; } While in version 3.6.7 I have int func() { auto addLambda = [](int a, int...

  • Francis CLERC Francis CLERC modified a comment on ticket #598

    Hello, I tested on the version 3.6.10 and it seems that the lamdas are no longer indented Original indenting int func() { auto addLambda = [](int a, int b) { return a + b; }; } Then I run astyle-3.6.10-x64> .\astyle.exe --style=allman --indent=spaces=3 --indent-lambda MyFile.c Which gives me int func() { auto addLambda = [](int a, int b) { return a + b; }; } While in version 3.6.7 I have int func() { auto addLambda = [](int a, int b) { return a + b; }; }

  • Francis CLERC Francis CLERC posted a comment on ticket #598

    Hello, I tested on the version 3.6.10 and it seems that the lamdas are no longer indented Original indenting int func() { auto addLambda = [](int a, int b) { return a + b; }; } Then I run astyle-3.6.10-x64> .\astyle.exe --style=allman --indent=spaces=3 --indent-lambda MyFile.c Which gives me int func() { auto addLambda = [](int a, int b) { return a + b; }; } While in version 3.6.7 I have int func() { auto addLambda = [](int a, int b) { return a + b; }; }

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.11.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.11-x64.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.11.tar.bz2

  • André Simon André Simon modified ticket #555

    Unexpected indent in immediately called lambda

  • André Simon André Simon posted a comment on ticket #555

    Hi, please try again with 3.6.10

  • André Simon André Simon posted a comment on ticket #598

    Please try with 3.6.10.

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.10-x64.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.10.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.10.tar.bz2

  • André Simon André Simon posted a comment on ticket #600

    I have pushed a fix to the repo

  • w-peuker w-peuker posted a comment on ticket #600

    Hi Marco, adding a single space after // also increases readability for humans. Therefore, many style guides prescribe this type of visual padding between the “frame” of the comment and its content.

  • Marco Marco posted a comment on ticket #600

    Hello @saalen, yes, there are some rows of code: #include <string.h> #include <stdlib.h> #include <stdio.h> /////////////////////////////////////////////////////////// // INCLUDE COMUNI /////////////////////////////////////////////////////////// #include "configBase.h" #include "errorCode.h"//serve x AP_ERR #include "message.h" #include "myLib.h"//serve per AM #include "apEnum.h" #include "vegaassert.h" /////////////////////////////////////////////////////////// // INCLUDE SPECIFICI ///////////////////////////////////////////////////////////...

  • xDudi xDudi created ticket #601

    References in lambda parameter lists are not formatted according to --align-reference=type

  • André Simon André Simon posted a comment on ticket #600

    Hi, is there any code before this function to trigger this?

  • Marco Marco created ticket #600

    indentation preprocessor inside functions

  • Stefan Battmer Stefan Battmer created ticket #599

    --align-pointer=type and --align-reference=type behave incorrectly

  • Eugene Sandulenko Eugene Sandulenko modified a comment on ticket #578

    The problem with * ptr = 10; is still present in 3.6.9

  • Eugene Sandulenko Eugene Sandulenko posted a comment on ticket #578

    The problem with * ptr = 10; still present in 3.6.9

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.9.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.9-x64.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.9.tar.bz2

  • w-peuker w-peuker modified a comment on ticket #598

    Could you please add your examples as text like this: ```cpp verbatim copy of your code section goes here ``` The images are very small and are placed in the wrong place when clicked. In addition, they cannot be copied to easily verify the problem and possible fixes. And finally: Which Artistic Style version do you use?

  • w-peuker w-peuker posted a comment on ticket #598

    Could you please add your examples as text like this: ```cpp verbatim copy of your code section goes here ``` The images are very small and are placed in the wrong place when clicked. In addition, they cannot be copied to easily verify the problem and possible fixes. Which version are you using?

  • Francis CLERC Francis CLERC posted a comment on ticket #598

    With example 3

  • Francis CLERC Francis CLERC posted a comment on ticket #598

    With example 2

  • Francis CLERC Francis CLERC posted a comment on ticket #598

    With example 1

  • Francis CLERC Francis CLERC created ticket #598

    Issue with indenting if without brackets and if-else (with or without brackets) when in a lambda block.

  • André Simon André Simon modified ticket #585

    AStyle 3.6.7: class modifiers indentation

  • André Simon André Simon modified ticket #586

    AStyle 3.6.7: wrong indentation of multi-line assignment

  • André Simon André Simon modified ticket #590

    astyle 3.6.8 (git 2025-03-14): incorrect using indentation

  • André Simon André Simon modified ticket #591

    astyle 3.6.8 (git 2025-03-14): incorrect function-scope class indentation

  • André Simon André Simon modified ticket #592

    astyle 3.6.8 (git 2025-03-17): unexpected linebreak for inherited class

  • André Simon André Simon modified ticket #595

    Unwanted indentation after >>>

  • André Simon André Simon modified ticket #596

    Unexpected change of raw string literal

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.8.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.8-x64.zip

  • Artistic Style Artistic Style released /astyle/astyle 3.6/astyle-3.6.8.tar.bz2

  • Zenju Zenju posted a comment on ticket #594

    I have pushed a fix for the first problem (pointer reference). It works correctly now, thanks! The second you can inmprove with --squeeze-ws. But only int will be recognized as a type, this is a limitation of the current parser. Hopfully this function can be restored again at some time. I've been relying on it a lot in Astyle 3.1 to normalize third-party codebases, especially all the function signatures.

  • André Simon André Simon posted a comment on ticket #594

    I have pushed a fix for the first problem (pointer reference). The second you can inmprove with --squeeze-ws. But only int will be recognized as a type, this is a limitation of the current parser.

  • Zenju Zenju posted a comment on ticket #594

    There seems to be a more general issue: Astyle keeps the following code unchanged: void test(int* test) { wxWindow * const win = nullptr; int* const win = nullptr; std::vector<std::pair<int, int>> * const win = nullptr; } expected: void test(int* test) { wxWindow* const win = nullptr; int* const win = nullptr; std::vector<std::pair<int, int>>* const win = nullptr; }

  • Zenju Zenju posted a comment on ticket #595

    Perfect, the issue has been fixed!

  • André Simon André Simon modified ticket #595

    Unwanted indentation after >>>

  • André Simon André Simon posted a comment on ticket #595

    I pushed a fix for this one (Java operators confusion)

  • André Simon André Simon modified ticket #597

    Preserve one-liners in switch

  • Zenju Zenju posted a comment on ticket #597

    I just realized there is "--keep-one-line-statements", and it works for switches, too!! Ticket can be closed! :)

  • Zenju Zenju posted a comment on ticket #597

    Sorry, this should have been filed under "Feature Requests", not "Bugs".

  • Zenju Zenju posted a comment on ticket #597

    My Astyle config used: --style=allman --suffix=none --keep-one-line-blocks --align-pointer=type --min-conditional-indent=0 --max-continuation-indent=80 --indent-switches --indent-col1-comments --indent-preproc-block --indent-preproc-define --pad-header --pad-comma --formatted --lineend=linux --indent-preproc-block --convert-tabs --preserve-ws

  • Zenju Zenju created ticket #597

    Preserve one-liners in switch

  • Zenju Zenju created ticket #596

    Unexpected change of raw string literal

  • Zenju Zenju posted a comment on ticket #593

    There is also the opposite case: AStyle produces: auto test() { return { .ai_flags = AI_ADDRCONFIG | AI_PASSIVE }; } while the expected result is: auto test() { return { .ai_flags = AI_ADDRCONFIG | AI_PASSIVE }; }

  • Zenju Zenju created ticket #595

    Unwanted indentation after >>>

  • Zenju Zenju created ticket #594

    Unwanted space between *&

  • Zenju Zenju created ticket #593

    Wrong indendation when returning struct

  • Zenju Zenju posted a comment on ticket #591

    The ticked can be closed! Apparently the latest changes to https://sourceforge.net/p/astyle/bugs/585/ fixed this one as well! Thanks!

  • Zenju Zenju posted a comment on ticket #586

    Thank you! :) Ticket can be closed.

  • Zenju Zenju posted a comment on ticket #590

    Thinking about it, the expected result is probably better this one: template <typename... Ts> struct is_proxy_type_list<ProxyTypeList<Ts...>> : std::true_type {}; template <typename T> struct GenerateTypeList { private: using proxy = typename std::conditional<is_proxy_type_list<T>::value, T, ProxyTypeList<T>>::type; }; But with your latest changes, the current code produces: template <typename T> struct GenerateTypeList { private: using proxy = typename std::conditional<is_proxy_type_list<T>::value,...

  • Zenju Zenju posted a comment on ticket #592

    The ticked can be closed! Apparently the latest changes to https://sourceforge.net/p/astyle/bugs/585/ fixed this one as well! Thanks!

  • Zenju Zenju posted a comment on ticket #585

    Awesome! I seem to have run out of any more of these issues :D The ticket can probably be closed.

  • André Simon André Simon posted a comment on ticket #586

    I have pushed another variant of the fix.

  • André Simon André Simon posted a comment on ticket #585

    Please try again with the latest version in git.

  • Zenju Zenju modified a comment on ticket #591

  • Zenju Zenju posted a comment on ticket #591

    This issue should be fixed! See https://sourceforge.net/p/astyle/bugs/585/

  • Zenju Zenju created ticket #592

    astyle 3.6.8 (git 2025-03-17): unexpected linebreak for inherited class

  • Zenju Zenju posted a comment on ticket #589

    Alas, one problematic "switch" remains: struct TreeView { bool operator()(const TreeLine& lhs, const TreeLine& rhs) { switch (lhs.type) { case NodeType::root: return true; case NodeType::folder: { const auto* folderL = nullptr; if (!folderL) return false; return true; } case NodeType::files: break; } assert(false); return false; } };

  • Zenju Zenju posted a comment on ticket #589

    The issue seems to be fixed!

  • Zenju Zenju posted a comment on ticket #585

    Here's a probably related issue with function "missingIndent()": void test(const std::vector<std::pair<int, int>>& workload) { } class NativeFileSystem { public: Zstring missingIndent() const { return isNullFileSystem() ? Zstring{} : rootPath_; } };

  • Zenju Zenju posted a comment on ticket #585

    This is a major improvement! Most issues are gone, but not the following: class GdriveFileState { public: std::optional<std::vector<int>> tryGetBufferedFolderContent() { return {}; } struct FileStateDelta { FileStateDelta() {} private: int test = 0; }; };

  • André Simon André Simon modified ticket #589

    astyle 3.6.8 (git 2025-03-14): incorrect switch indentation

  • André Simon André Simon modified ticket #590

    astyle 3.6.8 (git 2025-03-14): incorrect using indentation

  • André Simon André Simon posted a comment on ticket #589

    Please try these cases with the latest git version.

1 >