]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[pre-commit] Move tclint.toml settings to pyproject.toml
authorTom de Vries <tdevries@suse.de>
Mon, 5 Jan 2026 17:30:49 +0000 (18:30 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 5 Jan 2026 17:30:49 +0000 (18:30 +0100)
Starting release v0.7.0, tclint has config discovery support, allowing us to
move the tclint settings from tclint.toml to pyproject.toml.

Approved-By: Tom Tromey <tom@tromey.com>
.pre-commit-config.yaml
gdb/pyproject.toml
gdb/tclint.toml [deleted file]

index 37fd083ced37208136717588009d1aa1ee67bbb5..a32a58d37189b52877ddbc41b15323bf961d4e07 100644 (file)
@@ -113,9 +113,9 @@ repos:
       always_run: true
       require_serial: true
   - repo: https://github.com/nmoroze/tclint
-    rev: v0.6.2
+    rev: v0.7.0
     hooks:
     - id: tclint
-      args: [--config, gdb/tclint.toml, --commands, gdb/testsuite/tclint-plugin.py]
+      args: [--commands, gdb/testsuite/tclint-plugin.py]
       types_or: [file]
       files: '^gdb/testsuite/.*\.(exp|tcl)$'
index 144c48947ee6ecfe168f04eb34fc57f6157335d2..2dc00f4abb26f16f97236b174f2d033ad29bf76a 100644 (file)
@@ -6,3 +6,35 @@ typeCheckingMode = "strict"
 
 [tool.isort]
 profile = "black"
+
+[tool.tclint]
+exclude = [
+# TODO:
+"testsuite/boards",
+"testsuite/config",
+# IGNORE (document reason in trailing comment):
+"testsuite/lib/ton.tcl", # Imported.
+]
+
+# A maximum line length of 80 is current policy, but it hasn't been too
+# strictly enforced.  It's the most frequent and least harmful violation.
+# Ignore this for now.
+ignore = ["line-length"]
+
+extensions = ["exp", "tcl"]
+
+[tool.tclint.style]
+# Used by tclfmt.
+indent = "mixed,4,8"
+
+# Used by both tclint and tclfmt.  Current policy is 80.
+line-length = 80
+
+# Used by tclfmt.
+max-blank-lines = 1
+
+# Used by tclfmt.  False conflicts with emacs tcl mode.
+indent-namespace-eval = true
+
+# Used by tclfmt.
+spaces-in-braces = false
diff --git a/gdb/tclint.toml b/gdb/tclint.toml
deleted file mode 100644 (file)
index bfa004d..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 2025 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Configuration file for the tclint and tclfmt tools from the tclint package
-# ( https://github.com/nmoroze/tclint ).
-#
-# Eventually we'd like to move these settings to pyproject.toml, but currently
-# that's not possible.  See this tclint issue (
-# https://github.com/nmoroze/tclint/issues/120 ).
-#
-# Issues related to using the tclint tool in the gdb testsuite:
-# - tclint does not support expect.
-#   https://github.com/nmoroze/tclint/issues/118
-# - tclint doesn't inspect code passed as arguments to gdb testsuite specific
-#   commands like with_test_prefix.
-#   https://github.com/nmoroze/tclint/issues/121
-# - tclint ignores splat ({*}$foo) when checking number of arguments
-#   https://github.com/nmoroze/tclint/issues/122
-
-exclude = [
-# TODO:
-"gdb/testsuite/boards",
-"gdb/testsuite/config",
-# IGNORE (document reason in trailing comment):
-"gdb/testsuite/lib/ton.tcl", # Imported.
-]
-
-# A maximum line length of 80 is current policy, but it hasn't been too
-# strictly enforced.  It's the most frequent and least harmful violation.
-# Ignore this for now.
-ignore = ["line-length"]
-
-extensions = ["exp", "tcl"]
-
-[style]
-# Used by tclfmt.
-indent = "mixed,4,8"
-
-# Used by both tclint and tclfmt.  Current policy is 80.
-line-length = 80
-
-# Used by tclfmt.
-max-blank-lines = 1
-
-# Used by tclfmt.  False conflicts with emacs tcl mode.
-indent-namespace-eval = true
-
-# Used by tclfmt.
-spaces-in-braces = false