You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by pa...@apache.org on 2026/10/17 01:54:18 UTC

(lucenenet) branch master updated: Centralize codespell config for easier use (#1495)

This is an automated email from the ASF dual-hosted git repository.

paulirwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ef20cd67 Centralize codespell config for easier use (#1495)
3ef20cd67 is described below

commit 3ef20cd67e2ed7a4ab7b2f89c283d5b4a9313ad7
Author: John Bampton <jb...@users.noreply.github.com>
AuthorDate: Sat Oct 17 11:54:12 2026 +1000

    Centralize codespell config for easier use (#1495)
---
 .editorconfig           | 3 +++
 .pre-commit-config.yaml | 7 +++----
 pyproject.toml          | 7 +++++++
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/.editorconfig b/.editorconfig
index 81c4aae3f..cef566908 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -31,6 +31,9 @@ trim_trailing_whitespace = false
 indent_size = 2
 trim_trailing_whitespace = false
 
+[*.toml]
+indent_size = 2
+
 # ========================================
 # YAML files (preserve trailing spaces for indented script blocks)
 # ========================================
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5399c9655..2098f0fda 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -68,8 +68,7 @@ repos:
       - id: codespell
         name: run codespell
         description: check spelling with codespell
-        exclude: ^src/Lucene\.Net\.Analysis\.Common/Analysis/../.*\.rslp$|^.*Lucene\.Net\.Tests.*$
-        args: [--ignore-words=.github/linters/codespell.txt]
+        args: [-c, pyproject.toml]
         priority: 50
   - repo: https://github.com/oxipng/oxipng
     rev: 36f3ef8aac65ecf1761739ea2f2e530281f1312b # frozen: v10.2.1
@@ -85,12 +84,12 @@ repos:
       - id: end-of-file-fixer
         name: run end-of-file-fixer
         description: makes sure files end in a newline and only a newline
-        files: \.(cs|md)$
+        files: \.(cs|md|toml)$
         priority: 35
       - id: trailing-whitespace
         name: run trailing-whitespace
         description: trims trailing whitespace
-        files: \.(bat|config|json|md|props|ps1|rdf|targets|tmpl|xml|ya?ml)$
+        files: \.(bat|config|json|md|props|ps1|rdf|targets|tmpl|toml|xml|ya?ml)$
         args: [--markdown-linebreak-ext=md]
         priority: 30
       - id: check-ast
diff --git a/pyproject.toml b/pyproject.toml
index 6c786f46a..0427d9749 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,2 +1,9 @@
 [tool.bandit]
 skips = ["B101"] # https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html#b101-assert-used
+
+[tool.codespell]
+skip = [
+  "*.rslp",
+  "*Lucene.Net.Tests*"
+]
+ignore-words = ".github/linters/codespell.txt"