Skip to content

Commit 484e11c

Browse files
author
Nekokatt
authoredSep 27, 2020
Added codeclimate reporter to CI (#236)
* Added codeclimate reporter to CI * Added .codeclimate.yml * Updated badges and turned off PNG scanning for tabs (no idea why that is default to on) * Removed tests from codeclimate.
1 parent aa64c8a commit 484e11c

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed
 

‎.codeclimate.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: "2"
2+
3+
checks:
4+
# Many of these are disabled, simply because we have performance tradeoffs
5+
# as opposed to simply refactoring calls into separate functions. There are
6+
# places strategically where doing this can cause noticeable slowdown.
7+
# The same applies to cognitive complexity unfortunately. File line counts
8+
# are also ignored as some parts of Discord's API have many endpoints we have
9+
# to cover, and splitting this into separate components would make it less
10+
# intuitive to the end user.
11+
argument-count:
12+
enabled: false
13+
complex-logic:
14+
enabled: false
15+
file-lines:
16+
enabled: false
17+
method-complexity:
18+
enabled: false
19+
method-count:
20+
enabled: false
21+
method-lines:
22+
enabled: false
23+
nested-control-flow:
24+
enabled: false
25+
return-statements:
26+
enabled: false
27+
similar-code:
28+
config:
29+
threshold: # language-specific defaults. an override will affect all languages.
30+
identical-code:
31+
config:
32+
threshold: # language-specific defaults. an override will affect all languages.
33+
34+
exclude_patterns:
35+
- "**.png"
36+
- "tests/**"
37+
- "test/**"
38+
- "scripts/**"
39+
- "pipelines/**"
40+
- "pages/**"
41+
- "docs/**"
42+
- ".run/**"
43+
- ".github/**"

‎.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ _test_job: &test_job
99
install:
1010
- ${PYTHON_COMMAND} -m pip install nox
1111
before_script:
12+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
13+
- chmod +x ./cc-test-reporter
1214
- mkdir public > /dev/null 2>&1 || true
1315
- ${PYTHON_COMMAND} -V
1416
script:
@@ -17,6 +19,7 @@ _test_job: &test_job
1719
- ${PYTHON_COMMAND} -m nox --sessions pytest-speedups -- --cov-append
1820
after_script:
1921
- bash <(curl -s https://codecov.io/bash)
22+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
2023

2124
_windows_test_job: &windows_test_job
2225
os: windows
@@ -34,6 +37,10 @@ _linux_test_job: &linux_test_job
3437
- PYTHON_COMMAND=python
3538
<<: *test_job
3639

40+
env:
41+
global:
42+
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
43+
3744
jobs:
3845
include:
3946
# Linting

‎README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[![hikarivers](https://img.shields.io/pypi/v/hikari)](https://pypi.org/project/hikari)
22
[![traviscomstats](https://travis-ci.com/nekokatt/hikari.svg?branch=master)](https://travis-ci.com/nekokatt/hikari)
33
[![pyvers](https://img.shields.io/pypi/pyversions/hikari)](https://pypi.org/project/hikari)
4-
[![codecov](https://img.shields.io/codecov/c/github/nekokatt/hikari)](https://codecov.io/gh/nekokatt/hikari)
4+
[![Maintainability](https://api.codeclimate.com/v1/badges/f30a8854611922dfe3b1/maintainability)](https://codeclimate.com/github/nekokatt/hikari/maintainability)
5+
[![Test Coverage](https://api.codeclimate.com/v1/badges/f30a8854611922dfe3b1/test_coverage)](https://codeclimate.com/github/nekokatt/hikari/test_coverage)
56
[![prs](https://img.shields.io/github/issues-pr/nekokatt/hikari)](https://github.com/nekokatt/hikari/pulls)
67
[![issues](https://img.shields.io/github/issues-raw/nekokatt/hikari)](https://github.com/nekokatt/hikari/issues)
78
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://pypi.org/project/black/)

0 commit comments

Comments
 (0)
Please sign in to comment.