---
title: "Fixit 2: Meta’s next-generation auto-fixing linter"
description: "Fixit 2 is a partial rewrite of Meta's open-source Python auto-fixing linter, built on LibCST so rules can safely suggest and apply code replacements without regex or broken syntax."
url: "https://swe.quest/articles/fixit-2-meta-s-next-generation-auto-fixing-linter-71b7e5da0973759e"
canonical: "https://engineering.fb.com/2023/08/07/developer-tools/fixit-2-linter-meta/"
source: "Meta Engineering"
published: "2023-08-07"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 6
tags: ["static-analysis","python","developer-tools","refactoring","open-source"]
---

# Fixit 2: Meta’s next-generation auto-fixing linter

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2023-08-07, 6 min read, Announcement. Original: [https://engineering.fb.com/2023/08/07/developer-tools/fixit-2-linter-meta/](https://engineering.fb.com/2023/08/07/developer-tools/fixit-2-linter-meta/)

## Summary

Fixit 2 is a partial rewrite of Meta's open-source Python auto-fixing linter, built on LibCST so rules can safely suggest and apply code replacements without regex or broken syntax. Compared with Flake8, which only reports line/column, cannot suggest fixes and relies on the stdlib ast module, Fixit 2 adds local in-repo lint rules, hierarchical TOML configuration for monorepos, and an improved CLI and API. A rule takes under a dozen lines with inline VALID/INVALID test cases, and passing a replacement CST node to report() supplies an autofix. Applied broadly, \`fixit fix\` can also drive codemods across a large codebase while the rule stays in place to catch new occurrences.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Static analysis](https://swe.quest/tags/static-analysis.md) (Engineering practices)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)
- [Open source](https://swe.quest/tags/open-source.md) (Engineering practices)

## Prerequisites

- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- Linters
- Abstract syntax trees

## Keywords

Fixit, LibCST, Flake8, flake8-bugbear, PyPI, TOML

## Related posts

- [Automating dead code cleanup](https://swe.quest/articles/automating-dead-code-cleanup-e03bc4ba07b5bf1c.md): Meta Engineering · 2023-10-24 · Medium · 7 min read · Static analysis, Refactoring & migrations, Developer productivity, Python
  Meta's SCARF framework finds dead code by building a cross-language, symbol-level dependency graph from Glean and augmenting it with runtime usage data such as API endpoint logs, URI dispatch tables and async job invocations, then garbage-collects unreachable nodes, subgraphs and cycles.
- [Using Docker AI Tools for Devs to Provide Context for Better Code Fixes](https://swe.quest/articles/using-docker-ai-tools-for-devs-to-provide-context-for-better-code-fixes-c0163de9f3027f93.md): Docker · 2024-10-21 · Medium · 8 min read · AI for coding, AI agents, Static analysis, Containers, Python
  LLMs fix lint violations far better when given the surrounding code, so Docker Labs built a prompt-driven pipeline where each step runs in a container: Pylint produces a violation report, violations are loaded into SQLite, and Tree-sitter parses the project into an AST whose top-level statement ranges are indexed alongside the source.
- [Making Python in Zed Fun](https://swe.quest/articles/making-python-in-zed-fun-1887e7de7b4c59d3.md): Zed · 2025-10-02 · Easy · 5 min read · Python, Developer tools
  Zed reworked its Python support around a generic per-language toolchain selector backed by Microsoft's python-environment-tools, the same library Visual Studio Code uses for venv detection.
- [Automating product deprecation](https://swe.quest/articles/automating-product-deprecation-9c964f5b3db1d6d5.md): Meta Engineering · 2023-10-17 · Medium · 10 min read · Refactoring & migrations, Developer productivity, Static analysis, Developer tools
  SCARF (Systematic Code and Asset Removal Framework) is Meta's tooling for deprecating products by removing dead code and unused data, credited with deleting over 100M lines of code in five years and petabytes of data across 12.8M data types in 21 systems in one year.
- [How to Fix ESLint Violations with AI Assistance](https://swe.quest/articles/how-to-fix-eslint-violations-with-ai-assistance-74d040edadf71958.md): Docker · 2024-08-26 · Medium · 8 min read · AI for coding, AI agents, Static analysis, TypeScript, LLMs
  An LLM can produce correct fixes for ESLint violations once it has tools that supply minimal, precise context.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
