Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package astyle for openSUSE:Factory checked in at 2026-05-07 15:44:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/astyle (Old) and /work/SRC/openSUSE:Factory/.astyle.new.1966 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "astyle" Thu May 7 15:44:20 2026 rev:24 rq:1351282 version:3.6.14 Changes: -------- --- /work/SRC/openSUSE:Factory/astyle/astyle.changes 2025-11-28 16:54:59.571491522 +0100 +++ /work/SRC/openSUSE:Factory/.astyle.new.1966/astyle.changes 2026-05-07 15:45:38.204744655 +0200 @@ -1,0 +2,9 @@ +Wed May 6 19:56:15 UTC 2026 - Dirk Müller <[email protected]> + +- update to 3.6.14: + * Fix indent after comma with align-pointer=type option + * Fix preprocessor indent with align-pointer=type option + * Fix padding of C# template delimiters with --pad-oper + * Fix indent of concatenated raw strings + +------------------------------------------------------------------- Old: ---- astyle-3.6.13.tar.bz2 New: ---- astyle-3.6.14.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ astyle.spec ++++++ --- /var/tmp/diff_new_pack.pxiMTL/_old 2026-05-07 15:45:41.788891713 +0200 +++ /var/tmp/diff_new_pack.pxiMTL/_new 2026-05-07 15:45:41.816892862 +0200 @@ -1,7 +1,7 @@ # # spec file for package astyle # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: astyle -Version: 3.6.13 +Version: 3.6.14 Release: 0 Summary: Source Code Indenter, Formatter, and Beautifier for C, C++, C# and Java License: MIT ++++++ astyle-3.6.13.tar.bz2 -> astyle-3.6.14.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/doc/notes.html new/astyle-3.6.14/doc/notes.html --- old/astyle-3.6.13/doc/notes.html 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/doc/notes.html 2026-02-24 22:56:55.000000000 +0100 @@ -67,7 +67,17 @@ <section class="release-notes"> <article class="release"> - <h3>Artistic Style 3.6.13 (July 2025)</h3> + <h3>Artistic Style 3.6.14 (January 2026)</h3> + <ul> + <li>Fix indent after comma with align-pointer=type option (https://sourceforge.net/p/astyle/bugs/605/)</li> + <li>Fix preprocessor indent with align-pointer=type option (https://sourceforge.net/p/astyle/bugs/604/)</li> + <li>Fix padding of C# template delimiters with --pad-oper (https://gitlab.com/saalen/astyle/-/issues/102)</li> + <li>Fix indent of concatenated raw strings (https://sourceforge.net/p/astyle/bugs/596/)</li> + </ul> + </article> + + <article class="release"> + <h3>Artistic Style 3.6.13 (October 2025)</h3> <ul> <li>Fix indent of continued string literal as argument (https://gitlab.com/saalen/astyle/-/issues/99)</li> <li>Fix regression related to template delimters (https://gitlab.com/saalen/astyle/-/issues/85)</li> @@ -75,7 +85,7 @@ </article> <article class="release"> - <h3>Artistic Style 3.6.12 (July 2025)</h3> + <h3>Artistic Style 3.6.12 (August 2025)</h3> <ul> <li>Improved complex lambda body indentation</li> </ul> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/src/ASBeautifier.cpp new/astyle-3.6.14/src/ASBeautifier.cpp --- old/astyle-3.6.13/src/ASBeautifier.cpp 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/src/ASBeautifier.cpp 2026-02-24 22:56:55.000000000 +0100 @@ -1,5 +1,5 @@ // ASBeautifier.cpp -// Copyright (c) 2025 The Artistic Style Authors. +// Copyright (c) 2026 The Artistic Style Authors. // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -4015,10 +4015,11 @@ char prevCh = i > 0 ? line[i - 1] : ' '; char prevPrevCh = i > 1 ? line[i - 2] : ' '; - // GL 32 + // https://gitlab.com/saalen/astyle/-/issues/32 // https://sourceforge.net/p/astyle/bugs/535/ // https://gitlab.com/saalen/astyle/-/issues/82 - if (isCStyle() && prevCh == 'R' && !isalpha(prevPrevCh) && !isalpha(prevNonSpaceCh)) + // https://sourceforge.net/p/astyle/bugs/596/ + if (isCStyle() && prevCh == 'R' && !isalpha(prevPrevCh) /*&& !isalpha(prevNonSpaceCh)*/ ) { int parenPos = line.find('(', i); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/src/ASEnhancer.cpp new/astyle-3.6.14/src/ASEnhancer.cpp --- old/astyle-3.6.13/src/ASEnhancer.cpp 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/src/ASEnhancer.cpp 2026-02-24 22:56:55.000000000 +0100 @@ -1,5 +1,5 @@ // ASEnhancer.cpp -// Copyright (c) 2025 The Artistic Style Authors. +// Copyright (c) 2026 The Artistic Style Authors. // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/src/ASFormatter.cpp new/astyle-3.6.14/src/ASFormatter.cpp --- old/astyle-3.6.13/src/ASFormatter.cpp 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/src/ASFormatter.cpp 2026-02-24 22:56:55.000000000 +0100 @@ -1,5 +1,5 @@ // ASFormatter.cpp -// Copyright (c) 2025 The Artistic Style Authors. +// Copyright (c) 2026 The Artistic Style Authors. // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -2106,17 +2106,18 @@ handlePotentialOperator(newHeader); } - // TODO check add flag to preserve space size_t lastNonWsChar = currentLine.find_last_not_of(" \t", charNum - 1); - if (lastNonWsChar != std::string::npos && pointerAlignment == PTR_ALIGN_TYPE && !isGSCStyle() && !preserveWhitespace) + + if (lastNonWsChar != std::string::npos && pointerAlignment == PTR_ALIGN_TYPE && !isGSCStyle() && !preserveWhitespace && !isInPreprocessor) { char lastChar = currentLine[lastNonWsChar]; - //if (lastChar != '(' && !isalpha(lastChar)) { - // formattedLine = rtrim(formattedLine); - //} + //fix SF605, possibly more cases pending + char nextChar = 0; + size_t nextCharPos = currentLine.find_first_not_of(" \t", lastNonWsChar+1); + if (nextCharPos != std::string::npos) nextChar = currentLine[nextCharPos]; - if (lastChar == ',') + if (lastChar == ',' && nextChar != '+' && nextChar != '-') { formattedLine = rtrim(formattedLine); formattedLine += ' '; @@ -4492,7 +4493,7 @@ bool isSharpNullConditional = (newOperator == &ASResource::AS_QUESTION && isSharpStyle() && (nextNonWSChar == '.' || nextNonWSChar == '[')); - bool isSpecialTemplateOperator = (isInTemplate || isImmediatelyPostTemplate) && + bool isSpecialTemplateOperator = (isInTemplate || isImmediatelyPostTemplate || isSharpStyle()) && (newOperator == &ASResource::AS_LS || newOperator == &ASResource::AS_GR); std::string sBegin = currentLine.substr(0, charNum); @@ -6533,7 +6534,7 @@ { std::string delim = ')' + verbatimDelimiter; int delimStart = charNum - delim.length(); - if (delimStart > 0 && currentLine.substr(delimStart, delim.length()) == delim) + if (delimStart >= 0 && currentLine.substr(delimStart, delim.length()) == delim) { isInQuote = false; isInVerbatimQuote = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/src/ASLocalizer.cpp new/astyle-3.6.14/src/ASLocalizer.cpp --- old/astyle-3.6.13/src/ASLocalizer.cpp 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/src/ASLocalizer.cpp 2026-02-24 22:56:55.000000000 +0100 @@ -1,5 +1,5 @@ // ASLocalizer.cpp -// Copyright (c) 2025 The Artistic Style Authors. +// Copyright (c) 2026 The Artistic Style Authors. // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. // diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/src/ASLocalizer.h new/astyle-3.6.14/src/ASLocalizer.h --- old/astyle-3.6.13/src/ASLocalizer.h 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/src/ASLocalizer.h 2026-02-24 22:56:55.000000000 +0100 @@ -1,5 +1,5 @@ // ASLocalizer.h -// Copyright (c) 2025 The Artistic Style Authors. +// Copyright (c) 2026 The Artistic Style Authors. // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/src/ASResource.cpp new/astyle-3.6.14/src/ASResource.cpp --- old/astyle-3.6.13/src/ASResource.cpp 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/src/ASResource.cpp 2026-02-24 22:56:55.000000000 +0100 @@ -1,5 +1,5 @@ // ASResource.cpp -// Copyright (c) 2025 The Artistic Style Authors. +// Copyright (c) 2026 The Artistic Style Authors. // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/src/astyle.h new/astyle-3.6.14/src/astyle.h --- old/astyle-3.6.13/src/astyle.h 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/src/astyle.h 2026-02-24 22:56:55.000000000 +0100 @@ -1,5 +1,5 @@ // astyle.h -// Copyright (c) 2025 The Artistic Style Authors. +// Copyright (c) 2026 The Artistic Style Authors. // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -28,7 +28,7 @@ #include <cstring> // need both string and cstring for GCC #endif -#define ASTYLE_VERSION "3.6.13" +#define ASTYLE_VERSION "3.6.14" namespace astyle { @@ -298,18 +298,18 @@ bool isGSCStyle() const { return baseFileType == GSC_TYPE; } protected: // functions definitions are at the end of ASResource.cpp - const std::string* findHeader(std::string_view line, int i, + [[nodiscard]] const std::string* findHeader(std::string_view line, int i, const std::vector<const std::string*>* possibleHeaders) const; - bool findKeyword(std::string_view line, int i, std::string_view keyword) const; - const std::string* findOperator(std::string_view line, int i, + [[nodiscard]] bool findKeyword(std::string_view line, int i, std::string_view keyword) const; + [[nodiscard]] const std::string* findOperator(std::string_view line, int i, const std::vector<const std::string*>* possibleOperators) const; - std::string_view getCurrentWord(std::string_view, size_t index) const; - bool isDigit(char ch) const; - bool isLegalNameChar(char ch) const; - bool isCharPotentialHeader(std::string_view line, size_t i) const; - bool isCharPotentialOperator(char ch) const; - bool isDigitSeparator(std::string_view line, int i) const; - char peekNextChar(std::string_view line, int i) const; + [[nodiscard]] std::string_view getCurrentWord(std::string_view, size_t index) const; + [[nodiscard]] bool isDigit(char ch) const; + [[nodiscard]] bool isLegalNameChar(char ch) const; + [[nodiscard]] bool isCharPotentialHeader(std::string_view line, size_t i) const; + [[nodiscard]] bool isCharPotentialOperator(char ch) const; + [[nodiscard]] bool isDigitSeparator(std::string_view line, int i) const; + [[nodiscard]] char peekNextChar(std::string_view line, int i) const; }; // Class ASBase //----------------------------------------------------------------------------- @@ -359,38 +359,38 @@ void setSqueezeWhitespace(bool state); void setPreserveWhitespace(bool state); void setLambdaIndentation(bool state); - int getBeautifierFileType() const; - int getFileType() const; - int getIndentLength() const; - int getTabLength() const; - std::string getIndentString() const; - std::string getNextWord(const std::string& line, size_t currPos) const; - bool getAlignMethodColon() const; - bool getBraceIndent() const; - bool getBlockIndent() const; - bool getCaseIndent() const; - bool getClassIndent() const; - bool getEmptyLineFill() const; - bool getForceTabIndentation() const; - bool getModeManuallySet() const; - bool getModifierIndent() const; - bool getNamespaceIndent() const; - bool getPreprocDefineIndent() const; - bool getSwitchIndent() const; + [[nodiscard]] int getBeautifierFileType() const; + [[nodiscard]] int getFileType() const; + [[nodiscard]] int getIndentLength() const; + [[nodiscard]] int getTabLength() const; + [[nodiscard]] std::string getIndentString() const; + [[nodiscard]] std::string getNextWord(const std::string& line, size_t currPos) const; + [[nodiscard]] bool getAlignMethodColon() const; + [[nodiscard]] bool getBraceIndent() const; + [[nodiscard]] bool getBlockIndent() const; + [[nodiscard]] bool getCaseIndent() const; + [[nodiscard]] bool getClassIndent() const; + [[nodiscard]] bool getEmptyLineFill() const; + [[nodiscard]] bool getForceTabIndentation() const; + [[nodiscard]] bool getModeManuallySet() const; + [[nodiscard]] bool getModifierIndent() const; + [[nodiscard]] bool getNamespaceIndent() const; + [[nodiscard]] bool getPreprocDefineIndent() const; + [[nodiscard]] bool getSwitchIndent() const; protected: void deleteBeautifierVectors(); - int getNextProgramCharDistance(std::string_view line, int i) const; - int indexOf(const std::vector<const std::string*>& container, const std::string* element) const; + [[nodiscard]] int getNextProgramCharDistance(std::string_view line, int i) const; + [[nodiscard]] int indexOf(const std::vector<const std::string*>& container, const std::string* element) const; void setBlockIndent(bool state); void setBraceIndent(bool state); void setBraceIndentVtk(bool state); - std::string extractPreprocessorStatement(std::string_view line) const; - std::string trim(std::string_view str) const; - std::string rtrim(std::string_view str) const; - bool isNumericVariable(std::string_view word) const; - bool isGitConflictMarker(std::string_view line) const; - bool lineStartsWithNumericType(std::string_view line) const; + [[nodiscard]] std::string extractPreprocessorStatement(std::string_view line) const; + [[nodiscard]] std::string trim(std::string_view str) const; + [[nodiscard]] std::string rtrim(std::string_view str) const; + [[nodiscard]] bool isNumericVariable(std::string_view word) const; + [[nodiscard]] bool isGitConflictMarker(std::string_view line) const; + [[nodiscard]] bool lineStartsWithNumericType(std::string_view line) const; // variables set by ASFormatter - must be updated in activeBeautifierStack @@ -434,25 +434,25 @@ void clearObjCMethodDefinitionAlignment(); void deleteBeautifierContainer(std::vector<ASBeautifier*>*& container); void deleteTempStacksContainer(std::vector<std::vector<const std::string*>*>*& container); - int adjustIndentCountForBreakElseIfComments() const; - int computeObjCColonAlignment(std::string_view line, int colonAlignPosition) const; - int convertTabToSpaces(int i, int tabIncrementIn) const; - int findObjCColonAlignment(std::string_view line) const; - int getContinuationIndentAssign(std::string_view line, size_t currPos) const; - int getContinuationIndentComma(std::string_view line, size_t currPos) const; - int getObjCFollowingKeyword(std::string_view line, int bracePos) const; - bool isIndentedPreprocessor(std::string_view line, size_t currPos) const; - bool isLineEndComment(std::string_view line, int startPos) const; - bool isPreprocessorConditionalCplusplus(std::string_view line) const; - bool isInPreprocessorUnterminatedComment(std::string_view line); - bool isTopLevel() const; - bool statementEndsWithComma(std::string_view line, int index) const; + [[nodiscard]] int adjustIndentCountForBreakElseIfComments() const; + [[nodiscard]] int computeObjCColonAlignment(std::string_view line, int colonAlignPosition) const; + [[nodiscard]] int convertTabToSpaces(int i, int tabIncrementIn) const; + [[nodiscard]] int findObjCColonAlignment(std::string_view line) const; + [[nodiscard]] int getContinuationIndentAssign(std::string_view line, size_t currPos) const; + [[nodiscard]] int getContinuationIndentComma(std::string_view line, size_t currPos) const; + [[nodiscard]] int getObjCFollowingKeyword(std::string_view line, int bracePos) const; + [[nodiscard]] bool isIndentedPreprocessor(std::string_view line, size_t currPos) const; + [[nodiscard]] bool isLineEndComment(std::string_view line, int startPos) const; + [[nodiscard]] bool isPreprocessorConditionalCplusplus(std::string_view line) const; + [[nodiscard]] bool isInPreprocessorUnterminatedComment(std::string_view line); + [[nodiscard]] bool isTopLevel() const; + [[nodiscard]] bool statementEndsWithComma(std::string_view line, int index) const; - std::string getIndentedSpaceEquivalent(std::string_view line_) const; + [[nodiscard]] std::string getIndentedSpaceEquivalent(std::string_view line_) const; std::string preLineWS(int lineIndentCount, int lineSpaceIndentCount); template<typename T> void deleteContainer(T& container); template<typename T> void initContainer(T& container, T value); - std::vector<std::vector<const std::string*>*>* copyTempStacks(const ASBeautifier& other) const; + [[nodiscard]] std::vector<std::vector<const std::string*>*>* copyTempStacks(const ASBeautifier& other) const; std::pair<int, int> computePreprocessorIndent(); bool handleHeaderSection(std::string_view line, size_t* i, bool closingBraceReached, bool *haveCaseIndent); @@ -758,10 +758,10 @@ void setReferenceAlignment(ReferenceAlign alignment); void setStripCommentPrefix(bool state); void setTabSpaceConversionMode(bool state); - size_t getChecksumIn() const; - size_t getChecksumOut() const; - int getChecksumDiff() const; - int getFormatterFileType() const; + [[nodiscard]] size_t getChecksumIn() const; + [[nodiscard]] size_t getChecksumOut() const; + [[nodiscard]] int getChecksumDiff() const; + [[nodiscard]] int getFormatterFileType() const; // retained for compatibility with release 2.06 // "Brackets" have been changed to "Braces" in 3.0 // they are referenced only by the old "bracket" options diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/src/astyle_main.cpp new/astyle-3.6.14/src/astyle_main.cpp --- old/astyle-3.6.13/src/astyle_main.cpp 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/src/astyle_main.cpp 2026-02-24 22:56:55.000000000 +0100 @@ -1,5 +1,5 @@ // astyle_main.cpp -// Copyright (c) 2025 The Artistic Style Authors. +// Copyright (c) 2026 The Artistic Style Authors. // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -1329,8 +1329,7 @@ std::vector<std::string> targetFilenameVector; // separate directory and file name - size_t separator = filePath.find_last_of(g_fileSeparator); - if (separator == std::string::npos) + if (size_t separator = filePath.find_last_of(g_fileSeparator); separator == std::string::npos) { // if no directory is present, use the currently active directory targetDirectory = getCurrentDirectory(filePath); @@ -1442,28 +1441,28 @@ } // Check if a file exists -bool ASConsole::fileExists(const char* file) const +[[nodiscard]] bool ASConsole::fileExists(const char* file) const { struct stat buf; return (stat(file, &buf) == 0); } -bool ASConsole::fileNameVectorIsEmpty() const +[[nodiscard]] bool ASConsole::fileNameVectorIsEmpty() const { return fileNameVector.empty(); } -bool ASConsole::isOption(const std::string& arg, const char* op) +[[nodiscard]] bool ASConsole::isOption(const std::string& arg, const char* op) { return arg == op; } -bool ASConsole::isOption(const std::string& arg, const char* a, const char* b) +[[nodiscard]] bool ASConsole::isOption(const std::string& arg, const char* a, const char* b) { return (isOption(arg, a) || isOption(arg, b)); } -bool ASConsole::isParamOption(const std::string& arg, const char* option) +[[nodiscard]] bool ASConsole::isParamOption(const std::string& arg, const char* option) { bool retVal = arg.compare(0, strlen(option), option) == 0; // if comparing for short option, 2nd char of arg must be numeric @@ -1477,7 +1476,7 @@ // used for both directories and filenames // updates the g_excludeHitsVector // return true if a match -bool ASConsole::isPathExcluded(const std::string& subPath) +[[nodiscard]] bool ASConsole::isPathExcluded(const std::string& subPath) { for (size_t i = 0; i < excludeVector.size(); ++i) { @@ -2757,14 +2756,11 @@ bool ASOptions::parseOptions(std::vector<std::string>& optionsVector) { std::vector<std::string>::iterator option; - std::string arg; std::string subArg; optionErrors.clear(); - for (option = optionsVector.begin(); option != optionsVector.end(); ++option) + for (const auto &arg : optionsVector) { - arg = *option; - if (arg.compare(0, 2, "--") == 0) parseOption(arg.substr(2)); else if (arg[0] == '-') @@ -2774,8 +2770,8 @@ for (i = 1; i < arg.length(); ++i) { if (i > 1 - && isalpha((unsigned char) arg[i]) - && arg[i - 1] != 'x') + && isalpha((unsigned char) arg[i]) + && arg[i - 1] != 'x') { // parse the previous option in subArg parseOption(subArg); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astyle-3.6.13/src/astyle_main.h new/astyle-3.6.14/src/astyle_main.h --- old/astyle-3.6.13/src/astyle_main.h 2025-10-27 21:57:04.000000000 +0100 +++ new/astyle-3.6.14/src/astyle_main.h 2026-02-24 22:56:55.000000000 +0100 @@ -1,5 +1,5 @@ // astyle_main.h -// Copyright (c) 2025 The Artistic Style Authors. +// Copyright (c) 2026 The Artistic Style Authors. // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed.
