platisd / clang-tidy-pr-comments

Turn clang-tidy warnings and fixes to comments in your pull request
MIT License
41 stars 21 forks source link

Wrong suggestions #34

Closed rhaschke closed 2 years ago

rhaschke commented 2 years ago

Sometimes I get incorrect suggestions. For example, for this PR the suggestion is:

-   auto findIteratorFor = [](const InterfaceState* state, const Interface& interface) {
+   auto findItfind_iterator_forconst InterfaceState* state, const Interface& interface) {

instead of the following one, which is correctly produced by clang-apply-replacements from the provided fixes file:

-   auto findIteratorFor = [](const InterfaceState* state, const Interface& interface) {
+   auto find_iterator_for = [](const InterfaceState* state, const Interface& interface) {

Looks like the replacement is shifted by 6 characters in the suggestion.

platisd commented 2 years ago

Also here apparently. :thinking:

oleg-derevenetz commented 2 years ago

Hi all,

The problem here is that the container.cpp contains multibyte symbols (for example, at lines 76, 78 and 82). While this Action reads this file in UTF-8 mode, clang-tidy apparently reads it in the latin-1 mode, hence this problem.

oleg-derevenetz commented 2 years ago

@rhaschke Try to use Action URL from #35, namely this URL:

uses: oleg-derevenetz/clang-tidy-pr-comments@multibyte-fix

This version should work. If it works, then this PR may be merged by @platisd.

platisd commented 2 years ago

Nicely done as always @oleg-derevenetz 👌 @rhaschke could you please confirm if oleg-derevenetz/clang-tidy-pr-comments@multibyte-fix fixes your issue?

rhaschke commented 2 years ago

Thanks to both of you for this super-fast fix!