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/06/09 22:24:03 UTC

(lucenenet) branch master updated: misc: fix typos (#1325)

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 0c15e6da6 misc: fix typos (#1325)
0c15e6da6 is described below

commit 0c15e6da6a6ddf77187cae83a87a4826660f108a
Author: John Bampton <jb...@users.noreply.github.com>
AuthorDate: Wed Jun 10 08:23:58 2026 +1000

    misc: fix typos (#1325)
---
 .github/linters/codespell.txt                          | 18 ------------------
 src/Lucene.Net.Analysis.Phonetic/Language/Bm/Rule.cs   |  6 +++---
 src/Lucene.Net.Benchmark/ByTask/Utils/Algorithm.cs     |  4 ++--
 src/Lucene.Net.Memory/MemoryIndex.cs                   |  2 +-
 src/Lucene.Net.Misc/Document/LazyDocument.cs           |  2 +-
 .../Flexible/Standard/Parser/ParseException.cs         |  2 +-
 src/Lucene.Net.Replicator/package.md                   |  2 +-
 .../Suggest/Jaspell/JaspellTernarySearchTrie.cs        |  4 ++--
 .../Store/BaseDirectoryWrapper.cs                      |  4 ++--
 .../Support/Util/LuceneTestCase.Serialization.cs       |  2 +-
 .../Codecs/TestCodecServices.cs                        |  2 +-
 .../Configuration/TestConfigurationService.cs          |  2 +-
 .../Codecs/PerField/TestPerFieldPostingsFormat2.cs     |  2 +-
 src/Lucene.Net/Index/BufferedUpdatesStream.cs          |  2 +-
 src/Lucene.Net/Index/MergePolicy.cs                    |  4 ++--
 src/Lucene.Net/Search/ReferenceManager.cs              |  2 +-
 src/Lucene.Net/Store/BaseDirectory.cs                  |  4 ++--
 src/Lucene.Net/Util/FilterIterator.cs                  |  2 +-
 src/Lucene.Net/Util/ThreadInterruptedException.cs      |  2 +-
 .../tools/lucene-cli/Resources/Strings.Designer.cs     |  2 +-
 src/dotnet/tools/lucene-cli/Resources/Strings.resx     |  2 +-
 21 files changed, 27 insertions(+), 45 deletions(-)

diff --git a/.github/linters/codespell.txt b/.github/linters/codespell.txt
index fec8720f5..354b9b1d3 100644
--- a/.github/linters/codespell.txt
+++ b/.github/linters/codespell.txt
@@ -120,15 +120,12 @@ entend
 equest
 euclidian
 everytime
-explicity
 faild
 failue
 fallow
 finis
 floatation
 fo
-folling
-followng
 formated
 formen
 formes
@@ -179,7 +176,6 @@ innaccuracy
 instace
 instaed
 intance
-intead
 interger
 interruted
 isnt
@@ -289,8 +285,6 @@ raison
 ream
 reasearch
 recipies
-recursivelly
-redundent
 refering
 refrenced
 relativly
@@ -308,18 +302,15 @@ rougly
 rute
 sate
 sav
-scenerios
 scrip
 seach
 selv
-sensititive
 sentances
 seperate
 seperated
 seperator
 ser
 serialzation
-sesssion
 shold
 shouldnt
 sideral
@@ -327,7 +318,6 @@ sie
 sightly
 similiarty
 simle
-simplifed
 singe
 singl
 siz
@@ -335,15 +325,11 @@ sizin
 slippy
 som
 somme
-specifiy
 splitted
 statics
 sting
 straightaway
 stye
-subseqence
-sucess
-suppresed
 supress
 synchonise
 syncronize
@@ -370,11 +356,8 @@ tread
 trough
 trye
 trys
-tthe
 udo
-udpate
 ue
-unexpexted
 unser
 unter
 useable
@@ -387,7 +370,6 @@ vell
 vender
 vie
 vise
-vists
 vor
 wast
 wee
diff --git a/src/Lucene.Net.Analysis.Phonetic/Language/Bm/Rule.cs b/src/Lucene.Net.Analysis.Phonetic/Language/Bm/Rule.cs
index 5952f67f5..58e454eea 100644
--- a/src/Lucene.Net.Analysis.Phonetic/Language/Bm/Rule.cs
+++ b/src/Lucene.Net.Analysis.Phonetic/Language/Bm/Rule.cs
@@ -825,15 +825,15 @@ public virtual bool PatternAndContextMatches(ICharSequence input, int i)
 
             // evaluate the pattern, left context and right context
             // fail early if any of the evaluations is not successful
-            if (!input.Subsequence(i, ipl - i).Equals(this.pattern)) // LUCENENET: Corrected 2nd Subseqence parameter
+            if (!input.Subsequence(i, ipl - i).Equals(this.pattern)) // LUCENENET: Corrected 2nd Subsequence parameter
             {
                 return false;
             }
-            else if (!this.rContext.IsMatch(input.Subsequence(ipl, input.Length - ipl))) // LUCENENET: Corrected 2nd Subseqence parameter
+            else if (!this.rContext.IsMatch(input.Subsequence(ipl, input.Length - ipl))) // LUCENENET: Corrected 2nd Subsequence parameter
             {
                 return false;
             }
-            return this.lContext.IsMatch(input.Subsequence(0, i - 0)); // LUCENENET: Corrected 2nd Subseqence parameter
+            return this.lContext.IsMatch(input.Subsequence(0, i - 0)); // LUCENENET: Corrected 2nd Subsequence parameter
         }
 
         /// <summary>
diff --git a/src/Lucene.Net.Benchmark/ByTask/Utils/Algorithm.cs b/src/Lucene.Net.Benchmark/ByTask/Utils/Algorithm.cs
index 4c65f3b17..12fff3574 100644
--- a/src/Lucene.Net.Benchmark/ByTask/Utils/Algorithm.cs
+++ b/src/Lucene.Net.Benchmark/ByTask/Utils/Algorithm.cs
@@ -126,7 +126,7 @@ public Algorithm(PerfRunData runData)
                                             }
                                         case StreamTokenizer.TokenType_EndOfStream:
                                             {
-                                                throw RuntimeException.Create("Unexpexted EOF: - " + stok.ToString());
+                                                throw RuntimeException.Create("Unexpected EOF: - " + stok.ToString());
                                             }
                                         case '"':
                                         case '\'':
@@ -184,7 +184,7 @@ public Algorithm(PerfRunData runData)
                         {
 
                             case ':':
-                                if (!colonOk) throw new Exception("colon unexpexted: - " + stok.ToString());
+                                if (!colonOk) throw new Exception("colon unexpected: - " + stok.ToString());
                                 //colonOk = false; // LUCENENET: IDE0059: Remove unnecessary value assignment - this is assigned again below without being read
                                 // get repetitions number
                                 stok.NextToken();
diff --git a/src/Lucene.Net.Memory/MemoryIndex.cs b/src/Lucene.Net.Memory/MemoryIndex.cs
index a90682d79..d6a9f5e48 100644
--- a/src/Lucene.Net.Memory/MemoryIndex.cs
+++ b/src/Lucene.Net.Memory/MemoryIndex.cs
@@ -644,7 +644,7 @@ public void SetNextReader(AtomicReaderContext context)
 
         /// <summary>
         /// Returns a reasonable approximation of the main memory [bytes] consumed by
-        /// this instance. Useful for smart memory sensititive caches/pools. </summary>
+        /// this instance. Useful for smart memory sensitive caches/pools. </summary>
         /// <returns> the main memory consumption </returns>
         public virtual long GetMemorySize()
         {
diff --git a/src/Lucene.Net.Misc/Document/LazyDocument.cs b/src/Lucene.Net.Misc/Document/LazyDocument.cs
index c0de548ff..04bccdd22 100644
--- a/src/Lucene.Net.Misc/Document/LazyDocument.cs
+++ b/src/Lucene.Net.Misc/Document/LazyDocument.cs
@@ -121,7 +121,7 @@ internal virtual Document GetDocument()
             }
         }
 
-        // :TODO: synchronize to prevent redundent copying? (sync per field name?)
+        // :TODO: synchronize to prevent redundant copying? (sync per field name?)
         private void FetchRealValues(string name, int fieldNum)
         {
             Document d = GetDocument();
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/ParseException.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/ParseException.cs
index d4cc30a28..5b47a8d38 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/ParseException.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/ParseException.cs
@@ -132,7 +132,7 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont
         /// <summary>
         /// This is the last token that has been consumed successfully.  If
         /// this object has been created due to a parse error, the token
-        /// followng this token will (therefore) be the first error token.
+        /// following this token will (therefore) be the first error token.
         /// </summary>
         public Token? CurrentToken { get; private set; }
 
diff --git a/src/Lucene.Net.Replicator/package.md b/src/Lucene.Net.Replicator/package.md
index 2b7399a14..58d178299 100644
--- a/src/Lucene.Net.Replicator/package.md
+++ b/src/Lucene.Net.Replicator/package.md
@@ -132,7 +132,7 @@ public class AspNetCoreReplicationResponse : IReplicationResponse
     }
 
     // Return a stream where the ReplicatorService can write to for the response.
-    // Depending on the action either the file or the sesssion token will be written to this stream.
+    // Depending on the action either the file or the session token will be written to this stream.
     public Stream Body => response.Body;
 
     // Called when the ReplicatorService is done writing data to the response.
diff --git a/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellTernarySearchTrie.cs b/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellTernarySearchTrie.cs
index 9da457261..3269157d8 100644
--- a/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellTernarySearchTrie.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellTernarySearchTrie.cs
@@ -803,7 +803,7 @@ public virtual IList<string> MatchAlmost(string key, int numReturnValues)
         }
 
         /// <summary>
