Skip to content

CSHARP-6142: Enable and apply code-style rules CS-TV-01, CS-EX-02, CS-NM-03, CS-FL-03 - #2083

Merged
papafe merged 3 commits into
mongodb:mainfrom
papafe:csharp6142
Jul 29, 2026
Merged

CSHARP-6142: Enable and apply code-style rules CS-TV-01, CS-EX-02, CS-NM-03, CS-FL-03#2083
papafe merged 3 commits into
mongodb:mainfrom
papafe:csharp6142

Conversation

@papafe

@papafe papafe commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

https://jira.mongodb.org/browse/CSHARP-6142

First batch of the incremental code-style rollout: enables CS-TV-01 (explicit accessibility modifiers), CS-EX-02 (no this.), CS-NM-03 (PascalCase const fields), and CS-FL-03 (usings outside the namespace, System.* first then alphabetical) in .editorconfig, and brings src/ and tests/ into compliance. Mechanical, no behavior changes.

@papafe
papafe requested a review from a team as a code owner July 28, 2026 10:15
@papafe
papafe requested review from ajcvickers and Copilot July 28, 2026 10:15
@papafe papafe added the maintenance Non-code maintenance (deps, docs, configs, etc.). label Jul 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is the first incremental step in the driver’s code-style rollout: it enables several new Roslyn/.editorconfig style rules (explicit accessibility modifiers, avoid unnecessary this., PascalCase const fields, and using placement/sorting) and applies mechanical edits across src/ and tests/ to align with those rules.

Changes:

  • Updates .editorconfig to enable CS-TV-01, CS-EX-02, CS-NM-03, and CS-FL-03 (currently configured as warnings).
  • Applies explicit accessibility modifiers (e.g., private) where they were previously implicit.
  • Reorders/sorts using directives to be outside namespaces and sorted with System.* first, then alphabetical.

Reviewed changes

Copilot reviewed 175 out of 175 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/MongoDB.TestHelpers/XunitExtensions/TimeoutEnforcing/UnobservedExceptionTestDiscoverer.cs Adds explicit accessibility to a helper method (mechanical style compliance).
tests/MongoDB.Driver.Tests/X509Tests.cs Adds explicit accessibility modifiers to const fields (style compliance).
tests/MongoDB.Driver.Tests/UnifiedTestOperations/UnifiedLoopOperation.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Specifications/read-write-concern/DocumentTestRunner.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Specifications/initial-dns-seedlist-discovery/InitialDnsSeedlistDiscoveryTestRunner.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Specifications/connection-string/ConnectionStringTestRunner.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Specifications/client-side-encryption/prose-tests/ClientEncryptionProseTests.cs Reorders alias using directives (style compliance).
tests/MongoDB.Driver.Tests/Specifications/client-side-encryption/ClientSideEncryptionTestRunner.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/PinnedShardRouterTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/OfTypeDiscriminatorConventionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/OcspIntegrationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/MongoIndexManagerTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/ListDatabasesTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToPipelineTranslators/SelectManyOverDictionaryRepresentationsTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToPipelineTranslators/ReplaceWithUsesConfiguredElementNameTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToPipelineTranslators/OfTypeWithHierarchicalDiscriminatorTypeNamesPipelineTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToPipelineTranslators/OfTypeOverDerivedHierarchyPipelineTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToPipelineTranslators/JoinAfterSelectManyToPipelineTests.cs Adds explicit accessibility to a nested helper class (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToPipelineTranslators/AppendStageToPipelineTranslatorTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToPipelineTranslators/AggregateMatchAndGroupWithIntToLongConversionPipelineTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToFilterTranslators/MethodTranslators/WhereSubstringTrimAndNullableBoolTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToFilterTranslators/MethodTranslators/WhereStringIndexOfComparedToConstantTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToFilterTranslators/ExpressionTranslators/NullableValueEqualsComparisonFilterTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToFilterTranslators/ExpressionTranslators/FindEnumWithVariousUnderlyingTypesEqualityTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToFilterTranslators/ExpressionTranslators/ConvertExpressionToFilterTranslatorTests.cs Removes redundant public from interface members (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/MethodTranslators/StringConcatMethodToAggregationExpressionTranslatorTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/MethodTranslators/SelectStringCompareProjectionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/MethodTranslators/SelectNewArrayOfDerivedTypesProjectionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/MethodTranslators/SelectNestedQueryableContainsProjectionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/MethodTranslators/SelectDictionaryAsArrayOfArraysKeysValuesProjectionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/MethodTranslators/SelectCheckedAddSubtractProjectionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/MethodTranslators/SelectBooleanConditionalProjectionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/MethodTranslators/GroupFirstOrLastNestedFieldAccumulatorTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/ConvertExpressionToAggregationExpressionTranslatorTests.cs Removes redundant public from interface members (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Serializers/StructWithConstructorSerializationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Serializers/ProjectWithObjectIdSerializerTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Serializers/IndexerOverCustomDocumentSerializerTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/UpdateWithDiscriminatorTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/UpdateSetValueObjectTests.cs Adds explicit accessibility to a nested helper class (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/UpdateSetReadOnlyCollectionWithChildSerializerTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/UpdateSetNestedFieldTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/StringTrimTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/QueryOverSubclassCollectionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/PipelineUpdateWithToListTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/FindFilterAndProjectionWithFirstOverArrayTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/CompareToInFilterAndProjectionTests.cs Removes redundant public from interface members (style compliance).
tests/MongoDB.Driver.Tests/Linq/Integration/ArrayConstantAnyFindTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/JsonDrivenTests/JsonDrivenDatabaseAggregateTest.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/JsonDrivenTests/JsonDrivenAssertSameLsidOnLastTwoCommandsTest.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/JsonDrivenTests/JsonDrivenAssertDifferentLsidOnLastTwoCommandsTest.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/GridFS/GridFSUploadStreamTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/GeoJsonObjectModel/GeoJsonFeatureCollectionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Encryption/ClientEncryptionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Encryption/AutoEncryptionOptionsTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/WireProtocol/Messages/ResponseCommandMessageTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/WireProtocol/Messages/RequestCommandMessageTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandMessageBinaryEncoderTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/WireProtocol/Messages/CommandMessageSectionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/WireProtocol/CommandWriteProtocolTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Servers/LoadBalancedServerTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/ReadPreferenceTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/ReadConcernTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/WriteCommandOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/RetryableUpdateCommandOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/RetryableDeleteCommandOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/RetryabilityHelperTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/ReadCommandOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/MaxTimeHelperTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/MapReduceOutputToCollectionOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/MapReduceOperationBaseTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/ListIndexesUsingCommandOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/EndTransactionOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/CreateViewOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/CreateIndexRequestTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/CompositeWriteOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/CommandOperationBaseTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/ChangeStreamOperationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/ChangeStreamCursorTests.cs Reorders using directives and adds explicit accessibility to theory methods (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/BulkWriteOperationErrorTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Operations/AsyncCursorTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/MongoWriteConcernExceptionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/LoadBalancingIntegrationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/IAsyncCursorSourceExtensionsTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/IAsyncCursorExtensionsTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Connections/TcpStreamFactoryTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Connections/HelloResultTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Connections/ConnectionInitializerTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Connections/CommandEventHelperTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Connections/ClientDocumentHelperTests.cs Adds explicit accessibility to const fields (style compliance).
tests/MongoDB.Driver.Tests/Core/ConnectionPools/MaintenanceHelperTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/ConnectionPools/ExclusiveConnectionPoolTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Compression/CompressorsTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Clusters/ReplicaSetConfigTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Clusters/ClusterIdTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/ChangeStreamUpdateDescriptionSerializerTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Bindings/SingleServerReadWriteBindingTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Bindings/ServerChannelSourceTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Bindings/ChannelSourceHandleTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Bindings/ChannelReadWriteBindingTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Bindings/ChannelReadBindingTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Core/Bindings/ChannelChannelSourceTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/ConnectionTimeoutExceptionTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Communication/Security/PlainAuthenticationTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/ClientSessionHandleTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/CausalConsistencyTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/Authentication/Gssapi/Sspi/NativeMethodsTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Tests/AsyncCursorTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.TestHelpers/Core/Logging/LoggableTestClass.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.TestHelpers/Core/Logging/ILoggingService.cs Removes redundant public from interface members (style compliance).
tests/MongoDB.Driver.Encryption.Tests/CipherCallbacksTests.cs Reorders using directives (style compliance).
tests/MongoDB.Driver.Encryption.Tests/BsonUtil.cs Adds explicit accessibility to a helper class and reorders using directives (style compliance).
tests/MongoDB.Driver.Encryption.Tests/BasicTests.cs Reorders using directives and adds explicit accessibility to helper methods (style compliance).
tests/MongoDB.Bson.Tests/Serialization/SuppressIdMemberTests.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.Tests/Serialization/Serializers/InterfaceWithDiscriminatorSerializationTests.cs Adds explicit accessibility to nested types (style compliance).
tests/MongoDB.Bson.Tests/Serialization/Serializers/ExpandoObjectSerializerTests.cs Adds explicit accessibility to a nested type (style compliance).
tests/MongoDB.Bson.Tests/Serialization/Serializers/DiscriminatorTests.cs Adds explicit accessibility to nested types (style compliance).
tests/MongoDB.Bson.Tests/Serialization/IdGenerators/CombGuidGeneratorTests.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.Tests/Serialization/IdGenerators/AscendingGuidGeneratorTests.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.Tests/Serialization/GenericInterfaceMemberMapLookupTests.cs Adds explicit accessibility to nested types and helper method (style compliance).
tests/MongoDB.Bson.Tests/Serialization/CreatorMapMatchingTests.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.Tests/Serialization/BsonSerializerNominalTypeTests.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.Tests/Serialization/BsonClassMapTests.cs Adds explicit accessibility to a member (style compliance).
tests/MongoDB.Bson.Tests/ObjectModel/Decimal128Tests.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.Tests/ObjectModel/BsonDecimal128Tests.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.Tests/IO/BinaryPrimitivesCompatTests.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.Tests/BsonExtensionMethodsNominalTypeTests.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.TestHelpers/JsonDrivenTests/JsonDrivenTestCase.cs Reorders using directives (style compliance).
tests/MongoDB.Bson.TestHelpers/EqualityComparers/EnumerableSetEqualityComparer.cs Adds explicit accessibility to a field (style compliance).
src/MongoDB.Driver/Mql.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/BinaryExpressionToAggregationExpressionTranslator.cs Adds explicit accessibility to helper methods (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Serializers/IGroupingSerializer.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/SerializerFinders/SerializerFinderVisitMethodCall.cs Adds explicit accessibility to a helper method (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/SerializerFinders/SerializerFinderHelperMethods.cs Adds explicit accessibility to helper methods (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstUnsetStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstSetWindowFieldsStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstSetStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstProjectStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstMergeStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstGroupStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstCurrentOpStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstBucketStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstBucketAutoStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Stages/AstAddFieldsStage.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstZipExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstSwitchExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstSliceExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstNaryExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstLetExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstFunctionExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstDateFromPartsExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstCustomAccumulatorExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstComputedDocumentExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstComputedArrayExpression.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/AstPipeline.cs Reorders using directives (style compliance).
src/MongoDB.Driver/IClusterSource.cs Removes redundant public from internal interface members (style compliance).
src/MongoDB.Driver/Encryption/IAutoEncryptionProviderRegistry.cs Removes redundant public from interface method (style compliance).
src/MongoDB.Driver/Encryption/IAutoEncryptionLibMongoCryptController.cs Removes redundant public from interface method (style compliance).
src/MongoDB.Driver/Core/Operations/ChangeStreamCursor.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Core/Events/IEvent.cs Removes redundant public from internal interface member (style compliance).
src/MongoDB.Driver/Core/Compression/ZstandardCompressor.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Core/Compression/SnappyCompressor.cs Reorders using directives (style compliance).
src/MongoDB.Driver/Authentication/ISaslMechanism.cs Removes redundant public from interface members (style compliance).
src/MongoDB.Bson/Serialization/IdGenerators/AscendingGuidGenerator.cs Reorders using directives (style compliance).
src/MongoDB.Bson/Serialization/CreatorMapDelegateCompiler.cs Reorders using directives (style compliance).
src/MongoDB.Bson/Serialization/Attributes/BsonGuidRepresentationAttribute.cs Reorders using directives (style compliance).
src/MongoDB.Bson/ObjectModel/BsonInt64.cs Adds explicit accessibility to const fields (style compliance).
src/MongoDB.Bson/ObjectModel/BsonInt32.cs Adds explicit accessibility to const fields (style compliance).
src/MongoDB.Bson/ObjectModel/BsonDouble.cs Adds explicit accessibility to const fields (style compliance).
src/MongoDB.Bson/IO/OutputBufferChunkSource.cs Adds explicit accessibility to const fields (style compliance).
src/MongoDB.Bson/IO/InputBufferChunkSource.cs Adds explicit accessibility to const fields (style compliance).
src/MongoDB.Bson/IO/IBsonReader.cs Removes redundant public from interface members (style compliance).
src/MongoDB.Bson/IO/ElementAppendingBsonWriter.cs Reorders using directives (style compliance).
src/MongoDB.Bson/IO/ByteBufferStream.cs Reorders using directives (style compliance).
src/MongoDB.Bson/IO/BsonStreamAdapter.cs Reorders using directives (style compliance).
.editorconfig Enables additional code-style rules as warnings and tightens severities (style rollout).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .editorconfig Outdated
Comment on lines +47 to +51
# CS-EX-02: avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_property = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_event = false:warning

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually does not become a build error, but will be enforced at a later time when we will add dotnet format style --verify-no-changes to CI

Comment thread .editorconfig Outdated
Comment on lines +60 to +61
# CS-NM-03: name all constant fields using PascalCase
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
…scalCase const fields

Brings the remaining CS-EX-02 and CS-NM-03 violations into compliance. Mechanical, no behavior changes - this is what `dotnet format style` produces for the rules enabled in the previous commit.
@papafe
papafe merged commit e560bce into mongodb:main Jul 29, 2026
23 of 30 checks passed
@papafe
papafe deleted the csharp6142 branch July 29, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Non-code maintenance (deps, docs, configs, etc.).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants