Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sanmai/linter
Simple PHP source code linter with zero dependencies
https://github.com/sanmai/linter
linter php
Last synced: about 1 month ago
JSON representation
Simple PHP source code linter with zero dependencies
- Host: GitHub
- URL: https://github.com/sanmai/linter
- Owner: sanmai
- License: apache-2.0
- Created: 2019-09-20T00:47:44.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-17T10:16:12.000Z (11 months ago)
- Last Synced: 2024-11-15T21:53:06.140Z (about 2 months ago)
- Topics: linter, php
- Language: PHP
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Coverage Status](https://coveralls.io/repos/github/sanmai/linter/badge.svg?branch=master)](https://coveralls.io/github/sanmai/linter?branch=master)
# Simple PHP source code linter with zero dependencies
This is a very bare (really just 20 lines of code, comments included) yet very thoroughly tested (100% [MSI](https://medium.com/@maks_rafalko/infection-mutation-testing-framework-c9ccf02eefd1)) programmatic source code linter. Give it a piece of source code from a file or as a string, and it will tell you if this is a valid PHP or not. But do not forget to include the opening `foundErrors();
var_dump($result);
// bool(false)
``````php
$linter = new \Linter\StringLinter('foundErrors();var_dump($result);
// bool(true)
```That's it!