Allows gathering fixes and applying them with clang-apply fixes.
Details
Diff Detail
Event Timeline
NIce! But please add error handling for YAML serialization and a bit more description of the new option.
clang-tidy/ClangTidy.cpp | ||
---|---|---|
374 | "return YAML.error();" seems like a good idea in case the file is not writable or any other error occurs. | |
clang-tidy/tool/ClangTidyMain.cpp | ||
82 | I'd say a few more words about why we need this and how can one use this file. |
clang-tidy/ClangTidy.cpp | ||
---|---|---|
374 | yaml::Output has no way to retrieve errors :( |
clang-tidy/ClangTidy.cpp | ||
---|---|---|
374 | Oh, didn't know that. In this case, you could use raw_fd_ostream::has_error() after manually closing it. It doesn't provide much detail about what was wrong, but it's better than nothing. WDYT? |
clang-tidy/ClangTidy.cpp | ||
---|---|---|
374 | raw_ostream will report a fatal error on close anyways when anything went wrong (and we didn't clear the error). The only thing we could do is provide a nicer message, not sure if that's worth the additional code. |
"return YAML.error();" seems like a good idea in case the file is not writable or any other error occurs.