Firefox Source Docs Logo

Getting Started

  • Getting Set Up To Work On The Firefox Codebase

Working On Firefox

  • Working on Firefox
  • Bug Handling

Firefox User Guide

  • Firefox DevTools User Docs

Source Code Documentation

  • Firefox
  • DOM
  • Editor
  • Layout & CSS
  • Graphics
  • Processes, Threads and IPC
  • Firefox DevTools Contributor Docs
  • Toolkit
  • SpiderMonkey
  • Welcome to GeckoView’s documentation!
  • WebIDL
  • libpref
  • Networking
  • Remote Protocols
  • Services
  • File Handling
  • Firefox on macOS
  • Accessibility
  • Code quality
    • Static Analysis
      • Existing Infrastructure and Analysis
      • Writing New Firefox-Specific Static Analysis Checks
        • Using clang-query
        • Using Compiler Explorer
        • Writing Matchers
        • Matcher Cookbook
        • Adding a check
        • Advanced Check Features
    • Linting
    • Coding style
  • Writing Rust Code
  • Gecko Profiler
  • Performance
  • XPCOM
  • Network Security Services (NSS)

The Firefox Build System

  • Mach
  • Pushing to Try
  • Build System
  • TaskCluster Task-Graph Generation
  • Managing Documentation

Testing & Test Infrastructure

  • Testing Policy
  • Configuration Changes
  • Marionette
  • geckodriver
  • XPCShell tests
  • GTest
  • Fuzzing
  • Sanitizer
  • Performance Testing
  • Code coverage
  • Testing & Debugging Rust Code

Localization & Internationalization

  • Internationalization
  • Localization

Firefox and Python

  • mozbase
  • Using third-party Python packages

Metrics Collected in Firefox

  • Metrics
Firefox Source Docs
  • »
  • Code quality »
  • Static Analysis »
  • Writing New Firefox-Specific Static Analysis Checks
  • View page source

Writing New Firefox-Specific Static Analysis Checks¶

This section is intended to help Mozilla engineers either casually play with writing a static analysis check or seriously develop one we can land and run internally. While being written for internal consumption, it’s broadly applicable outside Mozilla.

  • Using clang-query
    • Recommended Boilerplate
    • clang-query Options
    • Patches
  • Using Compiler Explorer
    • Quick-Start
    • Compiler Explorer Customizations
  • Writing Matchers
    • Types of Matchers
    • Example of Iterative Matcher Development
  • Matcher Cookbook
  • Adding a check
    • Boilerplate Steps to Add a New Check
    • Converting your matcher to C++
    • Wiring up Warnings and Errors
    • Running it on Central
  • Advanced Check Features
    • Adding Tests
    • Using Bind To Output More Useful Information
    • Repeated matcher calls
    • Allow-listing existing callsites
    • Custom Annotations
Previous Next

Built with Sphinx using a theme provided by Read the Docs.