mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 01:51:53 +08:00
validators, tests
This commit is contained in:
2
testenv/linters/coverage.ini
Normal file
2
testenv/linters/coverage.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[run]
|
||||
data_file = testenv/.coverage
|
||||
45
testenv/linters/eslintrc.yaml
Normal file
45
testenv/linters/eslintrc.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
globals:
|
||||
Atx: true
|
||||
Hid: true
|
||||
Keyboard: true
|
||||
Mouse: true
|
||||
Msd: true
|
||||
Session: true
|
||||
Streamer: true
|
||||
WindowManager: true
|
||||
wm: true
|
||||
tools: true
|
||||
checkBrowser: true
|
||||
"$": true
|
||||
"$$": true
|
||||
"$$$": true
|
||||
|
||||
env:
|
||||
browser: true
|
||||
es6: true
|
||||
|
||||
extends: "eslint:recommended"
|
||||
|
||||
parserOptions:
|
||||
ecmaVersion: 6
|
||||
|
||||
rules:
|
||||
indent:
|
||||
- error
|
||||
- tab
|
||||
- SwitchCase: 1
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
comma-dangle:
|
||||
- error
|
||||
- always-multiline
|
||||
no-unused-vars:
|
||||
- error
|
||||
- {vars: local, args: after-used}
|
||||
7
testenv/linters/flake8.ini
Normal file
7
testenv/linters/flake8.ini
Normal file
@@ -0,0 +1,7 @@
|
||||
[flake8]
|
||||
max-line-length = 160
|
||||
ignore = W503, E227, E241, E252
|
||||
# W503 line break before binary operator
|
||||
# E227 missing whitespace around bitwise or shift operator
|
||||
# E241 multiple spaces after
|
||||
# E252 missing whitespace around parameter equals
|
||||
5
testenv/linters/mypy.ini
Normal file
5
testenv/linters/mypy.ini
Normal file
@@ -0,0 +1,5 @@
|
||||
[mypy]
|
||||
python_version = 3.7
|
||||
ignore_missing_imports = true
|
||||
disallow_untyped_defs = true
|
||||
strict_optional = true
|
||||
62
testenv/linters/pylint.ini
Normal file
62
testenv/linters/pylint.ini
Normal file
@@ -0,0 +1,62 @@
|
||||
[MASTER]
|
||||
ignore = .git
|
||||
extension-pkg-whitelist =
|
||||
setproctitle,
|
||||
|
||||
[DESIGN]
|
||||
min-public-methods = 0
|
||||
max-args = 10
|
||||
|
||||
[TYPECHECK]
|
||||
ignored-classes=
|
||||
AioQueue,
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable =
|
||||
file-ignored,
|
||||
locally-disabled,
|
||||
fixme,
|
||||
missing-docstring,
|
||||
no-init,
|
||||
no-self-use,
|
||||
superfluous-parens,
|
||||
abstract-class-not-used,
|
||||
abstract-class-little-used,
|
||||
duplicate-code,
|
||||
bad-continuation,
|
||||
bad-whitespace,
|
||||
star-args,
|
||||
broad-except,
|
||||
redundant-keyword-arg,
|
||||
wrong-import-order,
|
||||
too-many-ancestors,
|
||||
no-else-return,
|
||||
len-as-condition,
|
||||
|
||||
[REPORTS]
|
||||
msg-template = {symbol} -- {path}:{line}({obj}): {msg}
|
||||
|
||||
[FORMAT]
|
||||
max-line-length = 160
|
||||
|
||||
[BASIC]
|
||||
# List of builtins function names that should not be used, separated by a comma
|
||||
bad-functions =
|
||||
|
||||
# Regular expression matching correct method names
|
||||
method-rgx = [a-z_][a-z0-9_]{2,50}$
|
||||
|
||||
# Regular expression matching correct function names
|
||||
function-rgx = [a-z_][a-z0-9_]{2,50}$
|
||||
|
||||
# Regular expression which should only match correct module level names
|
||||
const-rgx = ([a-zA-Z_][a-zA-Z0-9_]*)$
|
||||
|
||||
# Regular expression which should only match correct argument names
|
||||
argument-rgx = [a-z_][a-z0-9_]{1,30}$
|
||||
|
||||
# Regular expression which should only match correct variable names
|
||||
variable-rgx = [a-z_][a-z0-9_]{1,30}$
|
||||
|
||||
# Regular expression which should only match correct instance attribute names
|
||||
attr-rgx = [a-z_][a-z0-9_]{1,30}$
|
||||
6
testenv/linters/vulture-wl.py
Normal file
6
testenv/linters/vulture-wl.py
Normal file
@@ -0,0 +1,6 @@
|
||||
_MassStorageDeviceInfo.manufacturer
|
||||
_MassStorageDeviceInfo.product
|
||||
_MassStorageDeviceInfo.real
|
||||
_MassStorageDeviceInfo.hw
|
||||
_MassStorageDeviceInfo.image
|
||||
fake_rpi.RPi.GPIO
|
||||
Reference in New Issue
Block a user