silverstripe/moduleratings-plugin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

silverstripe/moduleratings-plugin

Composer 安装命令:

composer require silverstripe/moduleratings-plugin

包简介

A Composer plugin to provide ability to rate your local modules

README 文档

README

Scrutinizer Code Quality

This package provides a Composer plugin which enables the functionality for the SilverStripe module ratings package to be used via Composer on the command line.

Installation

Install with Composer:

composer require silverstripe/moduleratings-plugin

Usage

Once installed, you will see a new rate-module command. As with other Composer (and Symfony console) commands, you can add --help to the command to see information about what it does and how to use and manipulate it:

$ composer rate-module --help

Usage:
  rate-module [options] [--] <module-path>

Arguments:
  module-path                    The path to the module folder, relative to the current working directory

Options:
      --slug[=SLUG]              The module's GitHub repository slug, e.g. silverstripe/silverstripe-blog - used for API checks
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  This command will assess the provided module based on a selection of pre-defined quality checks, and provide a rating
  out of 100.
  
  You must provide the module-path to map the path from the current working directory to the source code
  of the module, and you may optionally provide the slug argument which will enable API based status checks.
  
  Note that without providing slug the module will never be able to achieve a 100% score.

As noted above, the path to the module's code is required (e.g. vendor/silverstripe/cms from your project root).

The --slug argument will allow the check suite to run external API based checks, e.g. code coverage and Travis builds. This is an optional addition, but you won't be able to achieve a 100% score without providing it.

Example

To run a rating check on the spam protection module, you could run the following command:

$ composer rate-module vendor/silverstripe/spamprotection/ --slug=silverstripe/silverstripe-spamprotection

+---------------------------------------------------------------------------------------+--------+---------+
| Check description                                                                     | Points | Maximum |
+---------------------------------------------------------------------------------------+--------+---------+
| Has a "good" level of code coverage (greater than 40%, requires slug)                 | 5      | 5       |
| Has a "great" level of code coverage (greater than 60%, requires slug)                | 5      | 5       |
| Has a code of conduct file                                                            | 2      | 2       |
| Has source code in either a "code" or a "src" folder                                  | 5      | 5       |
| The PHP code in this module passes the SilverStripe lint rules (mostly PSR-2)         | 10     | 10      |
| Has a contributing guide file                                                         | 0      | 2       |
| Has a .editorconfig file                                                              | 5      | 5       |
| Has a .gitattributes file                                                             | 2      | 2       |
| Has a license file                                                                    | 5      | 5       |
| Has a readme file                                                                     | 5      | 5       |
| Has Scrutinizer CI configured and a "good" score (greater than 6.5/10, requires slug) | 10     | 10      |
| Has Travis CI configured and the last build passed successfully (requires slug)       | 10     | 10      |
+---------------------------------------------------------------------------------------+--------+---------+
| TOTAL SCORE (normalised)                                                              | 97     | 100     |
+---------------------------------------------------------------------------------------+--------+---------+

In the above example you will see the results of each of the checks, with the Points that were awarded for meeting the check's criteria, and the maximum potential points that could be attained from the check if it were successful.

The total score is awarded as a percentage, e.g. 97% in this example. Note that the result is normalised, so 97/100 rather than 64/66 (if you'd added each check result up).

Further info on the checks

For more information on the check suite itself, please see the module ratings package.

silverstripe/moduleratings-plugin 适用场景与选型建议

silverstripe/moduleratings-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 403 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 04 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 silverstripe/moduleratings-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 silverstripe/moduleratings-plugin 我们能提供哪些服务?
定制开发 / 二次开发

基于 silverstripe/moduleratings-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-04-12