Workflow

8 Best Tools to Run Checks on Changed Files in 2026

Discover the best tools to run checks on changed files in 2026. Compare lint-staged, Nx, Turborepo, Bazel and more to cut feedback time.

On this page
  1. Key takeaways
  2. What tools that run checks on changed files are for
  3. Quick comparison
  4. The best tools to run checks on changed files
  5. How to choose
  6. How we chose
  7. FAQ
  8. Sources

Key takeaways

  • Scoping checks to changed files cuts feedback time on large repositories.
  • Some tools target git hooks, others handle task graphs and caching.
  • Pick based on your stack, team size, and how much setup you accept.
  • Most options here are open source and run locally or in CI.
  • Combine a hook runner with a task runner for the widest coverage.

What tools that run checks on changed files are for

These tools limit formatters, linters, and tests to the files a commit actually touches. Instead of running the whole suite on every change, they compute a smaller set of work. That keeps local commits fast and keeps CI jobs focused.

You need them when a repository grows and full runs get slow. Small projects with a handful of files rarely benefit. If your whole check suite finishes in seconds, adding another layer of tooling just adds config to maintain.

Quick comparison

ToolBest forStarting priceFree plan
lint-stagedGit hook file filteringNot includedNot included
nano-stagedTiny hook runnerNot includedNot included
pre-commitMulti-language git hooksNot includedNot included
NxMonorepo task graphsNot includedNot included
TurborepoFast task cachingNot includedNot included
BazelLarge scale buildsNot includedNot included
WatchmanFile change watchingNot includedNot included
LefthookFast parallel hooksNot includedNot included

The best tools to run checks on changed files

1. lint-staged

  • Official site: https://github.com/lint-staged/lint-staged
  • Best for: Git hook file filtering
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Runs configured tasks only on staged files; Simple config in package.json or a dotfile
  • Cons: Requires a separate git hook manager; Node.js focused

lint-staged is a Node.js tool that runs commands against files staged for commit. You map glob patterns to commands, and it passes the matching staged file paths to each command. It pairs with a hook manager such as Husky or Lefthook to trigger on commit. It is open source and installs through npm.

It fits JavaScript and TypeScript teams that want formatters and linters to touch only what they staged. Compared with full task runners, it does one job and does not build a dependency graph. The limit is scope: it handles staged files, not the wider project graph, and you still need a hook manager to call it.

2. nano-staged

  • Official site: https://github.com/usmanyunusov/nano-staged
  • Best for: Tiny hook runner
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Very small dependency footprint; Reads config from common files
  • Cons: Fewer features than larger runners; Limited to staged file workflows

nano-staged is a small tool that runs commands on staged files, similar in purpose to lint-staged but with a lighter footprint. It reads configuration from package.json or a dedicated config file and passes matched file paths to your commands. It is open source and aimed at projects that want minimal dependencies.

It suits teams that find larger hook runners heavier than needed. The difference is size and simplicity: fewer options, less surface area. The honest limit is that it covers staged file commands only, so anything needing a full project graph belongs with a task runner instead.

3. pre-commit

  • Official site: https://pre-commit.com
  • Best for: Multi-language git hooks
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Manages hooks across many languages; Runs only on changed files by default
  • Cons: Python based for its own install; Hook setup can take time to learn

pre-commit is a framework for managing and running git hooks, written in Python. You declare hooks in a config file, and it runs them against files changed in a commit. It supports hooks written in many languages and can install and manage their environments. It is open source.

It fits polyglot repositories where hooks come from different ecosystems. Compared with Node-only runners, it handles more languages but needs Python available. The limit is that it focuses on pre-commit hooks; broader build and test orchestration is left to other tools.

4. Nx

  • Official site: https://nx.dev
  • Best for: Monorepo task graphs
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Understands project and task dependencies; Can run only affected tasks
  • Cons: More configuration for small repos; Concepts take time to learn

Nx is a build system for monorepos that models projects and their dependencies as a graph. It can determine which projects are affected by a change and run tasks only for those. It supports caching and distributed task execution. It is open source with plugins for several frameworks.

It fits larger monorepos where many projects share code. Unlike simple hook runners, it reasons about the dependency graph, so a change in one library can trigger checks in its dependents. The limit is learning cost: small repositories may not gain enough to justify the setup.

5. Turborepo

  • Official site: https://turborepo.dev/
  • Best for: Fast task caching
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Caches task outputs to skip repeat work; Simple pipeline configuration
  • Cons: Graph awareness is lighter than Nx; Best suited to JavaScript projects

Turborepo is a build system for JavaScript and TypeScript monorepos. You define tasks in a config file, and it runs them across packages while caching results so unchanged work is skipped. It can scope runs to changed packages. It is open source.

It suits JS monorepos that want faster task runs with modest config. Compared with Nx, its graph handling is lighter, which keeps setup simpler but offers less for complex cross-project dependencies. The limit is ecosystem focus: it is built around JavaScript tooling.

6. Bazel

  • Official site: https://bazel.build
  • Best for: Large scale builds
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Precise incremental and cached builds; Supports many languages
  • Cons: Steep learning curve; Requires build file discipline

Bazel is an open source build and test system that tracks inputs and outputs precisely. It reruns only actions whose inputs changed, which naturally scopes checks to affected targets. It supports multiple languages and remote caching. Targets are declared in build files.

It fits large, multi-language codebases that need strict reproducibility. Compared with lighter runners, it demands more upfront work: every target needs a build file. The limit is adoption cost, since teams must commit to its model before they see the payoff.

7. Watchman

  • Official site: https://facebook.github.io/watchman/
  • Best for: File change watching
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Watches large trees efficiently; Can trigger commands on changes
  • Cons: Not a linter or test runner itself; Needs integration work

Watchman is a file watching service that records changes in a directory tree. It can trigger commands when matching files change, which lets you wire up formatters, linters, or tests. It is open source and used as a building block by other tools.

It fits teams that want to react to edits as they happen rather than at commit time. Unlike the other tools here, it does not run checks itself; it reports changes and leaves the work to you. The limit is integration: expect to write the glue that maps changes to commands.

8. Lefthook

  • Official site: https://github.com/evilmartians/lefthook
  • Best for: Fast parallel hooks
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Runs hook commands in parallel; Single binary with simple config
  • Cons: Config syntax takes a moment to learn; Still needs commands defined

Lefthook is a git hooks manager that runs commands on changed files. You define hooks in a YAML file, and it can run jobs in parallel and pass staged file lists to commands. It ships as a single binary and is open source, so it works across languages.

It fits teams that want fast hooks without a Node dependency. Compared with lint-staged, it manages the hook itself and runs jobs in parallel, but you still define the underlying commands. The limit is that it orchestrates hooks, not project-wide task graphs.

How to choose

  • Check your stack first: Node teams often start with lint-staged or nano-staged, while polyglot repos may prefer pre-commit.
  • Decide between hooks and task graphs. Hook runners handle staged files; Nx, Turborepo, and Bazel reason about project dependencies.
  • Match team size. Large monorepos gain from caching and affected-task logic; small repos may only need a hook runner.
  • Weigh learning curve. Bazel and Nx ask for more upfront setup than a single config file.
  • Consider lock-in and support. Open source tools vary in how much they depend on a specific ecosystem.

How we chose

These tools were selected from their official product pages and documentation, based on fit for scoping checks to changed files, active maintenance signals, and clear use cases. Each entry describes what the vendor states it does in general terms. No documentation review was performed, and no performance claims are made here.

FAQ

What does it mean to run checks on changed files?

It means limiting formatters, linters, or tests to the files a commit touches instead of the whole repository. This shortens feedback loops and avoids rerunning work on untouched code.

Do I need a git hook manager to use lint-staged?

Yes. lint-staged runs commands on staged files, but a hook manager such as Husky or Lefthook triggers it at commit time. Some teams also call it from CI scripts.

Can Nx and Turborepo replace a hook runner?

They can run affected tasks, but many teams still use a hook runner for quick pre-commit checks. The two layers complement each other: fast local hooks plus broader task runs.

Is Bazel a good fit for a small project?

Usually not. Bazel rewards large, multi-language codebases with strict build rules, and its setup cost is high. Smaller projects often do fine with a lightweight hook runner.

Does Watchman run linters or tests by itself?

No. Watchman watches files and can trigger commands when they change. You connect it to your own scripts to run formatters, linters, or tests.

Sources