Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package clazy for openSUSE:Factory checked in at 2024-07-04 16:27:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/clazy (Old) and /work/SRC/openSUSE:Factory/.clazy.new.2080 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "clazy" Thu Jul 4 16:27:39 2024 rev:26 rq:1185343 version:1.12git.20240630T203330~f3fb82c Changes: -------- --- /work/SRC/openSUSE:Factory/clazy/clazy.changes 2024-05-22 21:30:16.885164426 +0200 +++ /work/SRC/openSUSE:Factory/.clazy.new.2080/clazy.changes 2024-07-04 16:28:33.191075616 +0200 @@ -1,0 +2,15 @@ +Thu Jul 04 07:45:31 UTC 2024 - christo...@krop.fr + +- Update to version 1.12git.20240630T203330~f3fb82c: + * docs: update HOWTO.md + * Update ChangeLog for 1.12 + * docs: Update HOWTO to include release instructions + * Don't hardcode version in ClazyStandaloneMain.cpp + * docs: Bump minimum LLVM to 11 + * docs: Don't hardcode current version in README + * no-module-include: Fix on Windows as line endings can have \r\n + * ci: Fix build on ubuntu 24.04 + * ci: Bump to Qt 6.7 + * tests: Remove ubuntu-18.04 and 20.04 Dockerfiles + +------------------------------------------------------------------- Old: ---- clazy-1.11git.20240520T014559~87b83e3.obscpio New: ---- clazy-1.12git.20240630T203330~f3fb82c.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clazy.spec ++++++ --- /var/tmp/diff_new_pack.ud1IlA/_old 2024-07-04 16:28:33.715094745 +0200 +++ /var/tmp/diff_new_pack.ud1IlA/_new 2024-07-04 16:28:33.715094745 +0200 @@ -17,7 +17,7 @@ Name: clazy -Version: 1.11git.20240520T014559~87b83e3 +Version: 1.12git.20240630T203330~f3fb82c Release: 0 Summary: Qt oriented code checker based on the Clang framework License: LGPL-2.0-or-later @@ -26,7 +26,7 @@ Source0: %{name}-%{version}.tar.xz BuildRequires: clang BuildRequires: clang-devel >= 11.0 -BuildRequires: cmake >= 3.7 +BuildRequires: cmake >= 3.8 %if 0%{?suse_version} == 1500 BuildRequires: gcc13-PIE BuildRequires: gcc13-c++ @@ -61,7 +61,7 @@ %files %license LICENSES/* %doc %{_datadir}/doc/clazy -%doc README.md HOWTO Changelog +%doc README.md HOWTO.md Changelog %{_bindir}/clazy %{_bindir}/clazy-standalone %{_datadir}/metainfo/org.kde.clazy.metainfo.xml ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ud1IlA/_old 2024-07-04 16:28:33.755096206 +0200 +++ /var/tmp/diff_new_pack.ud1IlA/_new 2024-07-04 16:28:33.759096352 +0200 @@ -1,9 +1,10 @@ <services> <service name="obs_scm" mode="disabled"> <param name="changesgenerate">enable</param> - <param name="versionformat">1.11git.%ci~%h</param> + <param name="versionformat">1.12git.%ci~%h</param> <param name="url">https://invent.kde.org/sdk/clazy.git</param> <param name="scm">git</param> + <param name="revision">v1.12</param> </service> <service name="set_version" mode="disabled" /> <service name="tar" mode="buildtime"/> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.ud1IlA/_old 2024-07-04 16:28:33.779097082 +0200 +++ /var/tmp/diff_new_pack.ud1IlA/_new 2024-07-04 16:28:33.783097228 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://invent.kde.org/sdk/clazy.git</param> - <param name="changesrevision">87b83e35f21715ae81ff0f18cb1859efb6d58ea2</param></service></servicedata> + <param name="changesrevision">f3fb82cb8cd82664e5e5a546aa2a73d3a297d1bd</param></service></servicedata> (No newline at EOF) ++++++ clazy-1.11git.20240520T014559~87b83e3.obscpio -> clazy-1.12git.20240630T203330~f3fb82c.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/.gitlab-ci.yml new/clazy-1.12git.20240630T203330~f3fb82c/.gitlab-ci.yml --- old/clazy-1.11git.20240520T014559~87b83e3/.gitlab-ci.yml 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/.gitlab-ci.yml 2024-06-30 21:33:30.000000000 +0200 @@ -11,7 +11,7 @@ # Copied from sysadmin/ci-utilities/templates/clang-format.yaml formatting-and-codegen: stage: build - image: invent-registry.kde.org/sysadmin/ci-images/suse-qt66:latest + image: invent-registry.kde.org/sysadmin/ci-images/suse-qt67:latest tags: - Linux script: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/CMakeLists.txt new/clazy-1.12git.20240630T203330~f3fb82c/CMakeLists.txt --- old/clazy-1.11git.20240520T014559~87b83e3/CMakeLists.txt 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/CMakeLists.txt 2024-06-30 21:33:30.000000000 +0200 @@ -42,6 +42,7 @@ add_definitions(-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS) add_definitions(-D_GNU_SOURCE -DHAVE_CLANG_CONFIG_H) +add_definitions(-DCLAZY_VERSION="${CLAZY_PRINT_VERSION}") option(CLAZY_AST_MATCHERS_CRASH_WORKAROUND "Disable AST Matchers if being built with clang. See bug #392223" ON) option(LINK_CLAZY_TO_LLVM "Links the clazy plugin to LLVM. Switch to OFF if your clang binary has all symbols already. Might need to be OFF if your LLVM is static." ON) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/Changelog new/clazy-1.12git.20240630T203330~f3fb82c/Changelog --- old/clazy-1.11git.20240520T014559~87b83e3/Changelog 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/Changelog 2024-06-30 21:33:30.000000000 +0200 @@ -1,9 +1,15 @@ # Changelog -* v1.12 (TBD) +* v1.12 (June 30th 2024) - New Checks: - qt-keyword-emit - sanitize-inline-keyword + - no-module-include + - Support for LLVM 18 + - Fixit for QFileInfo::exists + - Fixit for qstring-arg + - Removed Qt4 compatibility + - 2 years worth of bug fixes * v1.11 (January 21st 2022) - New Checks: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/HOWTO new/clazy-1.12git.20240630T203330~f3fb82c/HOWTO --- old/clazy-1.11git.20240520T014559~87b83e3/HOWTO 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/HOWTO 1970-01-01 01:00:00.000000000 +0100 @@ -1,67 +0,0 @@ -TODO: Use .md - -Help on how to create a new check or a fixit - --------------------------------------------------------------------------------- -Files to create or modify: - -checks/levelX/my-check.cpp -checks/levelX/my-check.h -checks/README-my-check.md -tests/my-check/config.json -tests/my-check/main.cpp -ClazySources.cmake -checks.json -ChangeLog -README.md - -Just add your check to checks.json and run dev-scripts/generate.py --generate -which will generate the files you need to write, and edit others for you. - --------------------------------------------------------------------------------- -Tips - -- Write the unit-test before the check - -- Dump the abstract syntax tree (AST) of your unit-test: - - ./run_tests.py my-test --dump-ast - - This creates a main.cpp.ast file, if you include Qt headers, the AST will be - very big, your stuff will be at the end of the file. Use the AST to check which - nodes you have to visit. - -- You can also dump the AST of a statement in C++: - stmt->dump() - - This dumps the sub-AST to stdout, having stmt as it's root - -- llvm::errs() is useful to print to stderr - llvm::errs() << record->getNameAsString() << "\n"; - llvm::errs() << stmt->getLocStart().printToString(m_ci.getSourceManager()) << "\n"; - -- Look in Utils.h, StringUtils.h, QtUtils.h, FixitUtils.h, etc for helper functions you might need. - --------------------------------------------------------------------------------- -Using ASTMatchers - -- See the qcolor-from-literal check for how to use ASTMatchers with clazy --------------------------------------------------------------------------------- -Tips for fixits - -- Usually you'll have to poke around and debug print getLocStart and getLocEnd of statements until - you find the locations you want, otherwise you'll have to manipulate the locations with Lexer, - see FixItUtils.cpp. - -- Learn from existing fixits: - qgetenv.cpp - functionargsbyref.cpp - autounexpectedqstringbuilder.cpp - qstringref.cpp - --------------------------------------------------------------------------------- -Running tests - ./run_tests.py # This runs all tests - ./run_tests.py my-check # This runs one tests - ./run_tests.py my-check --verbose # Prints the compiler invocation command - ./run_tests.py my-check --dump-ast # dumps the AST into a file with .ast extension diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/HOWTO.md new/clazy-1.12git.20240630T203330~f3fb82c/HOWTO.md --- old/clazy-1.11git.20240520T014559~87b83e3/HOWTO.md 1970-01-01 01:00:00.000000000 +0100 +++ new/clazy-1.12git.20240630T203330~f3fb82c/HOWTO.md 2024-06-30 21:33:30.000000000 +0200 @@ -0,0 +1,85 @@ + +This is dumping ground with tips for developers interested in writing their own checks. + + +# Create a new check or fixit +Files to create or modify: + +``` +checks/levelX/my-check.cpp +checks/levelX/my-check.h +checks/README-my-check.md +tests/my-check/config.json +tests/my-check/main.cpp +ClazySources.cmake +checks.json +ChangeLog +README.md +``` + +Just add your check to `checks.json` and run `dev-scripts/generate.py --generate` +which will generate the files you need to write, and edit others for you. + +## Tips + +- Write the unit-test before the check + +- Dump the abstract syntax tree (AST) of your unit-test: + + `./run_tests.py my-test --dump-ast` + + This creates a `main.cpp.ast` file, if you include Qt headers, the AST will be + very big, your stuff will be at the end of the file. Use the AST to check which + nodes you have to visit. + +- You can also dump the AST of a statement in C++: + `stmt->dump()` + + This dumps the sub-AST to stdout, having stmt as its root + +- `llvm::errs()` is useful to print to stderr + `llvm::errs() << record->getNameAsString() << "\n";` + `llvm::errs() << stmt->getLocStart().printToString(m_ci.getSourceManager()) << "\n";` + +- Look in `Utils.h`, `StringUtils.h`, `QtUtils.h`, `FixitUtils.h`, etc for helper functions you might need. + +## Using ASTMatchers + +- See the `qcolor-from-literal` check for how to use ASTMatchers with clazy + +## Tips for fixits + +- Usually you'll have to poke around and debug print `getLocStart` and `getLocEnd` of statements until + you find the locations you want, otherwise you'll have to manipulate the locations with `Lexer`, + see `FixItUtils.cpp`. + +- Learn from existing fixits: +``` + qgetenv.cpp + functionargsbyref.cpp + autounexpectedqstringbuilder.cpp + qstringref.cpp +``` + +# Running tests + ./run_tests.py # This runs all tests + ./run_tests.py my-check # This runs one tests + ./run_tests.py my-check --verbose # Prints the compiler invocation command + ./run_tests.py my-check --dump-ast # dumps the AST into a file with .ast extension + +# Creating a release + +- Clone `g...@invent.kde.org:sysadmin/repo-metadata` if you haven't yet, open `dependencies/logical-module-structure.json` and update the stable +branch (search for clazy in that file). + +- cd into `clazy`, from `master` create a new stable branch, called for example `1.12` (use the version you want here) + +- Edit `CLAZY_VERSION_MINOR` in `CMakeLists.txt` + +- Edit ChangeLog + +- Tag, for example: `git tag -a v1.12 -m "Version 1.12"` + +- `git push --tags` + +- Merge to master, and bump `CLAZY_VERSION_MINOR` to the next version. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/README.md new/clazy-1.12git.20240630T203330~f3fb82c/README.md --- old/clazy-1.11git.20240520T014559~87b83e3/README.md 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/README.md 2024-06-30 21:33:30.000000000 +0200 @@ -1,8 +1,3 @@ --*WARNING:* master is the development branch. Please use the v1.11 branch. - -clazy v1.12 -=========== - clazy is a compiler plugin which allows clang to understand Qt semantics. You get more than 50 Qt related compiler warnings, ranging from unneeded memory allocations to misusage of API, including fix-its for automatic refactoring. Table of contents @@ -61,7 +56,7 @@ - Other distros: Check llvm/clang build docs. ### Build and install clang -clang and LLVM >= 8.0 are required. +clang and LLVM >= 11.0 are required. If your distro provides clang then you can skip this step. @@ -90,9 +85,9 @@ ### Build and install clang These instructions assume your terminal is suitable for development. -Ninja (or equivalent), git, cmake, and cl (msvc2019) should be in your PATH. +Ninja (or equivalent), git, cmake, and cl (msvc2022) should be in your PATH. -clang and LLVM >= 9.0 are required. +clang and LLVM >= 11.0 are required. Be sure to pass -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON to CMake when building LLVM, otherwise clazy won't work. @@ -504,7 +499,7 @@ # Contributing patches -New features go to master and bug fixes go to the 1.11 branch. +New features go to master and bug fixes go to the last 1.X branch. The preferred way to contributing is by using KDE's GitLab instance, see <https://community.kde.org/Infrastructure/GitLab>. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/cmake/FindClang.cmake new/clazy-1.12git.20240630T203330~f3fb82c/cmake/FindClang.cmake --- old/clazy-1.11git.20240520T014559~87b83e3/cmake/FindClang.cmake 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/cmake/FindClang.cmake 2024-06-30 21:33:30.000000000 +0200 @@ -72,6 +72,7 @@ FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerFrontend) FIND_AND_ADD_CLANG_LIB(clangSema) FIND_AND_ADD_CLANG_LIB(clangRewriteCore) + FIND_AND_ADD_CLANG_LIB(clangAPINotes) endif() if(CLANG_LIBS OR CLANG_LIBCLANG_LIB OR CLANG_CLANG-CPP_LIB) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/src/ClazyStandaloneMain.cpp new/clazy-1.12git.20240630T203330~f3fb82c/src/ClazyStandaloneMain.cpp --- old/clazy-1.11git.20240520T014559~87b83e3/src/ClazyStandaloneMain.cpp 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/src/ClazyStandaloneMain.cpp 2024-06-30 21:33:30.000000000 +0200 @@ -160,7 +160,7 @@ { for (int i = 1; i < argc; i++) { if (strcmp(argv[i], "--version") == 0) { - std::cout << "clazy version 1.12\n"; + std::cout << "clazy version " << CLAZY_VERSION << "\n"; break; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/src/checks/level0/no-module-include.cpp new/clazy-1.12git.20240630T203330~f3fb82c/src/checks/level0/no-module-include.cpp --- old/clazy-1.11git.20240520T014559~87b83e3/src/checks/level0/no-module-include.cpp 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/src/checks/level0/no-module-include.cpp 2024-06-30 21:33:30.000000000 +0200 @@ -70,7 +70,8 @@ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> fileBuffer = llvm::MemoryBuffer::getFile(fileName); if (fileBuffer) { llvm::StringRef fileContent = fileBuffer.get()->getBuffer(); - if (fileContent.startswith("/*\n * This file was generated by qdbusxml2cpp")) { + if (fileContent.startswith("/*\n * This file was generated by qdbusxml2cpp") + || fileContent.startswith("/*\r\n * This file was generated by qdbusxml2cpp")) { continue; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/tests/docker/images/clazy-ubuntu-18.04/Dockerfile new/clazy-1.12git.20240630T203330~f3fb82c/tests/docker/images/clazy-ubuntu-18.04/Dockerfile --- old/clazy-1.11git.20240520T014559~87b83e3/tests/docker/images/clazy-ubuntu-18.04/Dockerfile 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/tests/docker/images/clazy-ubuntu-18.04/Dockerfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -# This Dockerfile creates the container for testing on Ubuntu 18.04 - - -FROM ubuntu:18.04 -MAINTAINER Sergio Martins (sergio.mart...@kdab.com) - -ENV PATH=/Qt/5.15.2/gcc_64/bin/:$PATH -ENV LC_CTYPE=C.UTF-8 - - -RUN apt-get update -RUN apt install -y build-essential g++ clang clang-7 clang-8 clang-tools clang-tools-7 \ -clang-tools-8 libclang-dev libclang-7-dev libclang-8-dev git-core python3 \ -ninja-build qtbase5-dev qtdeclarative5-dev libssl-dev - -# Install a more recent CMake, so we can use presets -WORKDIR / -RUN git clone https://github.com/Kitware/CMake.git -WORKDIR /CMake -RUN git checkout v3.21.0 && ./configure --prefix=/usr/ && make -j10 && make install - -RUN groupadd -g 1000 defaultgroup && \ -useradd -u 1000 -g defaultgroup user -m - -ENV PATH=/usr/lib/llvm-8/bin/:/clazy-src/build-ubuntu-18.04/bin/:$PATH -ENV LD_LIBRARY_PATH=/usr/lib/llvm-8/lib64/:/clazy-src/build-ubuntu-18.04/lib/:$LD_LIBRARY_PATH -ENV CLANG_BUILTIN_INCLUDE_DIR=/usr/lib/llvm-8/lib/clang/8.0.0/include/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clazy-1.11git.20240520T014559~87b83e3/tests/docker/images/clazy-ubuntu-20.04/Dockerfile new/clazy-1.12git.20240630T203330~f3fb82c/tests/docker/images/clazy-ubuntu-20.04/Dockerfile --- old/clazy-1.11git.20240520T014559~87b83e3/tests/docker/images/clazy-ubuntu-20.04/Dockerfile 2024-05-20 03:45:59.000000000 +0200 +++ new/clazy-1.12git.20240630T203330~f3fb82c/tests/docker/images/clazy-ubuntu-20.04/Dockerfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -# This Dockerfile creates the container for testing on Ubuntu 20.04 - -FROM ubuntu:20.04 -MAINTAINER Sergio Martins (sergio.mart...@kdab.com) - - -ENV PATH=/Qt/5.15.2/gcc_64/bin/:$PATH -ENV LC_CTYPE=C.UTF-8 - -ENV TZ=Europe/Lisbon -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update -RUN apt install -y build-essential g++ clang-9 clang-tools-9 libclang-9-dev libclang-9-dev \ -git-core python3 ninja-build qtbase5-dev qtdeclarative5-dev libssl-dev - -# Install a more recent CMake, so we can use presets -WORKDIR / -RUN git clone https://github.com/Kitware/CMake.git -WORKDIR /CMake -RUN git checkout v3.21.0 && ./configure --prefix=/usr/ && make -j10 && make install - -RUN groupadd -g 1000 defaultgroup && \ -useradd -u 1000 -g defaultgroup user -m - - -ENV PATH=/usr/lib/llvm-9/bin/:/clazy-src/build-ubuntu-20.04/bin/:$PATH -ENV LD_LIBRARY_PATH=/usr/lib/llvm-9/lib64/:/clazy-src/build-ubuntu-20.04/lib/:$LD_LIBRARY_PATH -ENV CLANG_BUILTIN_INCLUDE_DIR=/usr/lib/llvm-9/lib/clang/9.0.1/include/ ++++++ clazy.obsinfo ++++++ --- /var/tmp/diff_new_pack.ud1IlA/_old 2024-07-04 16:28:34.635128332 +0200 +++ /var/tmp/diff_new_pack.ud1IlA/_new 2024-07-04 16:28:34.671129646 +0200 @@ -1,5 +1,5 @@ name: clazy -version: 1.11git.20240520T014559~87b83e3 -mtime: 1716169559 -commit: 87b83e35f21715ae81ff0f18cb1859efb6d58ea2 +version: 1.12git.20240630T203330~f3fb82c +mtime: 1719776010 +commit: f3fb82cb8cd82664e5e5a546aa2a73d3a297d1bd