Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

lint: Upgrade zulint and remove run-isort wrapper.

Anders Kaseorg8a54dc43ceef
diff --git a/requirements/dev.in b/requirements/dev.in
index 07202c3c1cc..53761507fce 100644
--- a/requirements/dev.in
+++ b/requirements/dev.in
@@ -55,7 +55,7 @@ python-digitalocean
pip-tools
# zulip's linting framework - zulint
-https://github.com/zulip/zulint/archive/e5010a7bbfa8614fd01b25542ffb2f94c0766759.zip#egg=zulint==0.0.1
+https://github.com/zulip/zulint/archive/87ecebe3c7315ceef2236ccdf89b345dec22042e.zip#egg=zulint==0.0.1
-r mypy.in
diff --git a/requirements/dev.txt b/requirements/dev.txt
index 797c4f7a8ba..59a09a8bde7 100644
--- a/requirements/dev.txt
+++ b/requirements/dev.txt
@@ -1205,8 +1205,8 @@ zope.interface==5.1.0 \
--hash=sha256:f68bf937f113b88c866d090fea0bc52a098695173fc613b055a17ff0cf9683b6 \
--hash=sha256:fb55c182a3f7b84c1a2d6de5fa7b1a05d4660d866b91dbf8d74549c57a1499e8 \
# via scrapy, twisted
-https://github.com/zulip/zulint/archive/e5010a7bbfa8614fd01b25542ffb2f94c0766759.zip#egg=zulint==0.0.1 \
- --hash=sha256:fe9c8ed8a533c348d18c7a185a1884034b17623d3f2e0dafa028ebeaf6ff0c97 \
+https://github.com/zulip/zulint/archive/87ecebe3c7315ceef2236ccdf89b345dec22042e.zip#egg=zulint==0.0.1 \
+ --hash=sha256:6d69b6324393ebcf0838463e60afd0160774684f26ccab2ebcbd59c6a0ebd37b \
# via -r requirements/dev.in
https://github.com/zulip/python-zulip-api/archive/0.7.0.zip/#egg=zulip==0.7.0_git&subdirectory=zulip \
--hash=sha256:161e3f38a9d27bf76a30da3d3d81f5f1b71a8c2c8144e0c4a33cd15018606d9f \
diff --git a/tools/lint b/tools/lint
index 0b5801e3d36..c8b7d1028e6 100755
--- a/tools/lint
+++ b/tools/lint
@@ -89,9 +89,9 @@ def run() -> None:
linter_config.external_linter('gitlint', ['tools/commit-message-lint'],
description="Checks commit messages for common formatting errors."
"(config: .gitlint)")
- linter_config.external_linter('isort', ['tools/run-isort'], ['py'],
+ linter_config.external_linter('isort', ['isort'], ['py'],
description="Sorts Python import statements",
- fix_arg='--fix')
+ check_arg=['--check-only', '--diff'])
semgrep_command = ["semgrep", "--config=./tools/semgrep.yml", "--error",
# This option is dangerous in the context of running
diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py
index aef1121d6ef..c6636eca3fa 100644
--- a/tools/linter_lib/custom_check.py
+++ b/tools/linter_lib/custom_check.py
@@ -715,7 +715,8 @@ markdown_rules = RuleList(
help_markdown_rules = RuleList(
langs=['md'],
- rules=markdown_rules.rules + [
+ rules=[
+ *markdown_rules.rules,
{'pattern': '[a-z][.][A-Z]',
'description': "Likely missing space after end of sentence",
'include_only': {'templates/zerver/help/'},
diff --git a/tools/run-isort b/tools/run-isort
deleted file mode 100755
index 016521891af..00000000000
--- a/tools/run-isort
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-set -eu
-if [ "$1" = "--fix" ]; then
- shift
- exec isort "$@"
-else
- exec isort --check-only --diff "$@"
-fi
diff --git a/version.py b/version.py
index 2b6cd82dcfe..8034527ac9e 100644
--- a/version.py
+++ b/version.py
@@ -44,4 +44,4 @@ API_FEATURE_LEVEL = 23
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
-PROVISION_VERSION = '87.2'
+PROVISION_VERSION = '88.0'