mirror of
https://github.com/swift-server/RediStack.git
synced 2026-05-03 07:32:28 +00:00
Add code quality tracking from Code Climate
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
version: "2"
|
||||
checks:
|
||||
argument-count:
|
||||
config:
|
||||
threshold: 6
|
||||
complex-logic:
|
||||
config:
|
||||
threshold: 5
|
||||
file-lines:
|
||||
config:
|
||||
threshold: 600
|
||||
method-complexity:
|
||||
config:
|
||||
threshold: 6
|
||||
method-count:
|
||||
config:
|
||||
threshold: 20
|
||||
method-lines:
|
||||
config:
|
||||
threshold: 50
|
||||
nested-control-flow:
|
||||
config:
|
||||
threshold: 4
|
||||
return-statements:
|
||||
enabled: false
|
||||
similar-code:
|
||||
config:
|
||||
threshold: 40
|
||||
identical-code:
|
||||
config:
|
||||
threshold: 40
|
||||
exclude_patterns:
|
||||
- "docs/"
|
||||
- ".gitlab-ci/"
|
||||
- "scripts/"
|
||||
- "Tests/"
|
||||
- "*.md"
|
||||
- "*.resolved"
|
||||
- "*.txt"
|
||||
@@ -1,4 +1,5 @@
|
||||
stages:
|
||||
- Quality Checks
|
||||
- Platform Tests
|
||||
- Docs
|
||||
|
||||
@@ -32,6 +33,30 @@ pages:
|
||||
paths:
|
||||
- public
|
||||
|
||||
Code Climate:
|
||||
only:
|
||||
refs:
|
||||
- branches
|
||||
- tags
|
||||
stage: Quality Checks
|
||||
image: docker:stable
|
||||
services:
|
||||
- docker:stable-dind
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/security-products/codequality:latest"
|
||||
script:
|
||||
- docker pull --quiet "$CODE_QUALITY_IMAGE"
|
||||
- docker run
|
||||
--env SOURCE_CODE="$PWD"
|
||||
--volume "$PWD":/code
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||
"$CODE_QUALITY_IMAGE" /code
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
reports:
|
||||
codequality: gl-code-quality-report.json
|
||||
|
||||
Ubuntu Bionic:
|
||||
stage: Platform Tests
|
||||
trigger:
|
||||
|
||||
@@ -2,12 +2,16 @@
|
||||
<p><img src="https://gitlab.com/Mordil/swift-redi-stack/wikis/uploads/cb4c517e40bd2f5ab796f1093efbd697/RediStack_social-preview_transparent.png" width="350" alt="RediStack logo"></p>
|
||||
|
||||
<p>
|
||||
<a href="https://gitlab.com/Mordil/swift-redi-stack/pipelines"><img src="https://gitlab.com/Mordil/swift-redi-stack/badges/master/pipeline.svg" alt="Build Status"></a>
|
||||
<a href="https://github.com/swift-server/sswg/blob/master/process/incubation.md#sandbox-level"><img src="https://img.shields.io/badge/sswg-sandbox-lightgrey.svg" alt="SSWG Maturity"></a>
|
||||
<a href="https://gitlab.com/Mordil/swift-redi-stack/blob/master/LICENSE.txt"><img src="https://img.shields.io/badge/License-Apache%202.0-yellow.svg" alt="Apache 2 License"></a>
|
||||
<a href="https://swift.org"><img src="https://img.shields.io/badge/Swift-5.0+-orange.svg" alt="Swift 5.0+"></a>
|
||||
<a href="https://redis.io"><img src="https://img.shields.io/badge/Redis-5.0-red.svg" alt="Redis 5.0"></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://gitlab.com/Mordil/swift-redi-stack/pipelines"><img src="https://gitlab.com/Mordil/swift-redi-stack/badges/master/pipeline.svg" alt="Build Status"></a>
|
||||
<a href="https://codeclimate.com/github/Mordil/swift-redi-stack/maintainability"><img src="https://api.codeclimate.com/v1/badges/3ff84c8d384b01cb5875/maintainability" /></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<table><thead><tr align="center"><th width="9999">
|
||||
|
||||
Reference in New Issue
Block a user