-        /// Recursivelly vists the nodes in order to find the ones that almost match a
+        /// Recursively visits the nodes in order to find the ones that almost match a
         /// given key.
         /// </summary>
         /// <param name="currentNode">
@@ -942,7 +942,7 @@ public virtual void Put(string key, object value)
         }
 
         /// <summary>
-        /// Recursivelly visists each node to calculate the number of nodes.
+        /// Recursively visits each node to calculate the number of nodes.
         /// </summary>
         /// <param name="currentNode">
         ///          The current node. </param>
diff --git a/src/Lucene.Net.TestFramework/Store/BaseDirectoryWrapper.cs b/src/Lucene.Net.TestFramework/Store/BaseDirectoryWrapper.cs
index e5d99173f..1aa330435 100644
--- a/src/Lucene.Net.TestFramework/Store/BaseDirectoryWrapper.cs
+++ b/src/Lucene.Net.TestFramework/Store/BaseDirectoryWrapper.cs
@@ -36,7 +36,7 @@ public class BaseDirectoryWrapper : FilterDirectory
         private const int True = 1;
         private const int False = 0;
 
-        // LUCENENET specific - using Interlocked intead of a volatile field for IsOpen.
+        // LUCENENET specific - using Interlocked instead of a volatile field for IsOpen.
         private int isOpen = True; // LUCENENET: Changed from bool to int so we can use Interlocked.
 
         /// <summary>
