mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #980 from YunoHost/check-for-fatal-code-errors
Check for fatal code errors
This commit is contained in:
commit
10946c3bf8
5 changed files with 17 additions and 7 deletions
|
@ -118,6 +118,11 @@ lint:
|
||||||
script:
|
script:
|
||||||
- tox -e lint
|
- tox -e lint
|
||||||
|
|
||||||
|
invalidcode:
|
||||||
|
extends: .lint-stage
|
||||||
|
script:
|
||||||
|
- tox -e invalidcode
|
||||||
|
|
||||||
# Disabled, waiting for buster
|
# Disabled, waiting for buster
|
||||||
#format-check:
|
#format-check:
|
||||||
# extends: .lint-stage
|
# extends: .lint-stage
|
||||||
|
|
|
@ -926,12 +926,12 @@ def dump_app_log_extract_for_debugging(operation_logger):
|
||||||
r"ynh_script_progression"
|
r"ynh_script_progression"
|
||||||
]
|
]
|
||||||
|
|
||||||
filters = [re.compile(f) for f in filters]
|
filters = [re.compile(f_) for f_ in filters]
|
||||||
|
|
||||||
lines_to_display = []
|
lines_to_display = []
|
||||||
for line in lines:
|
for line in lines:
|
||||||
|
|
||||||
if not ": " in line.strip():
|
if ": " not in line.strip():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# A line typically looks like
|
# A line typically looks like
|
||||||
|
|
|
@ -534,10 +534,10 @@ def _build_dns_conf(domain, ttl=3600, include_empty_AAAA_if_no_ipv6=False):
|
||||||
####################
|
####################
|
||||||
|
|
||||||
records = {
|
records = {
|
||||||
"basic": [{"name": name, "ttl": ttl, "type": type_, "value": value} for name, ttl, type_, value in basic],
|
"basic": [{"name": name, "ttl": ttl_, "type": type_, "value": value} for name, ttl_, type_, value in basic],
|
||||||
"xmpp": [{"name": name, "ttl": ttl, "type": type_, "value": value} for name, ttl, type_, value in xmpp],
|
"xmpp": [{"name": name, "ttl": ttl_, "type": type_, "value": value} for name, ttl_, type_, value in xmpp],
|
||||||
"mail": [{"name": name, "ttl": ttl, "type": type_, "value": value} for name, ttl, type_, value in mail],
|
"mail": [{"name": name, "ttl": ttl_, "type": type_, "value": value} for name, ttl_, type_, value in mail],
|
||||||
"extra": [{"name": name, "ttl": ttl, "type": type_, "value": value} for name, ttl, type_, value in extra],
|
"extra": [{"name": name, "ttl": ttl_, "type": type_, "value": value} for name, ttl_, type_, value in extra],
|
||||||
}
|
}
|
||||||
|
|
||||||
##################
|
##################
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import time
|
import time
|
||||||
import yaml
|
import yaml
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
6
tox.ini
6
tox.ini
|
@ -9,6 +9,7 @@ skip_install=True
|
||||||
deps =
|
deps =
|
||||||
pytest >= 4.6.3, < 5.0
|
pytest >= 4.6.3, < 5.0
|
||||||
pyyaml >= 5.1.2, < 6.0
|
pyyaml >= 5.1.2, < 6.0
|
||||||
|
flake8 >= 3.7.9, < 3.8
|
||||||
commands =
|
commands =
|
||||||
pytest {posargs}
|
pytest {posargs}
|
||||||
|
|
||||||
|
@ -16,3 +17,8 @@ commands =
|
||||||
skip_install=True
|
skip_install=True
|
||||||
commands = flake8 src doc data tests
|
commands = flake8 src doc data tests
|
||||||
deps = flake8
|
deps = flake8
|
||||||
|
|
||||||
|
[testenv:invalidcode]
|
||||||
|
skip_install=True
|
||||||
|
commands = flake8 src data --exclude src/yunohost/tests --select F --ignore F401,F841
|
||||||
|
deps = flake8
|
||||||
|
|
Loading…
Add table
Reference in a new issue