Skip to content

Pretty fast linter (code static analysis utility) for PHP

License

Notifications You must be signed in to change notification settings

Dmitrii-Stukalov/noverify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoVerify Build Status

NoVerify is a PHP linter: it finds possible bugs and style violations in your code.

  • NoVerify has no config: any reported issue in your PHPDoc or PHP code must be fixed.
  • NoVerify aims to understand PHP code at least as well as PHPStorm does. If it behaves incorrectly or suboptimally, please report issue.
  • This tool is written in Go and uses z7zmey/php-parser.

Features

  1. Fast: analyze ~100k LOC/s (lines of code per second) on Core i7
  2. Incremental: can analyze changes in git and show only new reports. Indexing speed is ~1M LOC/s.
  3. Experimental language server for VS Code and other editors that support language server protocol.

Default lints

NoVerify by default has the following checks:

  • Unreachable code
  • Array access to non-array type (beta)
  • Too few arguments when calling a function/method
  • Call to undefined function/method
  • Fetching of undefined constant/class property
  • Class not found
  • PHPDoc is incorrect
  • Undefined variable
  • Variable not always defined
  • Case without "break;"
  • Syntax error
  • Unused variable
  • Incorrect access to private/protected elements
  • Incorrect implementation of IteratorAggregate interface
  • Incorrect array definition, e.g. duplicate keys

User Guide

Using NoVerify as linter:

Extending NoVerify:

Using NoVerify as PHP language server:

Contribute

Just find good first issue, fix it and make pull request.

About

Pretty fast linter (code static analysis utility) for PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 90.5%
  • Yacc 8.1%
  • Ragel 1.1%
  • JavaScript 0.2%
  • HTML 0.1%
  • Makefile 0.0%