You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Various code cleanups in preparation of auto-formatting the codebase (#960)
* Replaced null checks with argument guard
* Added curlies on single-statement branches and loops
* Normalize blank lines around SaveChangesAsync in tests
* use const
* Move types into matching files
* Adapt namespaces to match with directory structure
* Fixed inconsistencies in naming conventions
* Remove redundant parenthesis
* Fixed culture-specific string comparisons
* Use newer syntax for dictionary initializers
* Various additional cleanups
* Manual code cleanups in preparation for reformat
* Extract variable on errors in tests to reduce assertion line length
* Hide decimal precision from tests
* Rewrite ResponseStatusCode tests using Theory
* Fixed naming inconsistencies in tests
* Replace FindAsync usage for consistency with other tests
* Added formatter directives on fakers
* Added formatter directives on DbContext types
* Added FirstWithIdAsync / FirstWithIdOrDefaultAsync to reduce line length on database queries in tests
* Added formatting directives on long database queries in tests
* Reduced line length for links assertions
* Variable naming consistency
* Break up long strings to steer formatter
* Extract constant
* cleanup method
* Fixed naming conventions
Resharper was set to auto-detect, making it ignore configured rules
* Additional cleanup based on suggestions from https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
* Use helpers to prevent multiple line breaks in array and list initializers
* Corrected link rendering for hosting inside an IIS application vdir (#955)
Corrected link rendering for hosting inside an IIS application virtual directory
* Update version from 4.0.3 to 4.0.4
* Marked types/members sealed/internal where non-breaking
* Removed redundancies in code
* remove unused tuple elements
* Fixed spelling in comments
* Added formatter directive to ErrorDocumentTests to prevent array chop
* Added [UsedImplicitly] on DbContext classes to suppress suggestions like 'member can be private, set accessor is never used'etc.
* Added [UsedImplicitly] on resource services, repositories, definitions and startups
* Added [UsedImplicitly] on models
* Use discard in empty property setters
* Added missing setter
* Addressed possible NullReferenceException warnings
* Marked assertion methods as such, to suppress warning 'parameter is only used for precondition checks'
Note that one suppression is needed, due to a bug in Resharper
* Addressed possible multiple enumeration warnings
* Suppressed warnings on non-readonly member access in GetHashCode, because these are assigned once at application startup by the resource graph builder and then are considered immutable.
* extra: UsedImplicitly on models
* Added [PublicAPI] on exposed types to suppress warnings like 'type/member can be made internal', 'type has no inheritors and can be marked sealed', 'member is never written to' etc.
* Cleanup Startups
* BenchmarkDotNet runners cannot be sealed
* Suppress cases of unused TResource type parameter, because we register an open generic for them to enable different implementations per resource type.
* Additional cleanup and annotations based on warnings and suggestions
* AV1755: Async method name should end with [Task]Async
* AV1739: Use underscores for unused lambda parameters
* AV1568: Parameter value is overwritten in method body
* AV1535: Block scope in case clauses
* AV1522: Multiple assignments in single statement
* AV1532: Avoid nested loops
* AV1010: Member hides inherited member
* AV1130: Use collection interface as return type
* Fixed: Without the [CustomAssertion] attribute, Fluent Assertions would find the line that calls Subject.StatusCode.Should().Be() and treat the Subject variable as the subject-under-test (SUT). But by applying this attribute, it will ignore this invocation and instead find the SUT by looking for a call to Should().HaveStatusCode() and use the response variable instead.
0 commit comments