mirror of https://github.com/zulip/zulip.git
install-semgrep: Upgrade semgrep to 0.14.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
ab647abad3
commit
f364414cb9
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
# check for the venv
|
||||
|
@ -106,7 +107,9 @@ def run() -> None:
|
|||
linter_config.external_linter('semgrep-py', [*semgrep_command, "--lang=python"], ['py'],
|
||||
fix_arg='--autofix',
|
||||
description="Syntactic Grep (semgrep) Code Search Tool "
|
||||
"(config: ./tools/semgrep.yml)")
|
||||
"(config: ./tools/semgrep.yml)",
|
||||
# https://github.com/returntocorp/semgrep/issues/1228
|
||||
suppress_line=lambda line: bool(re.match(r"running \d+ rules\.\.\.$", line)))
|
||||
|
||||
linter_config.external_linter('thirdparty', ['tools/check-thirdparty'],
|
||||
description="Check docs/THIRDPARTY copyright file syntax")
|
||||
|
|
|
@ -116,7 +116,6 @@ rules:
|
|||
languages: [python]
|
||||
pattern-either:
|
||||
- pattern: '"..." % ...'
|
||||
- pattern: '("...") % ...'
|
||||
- pattern: django.utils.translation.ugettext(...) % ...
|
||||
severity: ERROR
|
||||
message: "Prefer f-strings or .format for string formatting"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
version=0.10.1
|
||||
version=0.14.0
|
||||
tarball=semgrep-v$version-ubuntu-16.04.tgz
|
||||
sha256=7d07d223e88d52a2e8886e748726e1c8488d8d81ced34b80b128c362d9b57a0a
|
||||
sha256=8b9437af0540ed9664904f9603d9d6ad011dad46433cba74e524c7753c7732c9
|
||||
tarball_url=https://github.com/returntocorp/semgrep/releases/download/v$version/$tarball
|
||||
|
||||
check_version () {
|
||||
|
|
|
@ -44,4 +44,4 @@ API_FEATURE_LEVEL = 24
|
|||
# historical commits sharing the same major version, in which case a
|
||||
# minor version bump suffices.
|
||||
|
||||
PROVISION_VERSION = '89.2'
|
||||
PROVISION_VERSION = '89.3'
|
||||
|
|
Loading…
Reference in New Issue