Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Developer Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
brienne
Developer Documentation
Commits
04929534
Commit
04929534
authored
7 years ago
by
mickadoo
Browse files
Options
Downloads
Patches
Plain Diff
Add civilint page
parent
43e7b1cc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/tools/civilint.md
+24
-0
24 additions, 0 deletions
docs/tools/civilint.md
with
24 additions
and
0 deletions
docs/tools/civilint.md
0 → 100644
+
24
−
0
View file @
04929534
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:
```
bash
civilint
# (no arguments) – Check style of any uncommitted changes.
civilint some/file.php
# Check style of a specific file (or list of files).
git diff
--name-only
origin/4.6.. | civilint -
# Check changed files
```
See also:
-
[
CiviCRM Coding Standards
](
https://wiki.civicrm.org/confluence/display/CRMDOC/PHP+Code+and+Inline+Documentation
)
-
[
CiviCRM Javascript Standards
](
https://wiki.civicrm.org/confluence/display/CRMDOC/Javascript+Reference
)
-
[
Drupal Coding Standards
](
https://www.drupal.org/docs/develop/standards/coding-standards
)
-
[
PHP_CodeSniffer
](
https://github.com/squizlabs/PHP_CodeSniffer
)
-
[
coder
](
https://github.com/civicrm/coder
)
-
[
jshint
](
http://jshint.com/
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment