Firefox Source Docs Logo

Overview

  • A Glossary of Common Terms
  • A Quick Guide to Mozilla Applications

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

  • Governance
  • Firefox Front-end
  • DOM
  • Editor
  • Style system (CSS) & Layout
  • Graphics
  • Processes, Threads and IPC
  • Firefox DevTools Contributor Docs
  • Toolkit
  • SpiderMonkey
  • JS Loader
  • GeckoView
  • Fenix
  • Focus for Android
    • Architecture Decisions
    • Battery Debugging
    • Content blocking
    • Crash Reporting with Sentry
    • Development Custom GeckoView
    • Feature & Issue workflow
    • Running GeckoView in a debug environment
    • Home
    • Homescreen Tips
    • Multisession architecture
    • Recommended pre-push hook
    • Release Process
    • Release tracks
    • Removing strings
    • Sprint Process
    • Telemetry
    • UI Test
  • WebIDL
  • libpref
  • Networking
  • Remote Protocols
  • Services
  • Permissions
  • File Handling
  • Firefox on macOS
  • Firefox on Windows
  • Firefox AI Runtime
  • Accessibility
  • Media Playback
  • Code quality
  • Writing Rust Code
  • Rust Components
  • Gecko Profiler
  • Performance
  • Database bindings (SQLite, KV, …)
  • XPCOM
  • NSPR
  • Network Security Services (NSS)
  • Web Security Checks in Gecko

The Firefox Build System

  • Mach
  • Pushing to Try
  • Build System
  • Firefox CI and Taskgraph
  • Managing Documentation
  • Vendoring Third Party Components

Testing & Test Infrastructure

  • Automated Testing
  • Understanding Treeherder Results
  • Sheriffed intermittent failures
  • Turning on Firefox tests for a new configuration
  • Avoiding intermittent tests
  • Testing Policy
  • Configuration Changes
  • Browser chrome mochitests
  • Chrome Tests
  • Marionette
  • geckodriver
  • Test Verification
  • WebRender Tests
  • Mochitest
  • XPCShell tests
  • TPS
  • web-platform-tests
  • GTest
  • Fuzzing
  • Sanitizer
  • Performance Testing
  • Code coverage
  • Testing & Debugging Rust Code

Releases & Updates

  • Mozilla Update Infrastructure
  • Watershed Updates
  • Desupport Updates
  • Update Verify

Localization & Internationalization

  • Internationalization
  • Localization

Firefox and Python

  • mozbase
  • Using third-party Python packages

Metrics Collected in Firefox

  • Metrics
Firefox Source Docs
  • Focus for Android
  • Recommended pre-push hook
  • Report an issue / View page source

Recommended pre-push hook

If you want to reduce your PR turn-around time, I’d recommend adding a pre-push hook: this script will stop a push if the unit tests or linters fail, finding the failures before it hits TaskCluster (which takes forever to dig through the logs):

#!/bin/sh

./gradlew -q \
        checkstyle \
        ktlint \
        pmd \
        detektCheck \
        app:assembleFocusArmDebug


# Tasks omitted because they take a long time to run:
# - unit test on all variants
# - UI tests
# - lint (compiles all variants)

To use it:

  1. Create a file with these ^ contents (exclude the “`”) at <repo>/.git/hooks/pre-push

  2. Make it executable: chmod 755 <repo>/.git/hooks/pre-push

And it will run before pushes. Notes:

  • Run git push ... --no-verify to push without making the check

  • It takes ~30 seconds to run. If you think this hook takes too long, you can remove the unit test line and it becomes almost instant.

Previous Next

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