Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicated file name in tidy comment #63

Closed
2bndy5 opened this issue Feb 10, 2024 · 0 comments · Fixed by #64
Closed

duplicated file name in tidy comment #63

2bndy5 opened this issue Feb 10, 2024 · 0 comments · Fixed by #64
Labels
bug Something isn't working

Comments

@2bndy5
Copy link
Contributor

2bndy5 commented Feb 10, 2024

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.

@2bndy5 2bndy5 added the bug Something isn't working label Feb 10, 2024
2bndy5 added a commit that referenced this issue Feb 10, 2024
resolves #63

Technically, this fixes an undesired behavior introduced in #49.
2bndy5 added a commit that referenced this issue Feb 10, 2024
* remove duplicated file name in tidy comment
  resolves #63
  Technically, this fixes an undesired behavior introduced in #49.
* use MD bold syntax when not using raw HTML syntax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant