Bug 406645 - yaml diagnostics export
Summary: yaml diagnostics export
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: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-18 01:37 UTC by Christian Gagneraud
Modified: 2019-05-05 21:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.