Skip to content

duplicated file name in tidy comment #63

@2bndy5

Description

@2bndy5

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)

Previous behavior

Before #49 the comment used a single list item for each file:

clang-tidy reports: 4 concern(s)

This old behavior doesn't show the same number of list items corresponding to the total "clang-tidy concerns" number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions