Skip to content

Commit 068a80b

Browse files
committed
improve travis to use mh_metric
1 parent dd1f057 commit 068a80b

File tree

3 files changed

+165
-142
lines changed

3 files changed

+165
-142
lines changed

.travis.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
# Travis CI (https://travis-ci.org/)
2+
# This will only work on your repo if you have an account on travis and you
3+
# have set it up to run continuous integration on this this repo
4+
5+
# Linux distribution
26
dist: bionic
7+
8+
# Language and version
39
language: python
410
python:
511
- "3.6" # current default Python on Travis CI
12+
613
cache:
714
apt: true # only works with Pro version
815

16+
# Install the miss_hit linter
917
before_install:
10-
- pip3 install --user miss_hit
11-
#- cd .. && git clone https://github.com/florianschanda/miss_hit.git && export PATH=$PATH:`pwd`/miss_hit && cd CPP_PTB
18+
- pip3 install miss_hit
1219

20+
# Lists all the tasks we will do
1321
jobs:
1422
include:
15-
- script: mh_style `pwd`
16-
name: "miss_hit linter" # names the second job
17-
- script: mh_metric `pwd`
18-
name: "miss_hit static analysis" # names the second job
23+
- name: "miss_hit: checking code quality"
24+
script: mh_metric . --ci
25+
- name: "miss_hit: checking code style"
26+
script: mh_style .
27+

miss_hit.cfg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
line_length: 100
22
regex_function_name: "[a-z]+(([A-Z]){1}[A-Za-z]+)*"
3-
suppress_rule: "copyright_notice"
3+
suppress_rule: "copyright_notice"
4+
5+
metric "cnest": limit 4
6+
metric "file_length": limit 500
7+
metric "cyc": limit 15
8+
metric "parameters": limit 5

0 commit comments

Comments
 (0)