Skip to content

Add .clang-tidy and enable higher warning level #68

@mmha

Description

@mmha

The number of checks that we can use is highly limited since this is a C project, not C++ and we have to do a few things that are UB strictly speaking (like void * <-> function pointer casts), but there are a few things we can enable that are still useful. Examples:


Note that this requires the generation of a compilation database which is most easily achieved by passing -DCMAKE_EXPORT_COMPILE_COMMANDS=ON to CMake >= 3.4. This shouldn't be much of a problem, as the way I set up the testing matrix in #65 makes it easy to switch out different build tools for different jobs in the matrix (just add another Conan profile). This way we can use this feature on our CI and still ensure that the project builds correctly with older CMake versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions