| Summary: |
Invalid/truncated values in YAML file generated by -export-fixes= with clang diagnostics |
| Product: |
[Developer tools] clazy
|
Reporter: |
Nikolai Kosjar <nikolai.kosjar> |
| Component: |
general | Assignee: |
Sergio Martins <smartins> |
| Status: |
RESOLVED
FIXED
|
|
|
| Severity: |
normal
|
CC: |
chgans, smartins
|
| Priority: |
NOR
|
|
|
| Version First Reported In: |
unspecified | |
|
| Target Milestone: |
--- | |
|
| Platform: |
Other | |
|
| OS: |
Linux | |
|
|
Latest Commit:
|
https://commits.kde.org/clazy/afc877b17297aedf9621bd61d850f60b34aece8f
|
Version Fixed/Implemented In:
|
|
|
Sentry Crash Report:
|
|
| |
I'm on current clazy master, commit 7a3d9cc18d96d22f8f3613396fc21a03f7f023d4 -export-fixes in combination with e.g. -Weverything seems to produce wrong yaml files: /tmp/test % cat clazy.clang-diagnostic.cpp void g() { int *i; ++i; } /tmp/test % /d2/clazy/trunk/installs/Release/bin/clazy-standalone -export-fixes=/tmp/yaml.txt clazy.clang-diagnostic.cpp -- -Weverything /tmp/test/clazy.clang-diagnostic.cpp:1:6: warning: no previous prototype for function 'g' [-Wmissing-prototypes] void g() ^ /tmp/test/clazy.clang-diagnostic.cpp:4:7: warning: variable 'i' is uninitialized when used here [-Wuninitialized] ++i; ^ /tmp/test/clazy.clang-diagnostic.cpp:3:11: note: initialize the variable 'i' to silence this warning int *i; ^ = nullptr 2 warnings generated. ==> OK, output here looks fine /tmp/test % cat /tmp/yaml.txt --- MainSourceFile: '/tmp/test/clazy.clang-diagnostic.cpp' Diagnostics: - DiagnosticName: ' previous prototype for function ''g''' Message: 'no previous prototype for function ''g''' FileOffset: 5 FilePath: '/tmp/test/clazy.clang-diagnostic.cpp' Replacements: [] - DiagnosticName: 'riable ''i'' is uninitialized when used here' Message: 'variable ''i'' is uninitialized when used here' FileOffset: 29 FilePath: '/tmp/test/clazy.clang-diagnostic.cpp' Replacements: [] ... ==> Ops, DiagnosticName should be a name, but it's a truncated version of the diagnostic message. ==> Ops, Message is also truncated.