Bug 515127

Summary: clazy drops diagnostics without FixIts when exporting fixes (unlike clang-tidy)
Product: [Developer tools] clazy Reporter: Ivan Romanov <drizt72>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: REPORTED ---    
Severity: normal CC: smartins
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: script to build and analyze
CMake script
C++ source file

Description Ivan Romanov 2026-01-26 20:02:31 UTC
Created attachment 188927 [details]
script to build and analyze

SUMMARY
When using clazy-standalone with --export-fixes, diagnostics that do not produce fixits are silently omitted from the exported YAML.

This differs from clang-tidy behavior, which always exports diagnostics, even when Replacements: [].

This makes clazy unusable as a diagnostics provider for Qt Creator, which rely on exported diagnostics from .yaml files to populate the Diagnostics pane.

STEPS TO REPRODUCE
1. On Linux install clazy
2. Download CMakeLists.tst, main.cpp and analyze.sh.
3. chmod+x analyze.sh && analyze.sh

OBSERVED RESULT
clazy-standalone-fixes.yaml not the same as clazy-tidy-fixes.yaml

EXPECTED RESULT
clazy-standalone-fixes.yaml == clazy-tidy-fixes.yaml

SOFTWARE/OS VERSIONS
[taurus@lix test-clang-tidy]$ cat /etc/fedora-release 
Fedora release 43 (Forty Three)
[taurus@lix test-clang-tidy]$ clazy --version
clazy version: 1.16
clang version: 21.1.8
[taurus@lix test-clang-tidy]$ clang --version
clang version 21.1.8 (Fedora 21.1.8-3.fc43)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg
[taurus@lix test-clang-tidy]$ clang-tidy --version
LLVM (http://llvm.org/):
  LLVM version 21.1.8
  Optimized build.
[taurus@lix test-clang-tidy]$ qmake-qt5 --version
QMake version 3.1
Using Qt version 5.15.18 in /usr/lib64
Comment 1 Ivan Romanov 2026-01-26 20:03:09 UTC
Created attachment 188928 [details]
CMake script
Comment 2 Ivan Romanov 2026-01-26 20:03:31 UTC
Created attachment 188929 [details]
C++ source file