承接 mayesto/csl 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mayesto/csl

Composer 安装命令:

composer require mayesto/csl

包简介

Check files

README 文档

README

Codacy Badge

This pack was designed for more accurate checking of files

Install

composer global require mayesto/csl

ln -s ~/.composer/vendor/bin/csl /usr/bin

Usage

Check command

csl check ./src --yaml=./config.yml

RunOptions:
--format=value      Output format. Possible values: table, json
--yaml=filepath     Select config file in yaml format
-s|--short          Short file path on result
-vvv                Debug mode

Features

  • Full configurable stock of rules
  • Full configurable source of files. Options: Scanning dir, Git modified files

Rules

  • ClassAuthorPattern - Check class author with your regex
  • ClassAuthorRequire - Require minimum one class author
  • ClassMethodPhpDoc - Check if method has php doc
  • ClassMethodPhpDocEmptyLineBeforeReturn - Check if method's php doc has invalid empty line
  • ClassPhpDoc - Check if class has php doc
  • ClassPhpDocPropertyRequire - Check if class's php doc has a property
  • InternalFunctionNamespace - Find all call of native functions and check if they have fully namespace
  • MethodReturnTypeRequire - Find all methods which have not return type cast
  • ParserValidation - Basic parser validation
  • TooMuchEmptyLines - Scan file and report too much empty lines
  • EmptyLineOnEndOfFile - Check if file has empty line on end of file

Config file

At this moment file config is supported only in yaml format!

Example of file:

fileIterator: Mayesto\CSL\FileIterator\Git # Name of iterator class
rules: # Array of rules
  Mayesto\CSL\Rule\ParserValidation:

  Mayesto\CSL\Rule\ClassAuthorPattern:
    arguments:
      - '.*?<name@example.com>'

  Mayesto\CSL\Rule\ParserValidation:

  Mayesto\CSL\Rule\InternalFunctionNamespace:

  Mayesto\CSL\Rule\ClassPhpDoc:

  Mayesto\CSL\Rule\MethodReturnTypeRequire:

  Mayesto\CSL\Rule\ClassAuthorRequire:

  Mayesto\CSL\Rule\TooMuchEmptyLines:
    arguments:
      - 2 # Number of empty lines generating an error. Default: 2
      
  Mayesto\CSL\Rule\ClassMethodPhpDocEmptyLineBeforeReturn:

  Mayesto\CSL\Rule\EmptyLineOnEndOfFile:
  
  TestRule:
    file: /home/user/TestRule.php # Class which implements RuleInterface

License

Author

This pack was made by Mayesto. If you have any question, send me an email. m@mayesto.pl

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固