]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lint: pylint and flake8 removed docs-develop-back-g3r3cl/deployments/6642
authorAleš Mrázek <ales.mrazek@nic.cz>
Thu, 10 Oct 2024 12:36:28 +0000 (14:36 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 23 Apr 2025 15:13:22 +0000 (17:13 +0200)
(cherry picked from commit d92fba4d12df38d50cc97daab4a4b81337bb57c5)
It now fails on 5.x pytest, too:
https://gitlab.nic.cz/knot/knot-resolver/-/jobs/1340121

.gitlab-ci.yml
meson.build
scripts/run-pylint.sh [deleted file]
tests/pytests/pylintrc [deleted file]

index 611ae7923e404b04fcc939fe199a7b0125fbd0d0..cbeddb9cfc9f607625889bb09d5f5873d58e3105 100644 (file)
@@ -325,12 +325,10 @@ trivial_checks: # aggregated to save some processing
     - ci/no_assert_check.sh
     - ci/deckard_commit_check.sh
 
-lint:other:
+lint:luacheck:
   <<: *sanity
   script:
     - meson build_ci_lint &>/dev/null
-    - ninja -C build_ci* pylint
-    - ninja -C build_ci* flake8
     - ninja -C build_ci* luacheck
 
 lint:pedantic:
index bf9a6d850e8e65ba05e8765d34297acaac16126a..0748e92dbf775033a802d36db183e474a104710f 100644 (file)
@@ -278,8 +278,6 @@ install_data(
 message('--- lint dependencies ---')
 clangtidy = find_program('clang-tidy', required: false)
 luacheck = find_program('luacheck', required: false)
-flake8 = find_program('flake8', required: false)
-pylint_run = find_program('scripts/run-pylint.sh')
 message('-------------------------')
 
 if clangtidy.found()
@@ -306,22 +304,6 @@ if luacheck.found()
   )
 endif
 
-if flake8.found()
-  run_target(
-    'flake8',
-    command: [
-      flake8,
-      '--max-line-length=100',
-      meson.source_root() / 'tests' / 'pytests',
-    ],
-  )
-endif
-
-run_target(
-  'pylint',
-  command: pylint_run,
-)
-
 
 # Summary message
 # NOTE: ternary operator in format() not supported
diff --git a/scripts/run-pylint.sh b/scripts/run-pylint.sh
deleted file mode 100755 (executable)
index 9241382..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-3.0-or-later
-set -o errexit -o nounset
-
-cd "$(dirname ${0})/.."
-
-# Find Python modules and standalone Python scripts
-FILES=$(find ./tests/pytests \
-       -type d -exec test -e '{}/__init__.py' \; -print -prune -o \
-       -name '*.py' -print)
-
-python3 -m pylint -j 0 --rcfile ./tests/pytests/pylintrc ${FILES}
diff --git a/tests/pytests/pylintrc b/tests/pytests/pylintrc
deleted file mode 100644 (file)
index 5e2b50b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-[MESSAGES CONTROL]
-
-disable=
-    missing-docstring,
-    too-few-public-methods,
-    too-many-arguments,
-    too-many-instance-attributes,
-    fixme,
-    unused-import,  # checked by flake8
-    line-too-long,  # checked by flake8
-    invalid-name,
-    broad-except,
-    global-statement,
-    no-else-return,
-    redefined-outer-name,  # commonly used with pytest fixtures
-    consider-using-with,
-    consider-using-f-string,
-
-
-[SIMILARITIES]
-min-similarity-lines=6
-ignore-comments=yes
-ignore-docstrings=yes
-ignore-imports=no
-
-[DESIGN]
-max-parents=10
-max-locals=20
-
-[TYPECHECK]
-ignored-modules=ssl