Bug 409983 - -exports-fixes considers only last source file
Summary: -exports-fixes considers only last source file
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-19 09:24 UTC by Nikolai Kosjar
Modified: 2019-08-04 17:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolai Kosjar 2019-07-19 09:24:18 UTC
I'm on current master, bd40d70a1855df9c7de54a94c2f78b13c411113c


STEPS TO REPRODUCE
1. Put qgetenv("Foo").isEmpty() in two source files
2. Run clazy: clazy-standalone -export-fixes=/tmp/clazy.yaml -checks=qgetenv main.cpp mainwindow.cpp

OBSERVED RESULT

On stdout, diagnostics for both files are emitted - fine.
In /tmp/clazy.yaml are only diagnostics for the last source file (mainwindow.cpp) - Ops.


EXPECTED RESULT
/tmp/clazy.yaml should contain also diagnostics from the first source file.
Comment 1 Sergio Martins 2019-08-04 17:23:28 UTC
Git commit 7a3d9cc18d96d22f8f3613396fc21a03f7f023d4 by Sergio Martins.
Committed on 04/08/2019 at 17:21.
Pushed by smartins into branch 'master'.

Fix -export-fixes on clazy-standalone with multiple files

TUDiag was being exported multiple times rewriting the same file.
Export at the end only.

M  +5    -3    src/Clazy.cpp
M  +2    -0    src/Clazy.h
M  +15   -3    src/ClazyContext.cpp
M  +2    -0    src/ClazyContext.h
M  +8    -4    src/ClazyStandaloneMain.cpp
M  +18   -5    src/FixItExporter.cpp
M  +4    -4    src/FixItExporter.h

https://commits.kde.org/clazy/7a3d9cc18d96d22f8f3613396fc21a03f7f023d4