Skip to content

clang-tidy -export-fix #20

@Altyrost

Description

@Altyrost

I'm trying to replace in QtCreator the invocation of clang-tidy with clangd-tidy because it's really faster.

In the standalone clang-tidy, there's a -export-fix that exports a yaml file looking like this:

---
MainSourceFile:  '/project/path/src/main.cpp'
Diagnostics:
  - DiagnosticName:  modernize-use-trailing-return-type
    DiagnosticMessage:
      Message:         use a trailing return type for this function
      FilePath:        '/project/path/src/main.cpp'
      FileOffset:      501
      Replacements:
        - FilePath:        '/project/path/src/main.cpp'
          Offset:          497
          Length:          3
          ReplacementText: auto
        - FilePath:        '/project/path/src/main.cpp'
          Offset:          507
          Length:          0
          ReplacementText: ' -> int'
    Level:           Warning
    BuildDirectory:  '/project/path/build/Desktop_Qt_6_8_2-Debug'
...

Is there a way to generate that with clangd-tidy ? If not, could you give me pointers about how to implement it myself ? (I have no experience with LSP)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions