[go: up one dir, main page]

Activity for Artistic Style

  • 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.

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

    I have reverted this fix as it was based on a wrong assumption... the problem is the template earlier which triggers the indent in the unrelated code later. Well back in the day it was no rocket science to compile something which had no third party dependencies. Simple things should be kept simple ;)

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

    Hi, I pushed another fix

  • Zenju Zenju posted a comment on ticket #585

    Unfortunately this example doesn't work yet: namespace { struct SshDeviceId { }; class SftpSessionManager { public: class SshSessionShared { public: SshSessionShared() : session_(0) {} int session_; }; } } should be namespace { struct SshDeviceId { }; class SftpSessionManager { public: class SshSessionShared { public: SshSessionShared() : session_(0) {} int session_; }; } }

  • Zenju Zenju created ticket #591

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

  • Zenju Zenju created ticket #590

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

  • Zenju Zenju posted a comment on ticket #589

    This is probably the same error: (full repro when inside .cpp file) namespace fff { struct FileAttributes { }; SyncDirection getEffectiveSyncDir(SyncOperation syncOp) { switch (syncOp) { case SO_CREATE_LEFT: case SO_DELETE_LEFT: case SO_OVERWRITE_LEFT: case SO_RENAME_LEFT: case SO_MOVE_LEFT_FROM: case SO_MOVE_LEFT_TO: return SyncDirection::left; case SO_DO_NOTHING: case SO_EQUAL: case SO_UNRESOLVED_CONFLICT: break; } return SyncDirection::none; } }

  • Zenju Zenju created ticket #589

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

  • Zenju Zenju posted a comment on ticket #585

    It works! :)

  • Zenju Zenju posted a comment on ticket #586

    It works! :) BTW thanks for supporting all these different build environments: I downloaded the latest Astyle code from git, opened the vs2022 solution, just compiled: executable built, no errors! My mind is a bit blown by how great this works and how easys it is. I didn't even have to read any documentation, or fiddle with compiler options. It' s like when you're used to torture, but then you're unexpectedly offered a spa...

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

    I have pushed a fix in the git repo.

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

    I have pushed a fix in the git repo.

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

    I don't think it's a good idea to change the actual code just to avoid incorrect formatting of the sources. Some compilers will optimize away the string concatenations, others will not, resulting in significant runtime degradation. A better way, also obvious for future reader, is to prevent formatting on portions of the code: // *INDENT-OFF* std::string test() { return "--" + boundaryString + "\r\n" "Content-Type: application/json; charset=UTF-8" "\r\n" /**/ "\r\n" + metaDataBuf + "\r\n" "--" + boundaryString...

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

    I don't think it's a good idea to change the actual code just to avoid incorrect formatting of the sources. Some compilers will optimize away the string concatenations, others will not, resulting in significant runtime degradation. A better way, also obvious for future reader, is to prevent formatting on portions of the code: // *INDENT-OFF* std::string test() { return "--" + boundaryString + "\r\n" "Content-Type: application/json; charset=UTF-8" "\r\n" /**/ "\r\n" + metaDataBuf + "\r\n" "--" + boundaryString...

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

    I don't think it's a good idea to change the actual code just to avoid incorrect formatting of the sources. Some compilers will optimize away the string concatenations, others will not, resulting in significant runtime degradation. A better way, also obvious for future reader, is to prevent formatting on portions of the code: // *INDENT-OFF* std::string test() { return "--" + boundaryString + "\r\n" "Content-Type: application/json; charset=UTF-8" "\r\n" /**/ "\r\n" + metaDataBuf + "\r\n" "--" + boundaryString...

  • André Simon André Simon modified ticket #588

    astyle 3.6.7: incorrect indentation within parenthesis

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

    Hi, until a fix is available you can avoid this by adding string concat operator (+) like this: std::string test() { return "--" + boundaryString + "\r\n" + "Content-Type: application/json; charset=UTF-8" "\r\n" + /**/ "\r\n" + metaDataBuf + "\r\n" + "--" + boundaryString + "\r\n" "Content-Type: application/octet-stream" "\r\n" /**/ "\r\n"; }

  • Xudong Zheng Xudong Zheng created ticket #588

    astyle 3.6.7: incorrect indentation within parenthesis

  • André Simon André Simon modified ticket #587

    AStyle 3.6.7: wrong indentation of multi-line string concat

  • André Simon André Simon modified ticket #586

    AStyle 3.6.7: wrong indentation of multi-line assignment

  • André Simon André Simon modified ticket #585

    AStyle 3.6.7: class modifiers indentation

1 >