ekino / Phpstan Banned Code
Licence: mit
Detect banned code through PHPStan
Stars: ✭ 123
Labels
Projects that are alternatives of or similar to Phpstan Banned Code
Fastp
An ultra-fast all-in-one FASTQ preprocessor (QC/adapters/trimming/filtering/splitting/merging...)
Stars: ✭ 966 (+685.37%)
Mutual labels: quality
Dart Code Metrics
Software analytics tool that helps developers analyse and improve software quality.
Stars: ✭ 96 (-21.95%)
Mutual labels: quality
Cppdep
C/C++ Dependency Analyzer: a rewrite of John Lakos' dep_utils (adep/cdep/ldep) from "Large-Scale C++ Software Design"
Stars: ✭ 115 (-6.5%)
Mutual labels: quality
Seriouscode
This header file enforces Clang warnings to bu turned-on for specific flags (almost everyone, at least each one I was able to find).
Stars: ✭ 68 (-44.72%)
Mutual labels: quality
Gradle Quality Plugin
Gradle quality plugin for Java and Groovy
Stars: ✭ 97 (-21.14%)
Mutual labels: quality
System.js
The library System.js designed to improve the quality of writing JavaScript source code. It contains features that allow you refactor source code. Thanks to the clear and readable functions, the code will be good understood and supported accordingly.
Stars: ✭ 6 (-95.12%)
Mutual labels: quality
Styleflow
StyleFlow: Attribute-conditioned Exploration of StyleGAN-generated Images using Conditional Continuous Normalizing Flows (ACM TOG 2021)
Stars: ✭ 1,982 (+1511.38%)
Mutual labels: quality
Qa Checks V4
PowerShell scripts to ensure consistent and reliable build quality and configuration for your servers
Stars: ✭ 94 (-23.58%)
Mutual labels: quality
Qualinsight Plugins Sonarqube Badges
Plugin for SonarQube that generates badges displaying information about a project's or view's quality.
Stars: ✭ 108 (-12.2%)
Mutual labels: quality
Pytest Monitor
Pytest plugin for analyzing resource usage during test sessions
Stars: ✭ 105 (-14.63%)
Mutual labels: quality
Sonarondocker
🐳 📡 Docker way of running SonarQube + any DB
Stars: ✭ 25 (-79.67%)
Mutual labels: quality
Render Timing For Unity
GPU time metric for Unity apps (currently limited to Android/GLES)
Stars: ✭ 97 (-21.14%)
Mutual labels: quality
Code Pal For Abap
code pal for ABAP is a highly configurable engine, fully integrated into the ABAP development framework ensuring Cloud’s built-in quality.
Stars: ✭ 121 (-1.63%)
Mutual labels: quality
PHPStan Banned Code
This library is based on PHPStan to detect calls to specific functions you don't want in your project. For instance, you can add it in your CI process to make sure there is no debug/non standard code (like var_dump, exit, ...).
Basic usage
To use this extension, require it using Composer:
composer require --dev ekino/phpstan-banned-code
When you use https://github.com/phpstan/extension-installer you are done.
If not, include extension.neon
in your project's PHPStan config:
includes:
- vendor/ekino/phpstan-banned-code/extension.neon
Advanced usage
You can configure this library with parameters:
parameters:
banned_code:
nodes:
# enable detection of echo
-
type: Stmt_Echo
functions: null
# enable detection of eval
-
type: Expr_Eval
functions: null
# enable detection of die/exit
-
type: Expr_Exit
functions: null
# enable detection of a set of functions
-
type: Expr_FuncCall
functions:
- dd
- debug_backtrace
- dump
- exec
- passthru
- phpinfo
- print_r
- proc_open
- shell_exec
- system
- var_dump
# enable detection of `use Tests\Foo\Bar` in a non-test file
use_from_tests: true
type
is the returned value of a node, see the method getType()
.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].