@@ -44,7 +44,7 @@ public class BaseDirectoryWrapper : FilterDirectory
         /// if the current value <c>==</c> the expected value.
         /// <para/>
         /// Expert: Use this in the <see cref="Directory.Dispose(bool)"/> call to skip
-        /// duplicate calls by using the folling if block to guard the
+        /// duplicate calls by using the following if block to guard the
         /// dispose logic.
         /// <code>
         /// protected override void Dispose(bool disposing)
diff --git a/src/Lucene.Net.TestFramework/Support/Util/LuceneTestCase.Serialization.cs b/src/Lucene.Net.TestFramework/Support/Util/LuceneTestCase.Serialization.cs
index db15aeb47..220d12fa0 100644
--- a/src/Lucene.Net.TestFramework/Support/Util/LuceneTestCase.Serialization.cs
+++ b/src/Lucene.Net.TestFramework/Support/Util/LuceneTestCase.Serialization.cs
@@ -27,7 +27,7 @@ public abstract partial class LuceneTestCase
 #pragma warning disable SYSLIB0011 // Type or member is obsolete (BinaryFormatter)
         /// <summary>
         /// Serializes <paramref name="source"/> using <see cref="BinaryFormatter"/>
-        /// and returns a <see cref="MemoryStream"/> with the result of the serialzation.
+        /// and returns a <see cref="MemoryStream"/> with the result of the serialization.
         /// This method is not meant to scale, it is only for quick serialization verification
         /// in tests.
         /// </summary>
diff --git a/src/Lucene.Net.Tests.TestFramework.DependencyInjection/Codecs/TestCodecServices.cs b/src/Lucene.Net.Tests.TestFramework.DependencyInjection/Codecs/TestCodecServices.cs
index 0b9275dbf..782589666 100644
--- a/src/Lucene.Net.Tests.TestFramework.DependencyInjection/Codecs/TestCodecServices.cs
+++ b/src/Lucene.Net.Tests.TestFramework.DependencyInjection/Codecs/TestCodecServices.cs
@@ -23,7 +23,7 @@ namespace Lucene.Net.Codecs
      */
 
     // The test framework will automatically select the Codec.Default property at random from the complete
-    // set of codecs. For any codecs that were not registed, they need to be supressed with the SuppressCodecs attribute
+    // set of codecs. For any codecs that were not registered, they need to be suppressed with the SuppressCodecs attribute
     // on each test class (or a base class of them).
     [SuppressCodecs("Lucene3x", "Lucene40", "Lucene41", "Lucene42", "Lucene45")]
     public class TestCodecServices : LuceneTestCase
diff --git a/src/Lucene.Net.Tests.TestFramework.DependencyInjection/Configuration/TestConfigurationService.cs b/src/Lucene.Net.Tests.TestFramework.DependencyInjection/Configuration/TestConfigurationService.cs
index 62c169ac3..408bc4959 100644
--- a/src/Lucene.Net.Tests.TestFramework.DependencyInjection/Configuration/TestConfigurationService.cs
+++ b/src/Lucene.Net.Tests.TestFramework.DependencyInjection/Configuration/TestConfigurationService.cs
@@ -22,7 +22,7 @@ namespace Lucene.Net.Configuration
      */
 
     // The test framework will automatically select the Codec.Default property at random from the complete
-    // set of codecs. For any codecs that were not registed, they need to be supressed with the SuppressCodecs attribute
+    // set of codecs. For any codecs that were not registered, they need to be suppressed with the SuppressCodecs attribute
     // on each test class (or a base class of them).
     [SuppressCodecs("Lucene3x", "Lucene40", "Lucene41", "Lucene42", "Lucene45")]
     public class TestConfigurationService : LuceneTestCase
diff --git a/src/Lucene.Net.Tests/Codecs/PerField/TestPerFieldPostingsFormat2.cs b/src/Lucene.Net.Tests/Codecs/PerField/TestPerFieldPostingsFormat2.cs
index efbc7f74b..2202743c1 100644
--- a/src/Lucene.Net.Tests/Codecs/PerField/TestPerFieldPostingsFormat2.cs
+++ b/src/Lucene.Net.Tests/Codecs/PerField/TestPerFieldPostingsFormat2.cs
@@ -113,7 +113,7 @@ public virtual void TestMergeUnusedPerFieldCodec()
         }
 
         /// <summary>
-        /// Test that heterogeneous index segments are merged sucessfully
+        /// Test that heterogeneous index segments are merged successfully
         /// </summary>
         // TODO: not sure this test is that great, we should probably peek inside PerFieldPostingsFormat or something?!
         [Test]
diff --git a/src/Lucene.Net/Index/BufferedUpdatesStream.cs b/src/Lucene.Net/Index/BufferedUpdatesStream.cs
index 7f255cbc2..3f9d3cb3b 100644
--- a/src/Lucene.Net/Index/BufferedUpdatesStream.cs
+++ b/src/Lucene.Net/Index/BufferedUpdatesStream.cs
@@ -607,7 +607,7 @@ private long ApplyTermDeletes(IEnumerable<Term> termsIter, ReadersAndUpdates rld
                     int limit = update.docIDUpto;
 
                     // TODO: we traverse the terms in update order (not term order) so that we
-                    // apply the updates in the correct order, i.e. if two terms udpate the
+                    // apply the updates in the correct order, i.e. if two terms update the
                     // same document, the last one that came in wins, irrespective of the
                     // terms lexical order.
                     // we can apply the updates in terms order if we keep an updatesGen (and
diff --git a/src/Lucene.Net/Index/MergePolicy.cs b/src/Lucene.Net/Index/MergePolicy.cs
index a666be42d..a552f647a 100644
--- a/src/Lucene.Net/Index/MergePolicy.cs
+++ b/src/Lucene.Net/Index/MergePolicy.cs
@@ -545,10 +545,10 @@ protected MergeException(SerializationInfo info, StreamingContext context)
         }
 
         /// <summary>
-        /// Thrown when a merge was explicity aborted because
+        /// Thrown when a merge was explicitly aborted because
         /// <see cref="IndexWriter.Dispose(bool)"/> was called with
         /// <c>false</c>.  Normally this exception is
-        /// privately caught and suppresed by <see cref="IndexWriter"/>.
+        /// privately caught and suppressed by <see cref="IndexWriter"/>.
         /// </summary>
         // LUCENENET: It is no longer good practice to use binary serialization.
         // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
diff --git a/src/Lucene.Net/Search/ReferenceManager.cs b/src/Lucene.Net/Search/ReferenceManager.cs
index 3a638d040..33b1db539 100644
--- a/src/Lucene.Net/Search/ReferenceManager.cs
+++ b/src/Lucene.Net/Search/ReferenceManager.cs
@@ -373,7 +373,7 @@ public virtual void RemoveListener(ReferenceManager.IRefreshListener listener)
 
     /// <summary>
     /// LUCENENET specific class used to provide static access to <see cref="ReferenceManager.IRefreshListener"/>
-    /// without having to specifiy the generic closing type of <see cref="ReferenceManager{G}"/>.
+    /// without having to specify the generic closing type of <see cref="ReferenceManager{G}"/>.
     /// </summary>
     public static class ReferenceManager
     {
diff --git a/src/Lucene.Net/Store/BaseDirectory.cs b/src/Lucene.Net/Store/BaseDirectory.cs
index 3e2666617..991ee1126 100644
--- a/src/Lucene.Net/Store/BaseDirectory.cs
+++ b/src/Lucene.Net/Store/BaseDirectory.cs
@@ -32,7 +32,7 @@ public abstract class BaseDirectory : Directory
         private const int True = 1;
         private const int False = 0;
 
-        // LUCENENET specific - using Interlocked intead of a volatile field for IsOpen.
+        // LUCENENET specific - using Interlocked instead of a volatile field for IsOpen.
         private int isOpen = True; // LUCENENET: Added check to ensure we aren't disposed.
 
         /// <summary>
@@ -51,7 +51,7 @@ protected internal virtual bool IsOpen
         /// if the current value <c>==</c> the expected value.
         /// <para/>
         /// Expert: Use this in the <see cref="Directory.Dispose(bool)"/> call to skip
-        /// duplicate calls by using the folling if block to guard the
+        /// duplicate calls by using the following if block to guard the
         /// dispose logic.
         /// <code>
         /// protected override void Dispose(bool disposing)
diff --git a/src/Lucene.Net/Util/FilterIterator.cs b/src/Lucene.Net/Util/FilterIterator.cs
index c145cad00..361813393 100644
--- a/src/Lucene.Net/Util/FilterIterator.cs
+++ b/src/Lucene.Net/Util/FilterIterator.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Util
 
     /// <summary>
     /// An <see cref="IEnumerator{T}"/> implementation that filters elements with a boolean predicate. </summary>
-    // LUCENENET specific - simplifed the logic, as this is much easier to do in .NET
+    // LUCENENET specific - simplified the logic, as this is much easier to do in .NET
     public sealed class FilterEnumerator<T> : IEnumerator<T>
     {
         private readonly IEnumerator<T> iter;
diff --git a/src/Lucene.Net/Util/ThreadInterruptedException.cs b/src/Lucene.Net/Util/ThreadInterruptedException.cs
index 41393e745..83e21daff 100644
--- a/src/Lucene.Net/Util/ThreadInterruptedException.cs
+++ b/src/Lucene.Net/Util/ThreadInterruptedException.cs
@@ -30,7 +30,7 @@ namespace Lucene.Net.Util
     /// calling thread of <see cref="J2N.Threading.ThreadJob"/> so it reaches the appropriate handler.
     /// </summary>
     // LUCENENET: In Lucene, this exception was so it could be re-thrown unchecked. It has been
-    // re-purposed in .NET but used in all the same scenerios.
+    // re-purposed in .NET but used in all the same scenarios.
     // LUCENENET: It is no longer good practice to use binary serialization.
     // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
 #if FEATURE_SERIALIZABLE_EXCEPTIONS
diff --git a/src/dotnet/tools/lucene-cli/Resources/Strings.Designer.cs b/src/dotnet/tools/lucene-cli/Resources/Strings.Designer.cs
index 5ee2a2fb6..755fd7cf1 100644
--- a/src/dotnet/tools/lucene-cli/Resources/Strings.Designer.cs
+++ b/src/dotnet/tools/lucene-cli/Resources/Strings.Designer.cs
@@ -836,7 +836,7 @@ public class Strings {
         }
 
         /// <summary>
-        ///    Looks up a localized string similar to Extracts the top N most frequent terms (by document frequency) from an index and reports thier document frequency..
+        ///    Looks up a localized string similar to Extracts the top N most frequent terms (by document frequency) from an index and reports their document frequency..
         /// </summary>
         public static string IndexListHighFreqTermsCommandExtendedHelpText {
             get {
diff --git a/src/dotnet/tools/lucene-cli/Resources/Strings.resx b/src/dotnet/tools/lucene-cli/Resources/Strings.resx
index c5f8c4b22..a8fc3b569 100644
--- a/src/dotnet/tools/lucene-cli/Resources/Strings.resx
+++ b/src/dotnet/tools/lucene-cli/Resources/Strings.resx
@@ -412,7 +412,7 @@ WARNING: This command should only be used on an emergency basis as it will cause
     <value>Lists the top N most frequent terms by document frequency.</value>
   </data>
   <data name="IndexListHighFreqTermsCommandExtendedHelpText" xml:space="preserve">
-    <value>Extracts the top N most frequent terms (by document frequency) from an index and reports thier document frequency.</value>
+    <value>Extracts the top N most frequent terms (by document frequency) from an index and reports their document frequency.</value>
   </data>
   <data name="IndexListHighFreqTermsCommandFieldDescription" xml:space="preserve">
     <value>The field to consider. If omitted, considers all fields.</value>