Skip to content

Commit ab02e93

Browse files
committed
Merge pull request #37 from fwalch/scrutinizer
Add scrutinizer-ci.com config.
2 parents 66100de + bfa672e commit ab02e93

File tree

3 files changed

+149
-2
lines changed

3 files changed

+149
-2
lines changed

.scrutinizer.yml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
checks:
2+
python:
3+
imports_relative_import: true
4+
imports_wildcard_import: true
5+
classes_no_self_argument: true
6+
classes_bad_mcs_method_argument: true
7+
classes_bad_classmethod_argument: true
8+
code_rating: true
9+
duplicate_code: true
10+
variables_unused_variable: true
11+
variables_unused_import: true
12+
variables_unused_wildcard_import: true
13+
variables_unused_argument: true
14+
variables_global_variable_not_assigned: true
15+
typecheck_redundant_keyword_arg: true
16+
imports_import_self: true
17+
format_superfluous_parens: true
18+
exceptions_pointless_except: true
19+
design_interface_not_implemented: true
20+
design_abstract_class_not_used: true
21+
basic_useless_else_on_loop: true
22+
basic_unreachable: true
23+
basic_unnecessary_pass: true
24+
basic_unnecessary_lambda: true
25+
basic_pointless_string_statement: true
26+
basic_pointless_statement: true
27+
basic_expression_not_assigned: true
28+
variables_redefined_outer_name: true
29+
variables_redefined_builtin: true
30+
variables_redefine_in_handler: true
31+
newstyle_bad_super_call: true
32+
logging_not_lazy: true
33+
exceptions_broad_except: true
34+
exceptions_bare_except: true
35+
classes_super_init_not_called: true
36+
classes_protected_access: true
37+
classes_non_parent_init_called: true
38+
classes_bad_mcs_classmethod_argument: true
39+
classes_attribute_defined_outside_init: true
40+
classes_method_hidden: true
41+
basic_lost_exception: true
42+
basic_function_redefined: true
43+
basic_exec_used: true
44+
basic_eval_used: true
45+
basic_dangerous_default_value: true
46+
design_abstract_class_little_used: true
47+
imports_deprecated_module: true
48+
format_old_ne_operator: true
49+
format_backtick: true
50+
basic_old_raise_syntax: true
51+
variables_used_before_assignment: true
52+
variables_unpacking_non_sequence: true
53+
variables_undefined_variable: true
54+
variables_undefined_loop_variable: true
55+
variables_undefined_all_variable: true
56+
variables_unbalanced_tuple_unpacking: true
57+
variables_no_name_in_module: true
58+
variables_invalid_all_object: true
59+
variables_global_variable_undefined: true
60+
typecheck_unexpected_keyword_arg: true
61+
typecheck_not_callable: true
62+
typecheck_no_value_for_parameter: true
63+
typecheck_no_member: true
64+
typecheck_too_many_function_args: true
65+
typecheck_missing_kwoa: true
66+
typecheck_maybe_no_member: true
67+
typecheck_duplicate_keyword_arg: true
68+
typecheck_assignment_from_none: true
69+
typecheck_assignment_from_no_return: true
70+
string_unused_format_string_key: true
71+
string_truncated_format_string: true
72+
string_too_many_format_args: true
73+
string_too_few_format_args: true
74+
string_mixed_format_string: true
75+
string_missing_format_string_key: true
76+
string_format_needs_mapping: true
77+
string_constant_anomalous_unicode_escape_in_string: true
78+
string_constant_anomalous_backslash_in_string: true
79+
string_bad_str_strip_call: true
80+
string_bad_format_string_key: true
81+
string_bad_format_character: true
82+
open_mode_bad_open_mode: true
83+
logging_unsupported_format: true
84+
logging_too_many_args: true
85+
logging_too_few_args: true
86+
logging_format_truncated: true
87+
imports_reimported: true
88+
imports_import_error: true
89+
imports_cyclic_import: true
90+
exceptions_raising_string: true
91+
exceptions_raising_non_exception: true
92+
exceptions_raising_bad_type: true
93+
exceptions_notimplemented_raised: true
94+
exceptions_catching_non_exception: true
95+
exceptions_bad_except_order: true
96+
classes_valid_slots: true
97+
classes_signature_differs: true
98+
classes_non_iterator_returned: true
99+
classes_no_method_argument: true
100+
classes_missing_interface_method: true
101+
classes_interface_is_not_class: true
102+
classes_bad_staticmethod_argument: true
103+
classes_bad_context_manager: true
104+
classes_arguments_differ: true
105+
classes_access_member_before_definition: true
106+
classes_abstract_method: true
107+
basic_yield_outside_function: true
108+
basic_return_outside_function: true
109+
basic_return_in_init: true
110+
basic_return_arg_in_generator: true
111+
basic_not_in_loop: true
112+
basic_nonexistent_operator: true
113+
basic_missing_reversed_argument: true
114+
basic_missing_module_attribute: true
115+
basic_init_is_generator: true
116+
basic_duplicate_key: true
117+
basic_duplicate_argument_name: true
118+
basic_bad_reversed_sequence: true
119+
basic_assert_on_tuple: true
120+
basic_abstract_class_instantiated: true
121+
format_lowercase_l_suffix: true
122+
classes_no_self_use: true
123+
classes_no_init: true
124+
exceptions_binary_op_exception: true
125+
variables_global_statement: true
126+
127+
filter:
128+
excluded_paths:
129+
- test/*
130+
131+
tools:
132+
external_code_coverage:
133+
timeout: 600
134+
runs: 6

.travis.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
language: python
2+
env:
3+
global:
4+
- NOSE_NOLOGCAPTURE=true
5+
- NOSE_VERBOSE=2
6+
- NOSE_WITH_COVERAGE=true
7+
- NOSE_COVER_PACKAGE=neovim
28
python:
9+
# If the build matrix gets bigger, also update the number of runs
10+
# at the bottom of .scrutinizer.yml.
311
- "2.6"
412
- "2.7"
513
- "3.2"
@@ -12,6 +20,7 @@ before_install:
1220
- git clone --depth=1 -b master git://github.com/neovim/neovim nvim
1321
- sudo git clone --depth=1 git://github.com/neovim/deps /opt/neovim-deps
1422
- pip install -q flake8 flake8-import-order flake8-docstrings pep8-naming
23+
- pip install -q scrutinizer-ocular
1524
install:
1625
- pip install .
1726
- prefix="/opt/neovim-deps/64"
@@ -23,5 +32,7 @@ install:
2332
before_script:
2433
- flake8 --exclude ./neovim/plugins neovim
2534
script:
26-
- ./nvim/scripts/run-api-tests.exp "nosetests --nologcapture --verbosity=2" "./nvim/build/bin/nvim -u NONE"
27-
- NVIM_SPAWN_ARGV='["./nvim/build/bin/nvim", "-u", "NONE", "--embed"]' nosetests --nologcapture --verbosity=2
35+
- ./nvim/scripts/run-api-tests.exp "nosetests" "./nvim/build/bin/nvim -u NONE"
36+
- NVIM_SPAWN_ARGV='["./nvim/build/bin/nvim", "-u", "NONE", "--embed"]' nosetests
37+
after_success:
38+
- ocular

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
### Python client to [Neovim](https://github.com/neovim/neovim)
22

33
[![Build Status](https://travis-ci.org/neovim/python-client.svg?branch=master)](https://travis-ci.org/neovim/python-client)
4+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/neovim/python-client/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/neovim/python-client/?branch=master)
5+
[![Code Coverage](https://scrutinizer-ci.com/g/neovim/python-client/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/neovim/python-client/?branch=master)
46

57
Library for scripting Nvim processes through it's msgpack-rpc API.
68

0 commit comments

Comments
 (0)