awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
squizlabs avatar

squizlabs/PHP_CodeSniffer

0
View on GitHub↗
10,771 星标·1,451 分支·PHP·BSD-3-Clause·7 次浏览

PHP CodeSniffer

PHP_CodeSniffer is a static analysis tool, coding standard linter, and command-line validator for PHP. It scans files and directories to detect and report formatting errors and language-specific coding violations without executing the code.

The project functions as an automated code formatter capable of correcting detected style and formatting violations to bring source code into compliance with defined standards. It uses token-based lexical analysis to match code patterns against rule sets, ensuring consistency across a codebase.

The tool provides comprehensive capabilities for recursive file auditing, severity-based result filtering, and customizable report generation. It includes automation features for continuous integration, such as exit code control, file exclusion patterns, and inline violation suppression.

Users can manage analysis settings through project configuration files, global preferences, and custom standard path management.

Features

  • Pattern Violation Scanning - Scans source code for structures that violate predefined coding standards and formatting rules.
  • Static Code Analysis - Performs static scanning of PHP files to identify syntax violations and style errors without execution.
  • Automated Lint Fixes - Corrects detected style and formatting errors automatically to bring code into compliance.
  • CLI Coding Standard Validators - Provides a command-line interface for auditing PHP source code against defined sets of rules.
  • PHP Formatters - Automatically corrects coding standard violations to bring PHP source code into compliance.
  • PHP Linters - Tokenizes PHP code to detect and report violations of defined coding style guides.
  • Lexical Tokenizers - Converts raw PHP source code into a stream of atomic tokens for structural inspection.
  • Token Manipulation - Implements token manipulation to automatically correct formatting violations and rewrite source files.
  • Coding Standards Enforcement - Enforces adherence to specific style guides and organizational standards across a PHP codebase.
  • Coding Standards - Validates PHP code against one or more standards to ensure consistency and adherence to style guides.
  • Rule-Based Token Analysis - Uses token-based lexical analysis to identify where PHP code deviates from defined formatting rules.
  • Analysis File Extension Filters - Restricts analysis to specific file types by matching extensions to ensure only relevant files are scanned.
  • File Exclusion Patterns - Skips specific directories or files using regular expression patterns to avoid scanning irrelevant code.
  • Project Configuration - Supports loading analysis settings and coding standards from project-specific configuration files.
  • Build Exit Code Controls - Allows configuring the return code for automated builds to prevent failures when only warnings are detected.
  • Configuration File Loading - Loads rule definitions from external configuration files to define the analysis profile.
  • Continuous Integration Checks - Integrates as a check within CI pipelines to catch style and syntax errors before deployment.
  • Language Version Targeting - Allows the analyzer to apply rules compatible with the specific version of PHP used in a project.
  • Recursive Directory Traversers - Recursively scans nested directory structures to identify files for analysis based on extensions.
  • Rule Subset Selections - Enables running a selected subset of rules or excluding specific checks to isolate particular types of violations.
  • Violation Reporters - Processes detected coding violations into various visual formats for human reading or machine automation.
  • Violation Severity Management - Evaluates violation priority levels to determine which errors trigger build failures or are reported.
  • Rule Suppression Comments - Provides inline source code comments to disable specific linting rules for targeted lines or blocks.
  • Analysis Result Filtering - Adjusts which errors and warnings are displayed by filtering based on severity levels or hiding warnings.
  • Detector Severity Thresholds - Filters analysis detectors based on a minimum severity level to hide low-priority findings.

Star 历史

squizlabs/php_codesniffer 的 Star 历史图表squizlabs/php_codesniffer 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

PHP CodeSniffer 的开源替代方案

相似的开源项目,按与 PHP CodeSniffer 的功能重合度排序。
  • checkstyle/checkstylecheckstyle 的头像

    checkstyle/checkstyle

    8,867在 GitHub 上查看↗

    Checkstyle is a Java static analysis tool and linter designed to identify and enforce coding standards and best practices. It functions as a code quality auditor and Javadoc validation tool, checking source code against configurable rulesets to ensure structural and stylistic consistency. The project allows for the creation of custom linting rules by extending a core API to inspect the abstract syntax tree. It further enables specialized validation through the use of XPath expressions to query the syntax tree for specific code patterns and violations. Capability areas include the enforcement

    Javacode-qualitycommand-line-toolhacktoberfest
    在 GitHub 上查看↗8,867
  • carthage-software/magocarthage-software 的头像

    carthage-software/mago

    2,867在 GitHub 上查看↗

    Mago is a PHP static analysis tool, linter, and code formatter. It detects type errors, dead code, and logic bugs through advanced type inference and flow analysis, while providing a deterministic engine to rewrite source files according to style guides. The project distinguishes itself with a WebAssembly runtime that enables PHP analysis to execute entirely within a web browser, allowing results to be shared via URL. It also provides a minimal Dockerized toolchain distributed as a scratch image for consistent execution across different processor architectures. The toolset covers architectur

    Rustcode-analyzercode-stylecoding-standards
    在 GitHub 上查看↗2,867
  • pycqa/pylintPyCQA 的头像

    PyCQA/pylint

    5,685在 GitHub 上查看↗

    Pylint is a static code analysis tool for Python that checks source code for errors, coding standard violations, and code smells without executing the program. It parses code into an abstract syntax tree and walks the tree to detect issues, enforces configurable style rules and naming conventions, and identifies duplicate code blocks by comparing tokenised source sequences. The tool also includes an inference engine that deduces variable types by simulating code paths, enabling deeper analysis even in untyped code. What distinguishes Pylint is its plugin-based checker architecture, which allo

    Python
    在 GitHub 上查看↗5,685
  • jshint/jshintjshint 的头像

    jshint/jshint

    9,064在 GitHub 上查看↗

    JSHint is a JavaScript static analysis tool and linter designed to detect errors and enforce coding standards. It functions as a syntax validator that scans source code to identify potential logic problems and programming mistakes before the code is executed. The tool provides a command line interface for analyzing files and directories. It supports the export of analysis results into standardized formats such as Checkstyle for integration with external build tools. Analysis is managed through a system of linting rule management and environment global configuration. This includes the ability

    JavaScript
    在 GitHub 上查看↗9,064
查看 PHP CodeSniffer 的所有 30 个替代方案→

常见问题解答

squizlabs/php_codesniffer 是做什么的?

PHP_CodeSniffer is a static analysis tool, coding standard linter, and command-line validator for PHP. It scans files and directories to detect and report formatting errors and language-specific coding violations without executing the code.

squizlabs/php_codesniffer 的主要功能有哪些?

squizlabs/php_codesniffer 的主要功能包括:Pattern Violation Scanning, Static Code Analysis, Automated Lint Fixes, CLI Coding Standard Validators, PHP Formatters, PHP Linters, Lexical Tokenizers, Token Manipulation。

squizlabs/php_codesniffer 有哪些开源替代品?

squizlabs/php_codesniffer 的开源替代品包括: checkstyle/checkstyle — Checkstyle is a Java static analysis tool and linter designed to identify and enforce coding standards and best… carthage-software/mago — Mago is a PHP static analysis tool, linter, and code formatter. It detects type errors, dead code, and logic bugs… pycqa/pylint — Pylint is a static code analysis tool for Python that checks source code for errors, coding standard violations, and… jshint/jshint — JSHint is a JavaScript static analysis tool and linter designed to detect errors and enforce coding standards. It… ansible/ansible-lint — ansible-lint is a static code analysis tool and linter designed to identify syntax errors and best practice violations… davidanson/markdownlint.