-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Since the refactor in #49 the way thread comments are assembled has changed.
Current problem
In a new test, I noticed the clang-tidy comment now shows the file name twice:
clang-tidy reports: 4 concern(s)
-
src/demo.cpp
src/demo.cpp:3:10: warning: [modernize-deprecated-headers]
inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead
#include <stdio.h> ^~~~~~~~~ <cstdio>
-
src/demo.cpp
src/demo.cpp:8:5: warning: [modernize-use-trailing-return-type]
use a trailing return type for this function
int main(){ ~~~ ^ auto -> int
-
src/demo.cpp
src/demo.cpp:10:13: warning: [readability-braces-around-statements]
statement should be inside braces
for (;;) break; ^ {
-
src/demo.hpp
src/demo.hpp:11:11: warning: [modernize-use-trailing-return-type]
use a trailing return type for this function
void *not_useful(char *str){useless = str;} ~~~~~~^ auto -> void *
Proposed solution
I think it will be enough to only list the file name once in a way that favors the line and column number:
clang-tidy reports: 4 concern(s)
-
src/demo.cpp:3:10: warning: [modernize-deprecated-headers]
inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead
#include <stdio.h> ^~~~~~~~~ <cstdio>
-
src/demo.cpp:8:5: warning: [modernize-use-trailing-return-type]
use a trailing return type for this function
int main(){ ~~~ ^ auto -> int
-
src/demo.cpp:10:13: warning: [readability-braces-around-statements]
statement should be inside braces
for (;;) break; ^ {
-
src/demo.hpp:11:11: warning: [modernize-use-trailing-return-type]
use a trailing return type for this function
void *not_useful(char *str){useless = str;} ~~~~~~^ auto -> void *
Previous behavior
Before #49 the comment used a single list item for each file:
clang-tidy reports: 4 concern(s)
-
src/demo.cpp
src/demo.cpp:3:10: warning: [modernize-deprecated-headers]
inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead
#include <stdio.h> ^~~~~~~~~ <cstdio>
src/demo.cpp:8:5: warning: [modernize-use-trailing-return-type]
use a trailing return type for this function
int main(){ ~~~ ^ auto -> int
src/demo.cpp:10:13: warning: [readability-braces-around-statements]
statement should be inside braces
for (;;) break; ^ {
-
src/demo.hpp
src/demo.hpp:11:11: warning: [modernize-use-trailing-return-type]
use a trailing return type for this function
void *not_useful(char *str){useless = str;} ~~~~~~^ auto -> void *
This old behavior doesn't show the same number of list items corresponding to the total "clang-tidy concerns" number.