Forked from
Documentation / Docs / Developer Documentation
1663 commits behind the upstream repository.
-
totten authored
These examples are in a code block - which prevents wrapping. When reading on the published site, you have to scroll horizontally. Moving them to separate lines makes them more legible.
totten authoredThese examples are in a code block - which prevents wrapping. When reading on the published site, you have to scroll horizontally. Moving them to separate lines makes them more legible.
civilint.md 1.05 KiB
Civilint is a thin wrapper which calls jshint and PHP_CodeSniffer (with the coder ruleset).
Code-style tests ensure a consistent layout across all of the codebase, and they also identify some unsafe or confusing coding patterns. While working on a patch, you should run civilint to determine if the pending changes comply with style guides.
Note that civilint may be invoked a few different ways:
# (no arguments) – Check style of any uncommitted changes.
civilint
# Check style of a specific file (or list of files).
civilint some/file.php
# Check your last commit
git diff --name-only HEAD~1 | civilint -
# Check for changes in your branch (compared to master)
git diff --name-only master | civilint -
See also: