Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Static Analysis & Code Quality
  3. clazy

clazy

C++

A Qt-oriented static code analyzer based on Clang that provides over 50 Qt-specific compiler warnings and automatic fix-its.

Visit WebsiteGitHubGitHub
746 stars97 forks0 contributors

What is clazy?

Clazy is a static code analyzer built as a Clang compiler plugin specifically for Qt-based C++ projects. It detects over 50 types of Qt-related issues, such as unnecessary memory allocations, API misuse, and suboptimal patterns, offering automatic fixes for many problems. It integrates directly into the build process to provide real-time feedback during compilation.

Target Audience

C++ developers working with Qt frameworks who want to improve code quality, performance, and adherence to Qt best practices. It is particularly useful for large Qt codebases where manual review is impractical.

Value Proposition

Developers choose Clazy because it provides Qt-aware static analysis that generic tools miss, with low false-positive rates and actionable fix-its. It seamlessly integrates into existing Clang/CMake/qmake workflows and offers fine-grained control over which checks to enable.

Overview

Qt-oriented static code analyzer based on the Clang framework

Use Cases

Best For

  • Identifying performance bottlenecks in Qt container usage
  • Detecting API misuse in Qt signal/slot connections
  • Enforcing consistent QString handling to avoid allocations
  • Refactoring old Qt code to modern C++ standards
  • Integrating static analysis into CI pipelines for Qt projects
  • Learning Qt best practices through compiler warnings

Not Ideal For

  • C++ projects that do not use the Qt framework, as all checks are Qt-specific and irrelevant for other libraries.
  • Teams with strict build time constraints that rely heavily on pre-compiled headers or ccache for fast compilation.
  • Development on platforms other than Linux, macOS, or Windows, since official support is limited and untested.
  • Projects using compilers other than Clang (e.g., GCC or MSVC standalone), as the plugin integrates only with Clang.

Pros & Cons

Pros

Qt-Aware Static Analysis

Provides over 50 Qt-specific checks, such as detecting unnecessary QString allocations and misused signal-slot connections, which generic tools like clang-tidy miss, as listed in the README.

Automatic Fix-It Support

Many checks include automatic code refactoring capabilities, like fixing old-style connect syntax or adding missing QStringRef, directly from compiler warnings without manual intervention.

Configurable Check Levels

Checks are organized into levels 0-2 and manual, allowing granular control to start with safe checks and gradually enable more aggressive ones, reducing false positives.

Standalone Analysis Mode

Can run over JSON compilation databases without building the project via clazy-standalone, enabling integration into CI pipelines or pre-commit hooks for static analysis only.

Cons

Complex Setup Process

Requires building and installing Clang from source on many platforms, with lengthy, platform-specific instructions in the README that are error-prone and time-consuming.

Clang-Only Dependency

Tied exclusively to the Clang compiler ecosystem; projects using GCC or other compilers cannot integrate Clazy without switching toolchains, limiting flexibility.

Build Performance Overhead

Disables optimizations like pre-compiled headers and ccache, as noted in the troubleshooting section, which can significantly slow down compilation times in large projects.

Limited Platform Support

Officially tested only on Linux, macOS, and Windows; other platforms are unsupported and rely on community patches, as stated in the README.

Frequently Asked Questions

Quick Stats

Stars746
Forks97
Contributors0
Open Issues0
Last commit18 days ago
CreatedSince 2015

Tags

#clang#qt#compiler-plugin#c-plus-plus#code-quality#qml#linting#static-analysis

Built With

L
LLVM
N
Ninja
C
Clang
C
CMake

Links & Resources

Website

Included in

Static Analysis & Code Quality14.5k
Auto-fetched 23 hours ago

Related Projects

PHP ParserPHP Parser

A PHP parser written in PHP

Stars17,454
Forks1,133
Last commit1 month ago
TypeScript ESLintTypeScript ESLint

:sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript

Stars16,366
Forks2,976
Last commit1 day ago
pyrightpyright

Static Type Checker for Python

Stars15,596
Forks1,804
Last commit1 day ago
ReviewdogReviewdog

🐶 Automated code review tool integrated with any code analysis tools regardless of programming language

Stars9,542
Forks490
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub