PHPackages                             nette/code-checker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nette/code-checker

ActiveProject[Utility &amp; Helpers](/categories/utility)

nette/code-checker
==================

✅ Nette CodeChecker: A simple tool to check source code against a set of Nette coding standards.

v3.4.1(2w ago)911.7M↓89%30[1 PRs](https://github.com/nette/code-checker/pulls)6BSD-3-ClausePHPPHP &gt;= 8.0CI passing

Since Aug 18Pushed 2w ago18 watchersCompare

[ Source](https://github.com/nette/code-checker)[ Packagist](https://packagist.org/packages/nette/code-checker)[ RSS](/packages/nette-code-checker/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (24)Versions (35)Used By (6)

Code Checker
============

[](#code-checker)

[![Downloads this Month](https://camo.githubusercontent.com/6745a61327bac5c4ac870c8749393bf30db877607c2f32b3fb909b29c6838e83/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e657474652f636f64652d636865636b65722e737667)](https://packagist.org/packages/nette/code-checker)[![Tests](https://github.com/nette/code-checker/workflows/Tests/badge.svg?branch=master)](https://github.com/nette/code-checker/actions)[![Latest Stable Version](https://camo.githubusercontent.com/ecc09b48a8a45a71e5333592620a46ecd4e595b1fa3c1c2f247dae6cf209da95/68747470733a2f2f706f7365722e707567782e6f72672f6e657474652f636f64652d636865636b65722f762f737461626c65)](https://github.com/nette/code-checker/releases)[![License](https://camo.githubusercontent.com/fa7d5fcf2c84b580327af52da95dd751703af65f079dc3c5a0081beac0789718/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4e65772532304253442d626c75652e737667)](https://github.com/nette/code-checker/blob/master/license.md)

Introduction
------------

[](#introduction)

Code Checker is a command-line tool that scans your source code for common formal errors – and can fix many of them automatically. It works with PHP, Latte, NEON, JSON and YAML files, checking encoding, line endings, indentation, trailing whitespace and more.

It runs as a standalone application, not as a project dependency.

Documentation can be found on the [website](https://doc.nette.org/tools/code-checker). If you like it, **[please make a donation now](https://github.com/sponsors/dg)**. Thank you!

Installation
------------

[](#installation)

Install it globally via Composer:

```
composer global require nette/code-checker
```

Make sure your global Composer `bin` directory is in your [`PATH`](https://getcomposer.org/doc/03-cli.md#global). The `code-checker` command is then available from anywhere, on any operating system.

Alternatively, install it as a standalone project:

```
composer create-project nette/code-checker
```

It requires PHP 8.0 or higher.

Usage
-----

[](#usage)

By default, Code Checker runs in **read-only mode** and only reports the problems it finds:

```
code-checker
```

To actually repair the files, add `--fix`. **Back up your files first**, or run it on a clean working tree so you can review the changes afterwards with `git diff`:

```
code-checker --fix
```

You can limit the scan to a specific path, skip files, or run faster syntax-only checks:

```
code-checker -d src --ignore "temp/*"
code-checker --only-syntax
```

In read-only mode the tool exits with code `0` when everything is fine and `1` when any problem is found, so it fits nicely into CI pipelines.

Full list of options:

```
Usage: code-checker [options]

Options:
    -d              Folder or file to scan (default: current directory)
    -i | --ignore   Files to ignore
    -f | --fix            Fix the files
    -l | --eol            Normalize line endings to the system default
    --only-syntax         Check syntax only (faster)
    --no-progress         Do not show progress dots
    --version             Show version

```

What Code Checker Does
----------------------

[](#what-code-checker-does)

- checks the syntax of **PHP**, **Latte**, **NEON** and **JSON** files
- removes the [BOM](https://doc.nette.org/glossary#toc-bom)
- verifies that files are valid **UTF-8**
- checks for [control characters](https://doc.nette.org/glossary#toc-control-characters)
- detects malformed phpDoc comments around annotations (e.g. `/* @var` instead of `/** @var`)
- checks that PHP files declare `strict_types=1`
- enforces tabs for indentation in PHP, CSS, JS and TS files, and spaces in YAML
- removes trailing whitespace and blank lines at the end of files
- normalizes line endings to the system default (with the `-l` parameter)

###  Health Score

69

—

FairBetter than 100% of packages

Maintenance96

Actively maintained with recent releases

Popularity54

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~130 days

Recently: every ~244 days

Total

34

Last Release

19d ago

Major Versions

v2.13.0 → v3.0.02018-05-28

PHP version history (6 changes)v2.2.0PHP &gt;= 5.3.1

v2.7.0PHP &gt;= 5.4

v2.12.0PHP &gt;= 5.6

v3.0.0PHP &gt;= 7.1

v3.2.0PHP &gt;= 7.2

v3.3.0PHP &gt;= 8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f266513a3ca97500ec3d85d562b9279c7a6346358fe2b8d90390ece717a027?d=identicon)[david@grudl.com](/maintainers/david@grudl.com)

---

Top Contributors

[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (208 commits)")[![grogy](https://avatars.githubusercontent.com/u/1322983?v=4)](https://github.com/grogy "grogy (2 commits)")[![jakubs](https://avatars.githubusercontent.com/u/115272?v=4)](https://github.com/jakubs "jakubs (1 commits)")[![janpecha](https://avatars.githubusercontent.com/u/637719?v=4)](https://github.com/janpecha "janpecha (1 commits)")[![mzk](https://avatars.githubusercontent.com/u/382475?v=4)](https://github.com/mzk "mzk (1 commits)")[![vlastavesely](https://avatars.githubusercontent.com/u/22521379?v=4)](https://github.com/vlastavesely "vlastavesely (1 commits)")

---

Tags

checkercode-analysisnettenette-applicationphptoolcodenetteanalyse

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nette-code-checker/health.svg)

```
[![Health](https://phpackages.com/badges/nette-code-checker/health.svg)](https://phpackages.com/packages/nette-code-checker)
```

###  Alternatives

[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.3k72.7M765](/packages/nette-php-generator)[nette/web-project

Nette: Standard Web Project

10993.3k](/packages/nette-web-project)[nette/component-model

⚛ Nette Component Model

28817.0M106](/packages/nette-component-model)[nextras/datagrid

Datagrid component for Nette Framework.

71271.6k4](/packages/nextras-datagrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
