Bug 406645

Summary: yaml diagnostics export
Product: [Developer tools] clazy Reporter: Christian Gagneraud <chgans>
Component: generalAssignee: Sergio Martins <smartins>
Status: RESOLVED FIXED    
Severity: normal CC: smartins
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Christian Gagneraud 2019-04-18 01:37:57 UTC
It would be nice if clazy could export the fixes in the same format as clang-tidy:

 -export-fixes=<filename>     - 
                                 YAML file to store suggested fixes in. The
                                 stored fixes can be applied to the input source
                                 code with clang-apply-replacements.

This "fixes" database is more a diagnostic databse, as it contains entry for diagnostic even if they don't have fixits.
Comment 2 Sergio Martins 2019-04-21 19:24:12 UTC
(Linking https://github.com/KDE/clazy/pull/32 here)
Comment 3 Sergio Martins 2019-04-21 19:26:52 UTC
Thanks! This has been on my TODO list for some time now...

Once this one works I think we should remove the old one from clazy, and only permit via "clazy-standalone -export-fixes", as the old one has many bugs when headers are being rewritten in parallel with "make -jN"
Comment 4 Christian Gagneraud 2019-04-22 02:08:00 UTC
And there is this script that goes hand in hand with -export-fixes=<filename>, this first run clang-tify in parrallel, then collect, then merge all replacement files, and finally call clang-apply-replacement if asked to.

https://github.com/llvm-mirror/clang-tools-extra/blob/master/clang-tidy/tool/run-clang-tidy.py
Comment 5 Sergio Martins 2019-05-05 17:29:46 UTC
This is now done and merged into master, as it's working better than the previous version.

I haven't found any problems related to macros.

Feel free to push individual fixes to phabricator and we'll tackle them one by one

thanks!
Comment 6 Christian Gagneraud 2019-05-05 21:21:14 UTC
Thanks a lot for integrating my initial work.
I'll surely report any issue as i start to use this new feature on our code base.