noverify

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 2 Imported by: 0

README

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.
  4. Auto fixes for some warnings (when -fix flag is provided).

Default lints

NoVerify by default has the following checks:

  • Unreachable code
  • Array access to non-array type
  • 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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
example
src
cmd
cmd/embeddedrules
Package embeddedrules Code generated by go-bindata.
Package embeddedrules Code generated by go-bindata.
cmd/stubs
Package stubs Code generated by go-bindata.
Package stubs Code generated by go-bindata.
git
ir
Code generated by the `ir/codegen` package.
Code generated by the `ir/codegen` package.
ir/irutil
Code generated by the `ir/codegen` package.
Code generated by the `ir/codegen` package.
linttest
Package linttest provides linter testing utilities.
Package linttest provides linter testing utilities.
php/parser/walker
Package walker declares walking behavior
Package walker declares walking behavior
phpgrep
Package phpgrep is a library for searching PHP code using syntax trees.
Package phpgrep is a library for searching PHP code using syntax trees.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL