Skip to content

Commit a9c7562

Browse files
paulirwinclaude
andcommitted
Whitelist DrainReclaimer+Slot.Depth/OnEnterForTest in TestPrivateFieldNames
These PascalCase internal fields can't satisfy the camelCase/ALL_CAPS private- field rule: Depth is accessed via ref (Volatile.Read/Write(ref slot.Depth)), so it must stay a field, and OnEnterForTest is the test seam. Add both to the exception regex, matching the existing precedent for MMapDirectory+Chunk. BasePtr/Length (same situation: ref-accessed field-like members of a nested helper class). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 6200937 commit a9c7562

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Lucene.Net.Tests/Support/TestApiConsistency.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public override void TestProtectedFieldNames(Type typeFromTargetAssembly)
3838
[TestCase(typeof(Lucene.Net.Analysis.Analyzer))]
3939
public override void TestPrivateFieldNames(Type typeFromTargetAssembly)
4040
{
41-
base.TestPrivateFieldNames(typeFromTargetAssembly, @"^Lucene\.Net\.Support\.(?:ConcurrentHashSet|PlatformHelper|DateTimeOffsetUtil|Arrays|IO\.FileSupport)|^Lucene\.ExceptionExtensions|^Lucene\.Net\.Util\.Constants\.MaxStackByteLimit|^Lucene\.Net\.Search\.TopDocs\.ShardByteSize|^Lucene\.Net\.Store\.BaseDirectory\.(?:True|False)|^Lucene\.Net\.Store\.MMapDirectory\+Chunk\.(?:BasePtr|Length)$|CharStackBufferSize$");
41+
base.TestPrivateFieldNames(typeFromTargetAssembly, @"^Lucene\.Net\.Support\.(?:ConcurrentHashSet|PlatformHelper|DateTimeOffsetUtil|Arrays|IO\.FileSupport)|^Lucene\.ExceptionExtensions|^Lucene\.Net\.Util\.Constants\.MaxStackByteLimit|^Lucene\.Net\.Search\.TopDocs\.ShardByteSize|^Lucene\.Net\.Store\.BaseDirectory\.(?:True|False)|^Lucene\.Net\.Store\.MMapDirectory\+Chunk\.(?:BasePtr|Length)$|^Lucene\.Net\.Support\.DrainReclaimer\+Slot\.(?:Depth|OnEnterForTest)$|CharStackBufferSize$");
4242
}
4343

4444
[Test, LuceneNetSpecific]

0 commit comments

Comments
 (0)