| report date | 04 Jul 2024 11:53:22 |
| analysis duration | 00:05.663 |
| ndepend version | 2024.1.1 Professional Developer/Build-Machine Edition |
| baseline | Baseline is same code base snapshot. |
| code coverage data | Not Defined. To import Code Coverage Data, please read this online documentation. |
Diagrams
Application Metrics
Note: Further Application Statistics are available.
|
- The number of projects with no issues.
- Sort the column #Un-resolved ascending to list these files first.
- The number of projects with at least one unresolved issue but no new issue added since the baseline.
- Sort the column #Un-resolved Issues to list these files first.
- The number of projects with at least one new issue introduced since the baseline.
- Sort the column #New Issues to list these files first.
This occurs because the search pattern for the source files grid is set to the project's name.
| Project Name | #New Issues | #Un- resolved | #Fixed | New Debt | Debt | %Cov | #Types | #Statements |
|---|---|---|---|---|---|---|---|---|
| 0 | 19 | 0 | 0min 0s | 2h 55min | N/A | 9 | 213 |
- The number of Quality Gates that pass.
- A Quality Gate passes if its value is lower than its warning threshold, and lower than its failure threshold.
- The number of Quality Gates that warn.
- A Quality Gate warns if its value is equal to or higher than its warning threshold, but lower than its failure threshold.
- The number of Quality Gates that fail.
- A Quality Gate fails if its value is equal to or higher than its failure threshold. If any, it means that the code is not ready for production. You have the option to stop the build process upon any Quality Gate failure.
be run on the baseline. Hence they
have blank trend and baseline value.
| Name | Trend | Baseline Status | Status | Group | |||
|---|---|---|---|---|---|---|---|
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates | ||||||
| Quality Gates |
- The number of CQLinq rules that are not violated. Those rules are not listed below.
- Notice that Roslyn Analyzers that pass are not imported. Thus, they are not counted in this number.
- The number of CQLinq rules marked as critical that are violated. They are listed below with a top-left red tick.
- By sorting the first column, violated critical rules can be listed first.
- Rules can also be checked live at development-time, from within the IDE Online documentation.
- Rules that rely on diff cannot be run on the baseline. Hence, they have blank values in column #New Issues or Fixed.
- Number of Rules or Queries with Error (syntax error, exception thrown, time-out): 0
| Id | Name | #New Issues | Un- resolved | Fixed | New Debt | Debt | Category | |
|---|---|---|---|---|---|---|---|---|
| ND2100● | Avoid referencing source file out of the project directory | 0 | |m100|0| 4 | 0 | 0min 0s | |m43|1| 40min | Source Files Organization | |
| ND3103● | Don't disable certificate validation | 0 | |m66|1| 3 | 0 | 0min 0s | |m100|0| 1h 30min | Security | |
| ND1807● | Avoid public methods not publicly visible | 0 | |m66|2| 3 | 0 | 0min 0s | |m0|7| 1min 30s | Visibility | |
| ND1203● | Class with no descendant should be sealed if possible | 0 | |m66|3| 3 | 0 | 0min 0s | |m0|6| 1min 30s | Object Oriented Design | |
| ND1701● | Potentially Dead Methods | 0 | |m66|4| 3 | 0 | 0min 0s | |m32|2| 30min | Dead Code | |
| ND2104● | Types with source files stored in the same directory, should be declared in the same namespace | 0 | |m0|5| 1 | 0 | 0min 0s | |m6|3| 7min | Source Files Organization | |
| ND1803● | Types that could be declared as private, nested in a parent type | 0 | |m0|6| 1 | 0 | 0min 0s | |m1|4| 3min 0s | Visibility | |
| ND1307● | Declare types in namespaces | 0 | |m0|7| 1 | 0 | 0min 0s | |m0|5| 2min 0s | Design |
Size
% Coverage and % Debt
Issues
Rules
Quality Gates
Debt
Analysis Logs
Logs emitted during NDepend analysis.
Warnings can reveal potential flaws concerning the health of the build process.
A particular warning can be disabled through the NDepend interactive UI, panel Error List, tick the checkbox Disabled corresponding to the warning to disable.
| Message | |
|---|---|
| Begin full analysis with NDepend v2024.1.1 on 04 Jul 2024 11:53:22 | |
| Visual Studio solution file resolved to absolute file path: from {.\ClearstreamAPIConnector.sln} to {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.sln} | |
| Output directory resolved to absolute directory path: C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\NDependOut | |
| .NET Assembly resolved from the Visual Studio solution file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.sln} C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\bin\Debug\net7.0\ClearstreamAPIConnector.dll | |
| No .NET Assembly filtered out from the Visual Studio solution file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.sln}. | |
| Concurrent mode | |
| The source file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\DiTemplate.cs} (last modified 26 Jun 2024 08:42:44) and the PDB file of the assembly {ClearstreamAPIConnector} (last modified 18 Aug 2023 12:45:55) are not in-sync. | |
| The source file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\LoggingHandler.cs} (last modified 26 Jun 2024 08:42:44) and the PDB file of the assembly {ClearstreamAPIConnector} (last modified 18 Aug 2023 12:45:55) are not in-sync. | |
| The source file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\Program.cs} (last modified 26 Jun 2024 08:42:44) and the PDB file of the assembly {ClearstreamAPIConnector} (last modified 18 Aug 2023 12:45:55) are not in-sync. | |
| The source file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\Token.cs} (last modified 26 Jun 2024 08:42:44) and the PDB file of the assembly {ClearstreamAPIConnector} (last modified 18 Aug 2023 12:45:55) are not in-sync. | |
| 4 source files parsed ; 4 source files not found ; 4 source files not in-sync with PDB | |
| 0 code rule has been extracted from code. | |
| No issue have been imported. No directory that contains issue files have been resolved from the project ClearstreamAPIConnector | |
| No dependency cycle detected in assemblies referencement graph. | |
| Do merge code generated by compiler into application code. | |
| Analyze dependencies of your application. | |
| No SuppressMessageAttribute found in the analyzed code base. Since NDepend v2018.2 SuppressMessageAttribute can be used to suppress NDepend issues. Don't forget to set in your projects the compilation symbol CODE_ANALYSIS to use this attribute to suppress NDepend issues. | |
| Persisting code model snapshot in {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\NDependOut\NDependAnalysisResult_ClearstreamAPIConnector_2024Jul04_11h53m22.ndar} | |
| The source directory {C:\Users\johan\OneDrive\DEV\ClearstreamAPIConnector} referenced by the PDB file of the assembly {ClearstreamAPIConnector} can't be found. | |
| Log trend metrics values. | |
| Rule {From now, all types added should be 100% covered by tests} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {From now, all types added should be 100% covered by tests} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Avoid decreasing code coverage by tests of types} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Avoid decreasing code coverage by tests of types} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Code should be tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Code should be tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {New Types and Methods should be tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {New Types and Methods should be tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Methods refactored should be tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Methods refactored should be tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Assemblies and Namespaces should be tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Assemblies and Namespaces should be tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Types almost 100% tested should be 100% tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Types almost 100% tested should be 100% tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Namespaces almost 100% tested should be 100% tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Namespaces almost 100% tested should be 100% tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Types that used to be 100% covered by tests should still be 100% covered} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Types that used to be 100% covered by tests should still be 100% covered} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Types tagged with FullCoveredAttribute should be 100% covered} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Types tagged with FullCoveredAttribute should be 100% covered} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Types 100% covered should be tagged with FullCoveredAttribute} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Types 100% covered should be tagged with FullCoveredAttribute} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Methods should have a low C.R.A.P score} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Rule {Methods should have a low C.R.A.P score} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots. | |
| Quality Gate {Percentage Coverage} relies on code coverage data that is not available in the baseline code base snapshot. | |
| Quality Gate {Percentage Coverage} relies on code coverage data that is not available in the newer code base snapshot. | |
| Quality Gate {Percentage Coverage on New Code} relies on code coverage data that is not available in the baseline code base snapshot. | |
| Quality Gate {Percentage Coverage on New Code} relies on code coverage data that is not available in the newer code base snapshot. | |
| Quality Gate {Percentage Coverage on Refactored Code} relies on code coverage data that is not available in the baseline code base snapshot. | |
| Quality Gate {Percentage Coverage on Refactored Code} relies on code coverage data that is not available in the newer code base snapshot. | |
| Execute queries and rules | |
| Output report source files | |
| The baseline versions of source files modified are not available in the report. Reason: Cannot find the file {SourceFiles.zip} in the analysis result directory {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\NDependOut}. Make sure that the NDepend Project Properties > Analysis > Zip Source Files setting is enabled. | |
| Output report projects | |
| Building the report (standard). | |
| NDepend analysis done. Duration: 00:05.663 |
Application Statistics
| Stat | # Occurences | Avg | StdDev | Max |
|---|---|---|---|---|
| Properties on interfaces | interfaces | 0 | 0 | -1 properties on |
| Methods on interfaces | interfaces | 0 | 0 | -1 methods on |
| Arguments on methods on interfaces | methods | 0 | 0 | -1 arguments on |
| Public properties on classes | 9 Classes | 1.56 | 3.24 | 10 public properties on TestClearstreamAPIEndpoint.DiTemplate |
| Public methods on classes | 9 classes | 4.22 | 6.43 | 21 public methods on TestClearstreamAPIEndpoint.DiTemplate |
| Arguments on public methods on classes | 38 methods | 0.5 | 0.5 | 1 arguments on System.Runtime.CompilerServices.NullableAttribute..ctor(Byte) |
| IL instructions in non-abstract methods | 47 methods | 52.57 | 121.36 | 430 IL instructions in TestClearstreamAPIEndpoint.Program.GetRefreshTokenAsync(Token) |
| Cyclomatic complexity on non abstract Methods | 47 Methods | 4.77 | 9.64 | CC = 34 for TestClearstreamAPIEndpoint.Program.GetRefreshTokenAsync(Token) |
Assemblies Metrics
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
| Assemblies | # lines of code | # IL instruction | # Types | # Abstract Types | # lines of comment | % Comment | % Coverage | Afferent Coupling | Efferent Coupling | Relational Cohesion | Instability | Abstractness | Distance |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ClearstreamAPIConnector v1.0.0.0 | 213 | 2471 | 9 | 0 | 119 | 35.84 | - | 0 | 65 | 2 | 1 | 0 | 0 |
If you wish to define thresholds on types' Code Metrics, consider writing some Rule.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
Types Metrics : Code Quality
| Type Name | Type Rank | # Lines Of Code | # IL Instructions | # Lines Of Comment | % Comment | Cyclomatic Complexity | IL Cyclomatic Complexity | % Coverage | Afferent Coupling | Efferent Coupling | Type Namespace |
|---|---|---|---|---|---|---|---|---|---|---|---|
| EmbeddedAttribute | 4.51 | 0 | 4 | - | - | - | 1 | - | 3 | 3 | Microsoft.CodeAnalysis |
| NullableAttribute | 4.49 | 0 | 19 | - | - | - | 2 | - | 5 | 7 | System.Runtime.CompilerServices |
| NullableContextAttribute | 2.64 | 0 | 7 | - | - | - | 1 | - | 4 | 6 | System.Runtime.CompilerServices |
| DiTemplate | 2.12 | 20 | 74 | 0 | 0 | 0 | 21 | - | 2 | 8 | TestClearstreamAPIEndpoint |
| LoggingHandler | 0.27 | 13 | 267 | 0 | 0 | 0 | 20 | - | 1 | 23 | TestClearstreamAPIEndpoint |
| DiTemplateList | 0.27 | 0 | 4 | - | - | - | 1 | - | 1 | 4 | TestClearstreamAPIEndpoint |
| Token | 0.27 | 8 | 32 | 0 | 0 | 0 | 9 | - | 1 | 8 | |
| Program | 0.15 | 172 | 2057 | 0 | 0 | 0 | 168 | - | 0 | 63 | TestClearstreamAPIEndpoint |
| RefSafetyRulesAttribute | 0.15 | 0 | 7 | - | - | - | 1 | - | 0 | 6 | System.Runtime.CompilerServices |
Types Metrics : Code Members and Inheritance
| Type Name | # Instance Methods | Nb Static Methods | Nb Properties | # Fields | # Children Classes | Depth Of Inheritance Tree | Type Namespace |
|---|---|---|---|---|---|---|---|
| EmbeddedAttribute | 1 | 0 | 0 | 0 | 0 | 2 | Microsoft.CodeAnalysis |
| NullableAttribute | 2 | 0 | 0 | 1 | 0 | 2 | System.Runtime.CompilerServices |
| NullableContextAttribute | 1 | 0 | 0 | 1 | 0 | 2 | System.Runtime.CompilerServices |
| DiTemplate | 21 | 0 | 10 | 10 | 0 | 1 | TestClearstreamAPIEndpoint |
| LoggingHandler | 2 | 0 | 0 | 0 | 0 | 1 | TestClearstreamAPIEndpoint |
| DiTemplateList | 1 | 0 | 0 | 0 | 0 | 1 | TestClearstreamAPIEndpoint |
| Token | 9 | 0 | 4 | 4 | 0 | 1 | |
| Program | 1 | 8 | 0 | 0 | 0 | 1 | TestClearstreamAPIEndpoint |
| RefSafetyRulesAttribute | 1 | 0 | 0 | 1 | 0 | 2 | System.Runtime.CompilerServices |
Types Metrics : Lack Of Cohesion Of Methods and Association Between Classes
| Type Name | Lack Of Cohesion Of Methods | Lack Of Cohesion Of Methods HS | Association Between Classes | Type Namespace |
|---|---|---|---|---|
| EmbeddedAttribute | 0 | 0 | 1 | Microsoft.CodeAnalysis |
| NullableAttribute | 0 | 0 | 1 | System.Runtime.CompilerServices |
| NullableContextAttribute | 0 | 0 | 1 | System.Runtime.CompilerServices |
| DiTemplate | 0 | 0 | 1 | TestClearstreamAPIEndpoint |
| LoggingHandler | 0 | 0 | 18 | TestClearstreamAPIEndpoint |
| DiTemplateList | 0 | 0 | 1 | TestClearstreamAPIEndpoint |
| Token | 0 | 0 | 1 | |
| Program | 0 | 0 | 81 | TestClearstreamAPIEndpoint |
| RefSafetyRulesAttribute | 0 | 0 | 1 | System.Runtime.CompilerServices |
Namespaces Metrics
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
| Namespaces | # lines of code | # IL instruction | # Types | # lines of comment | % Comment | % Coverage | Afferent Coupling | Efferent Coupling |
|---|---|---|---|---|---|---|---|---|
| 8 | 32 | 1 | - | - | - | 1 | 4 | |
| Microsoft.CodeAnalysis | 0 | 4 | 1 | - | - | - | 1 | 2 |
| ClearstreamAPIConnector .dll::System.Runtime .CompilerServices | 0 | 33 | 3 | - | - | - | 2 | 3 |
| TestClearstreamAPIEndpoint | 205 | 2402 | 4 | - | - | - | 0 | 19 |
| Quality Gates 1200 |
| Quality Gate Pass: Percentage Coverage |
Scalar Result: N/A %
| Quality Gate Pass: Percentage Coverage on New Code |
Scalar Result: N/A %
| Quality Gate Pass: Percentage Coverage on Refactored Code |
Scalar Result: N/A %
| Quality Gate Pass: Blocker Issues |
No issue matched
| Quality Gate Pass: Critical Issues |
No issue matched
| Quality Gate Pass: New Blocker / Critical / High Issues |
No issue matched
| Quality Gate Pass: Critical Rules Violated |
No rule matched
| Quality Gate Pass: Treat Compiler Warnings as Error |
No issue matched
| Quality Gate Pass: Percentage Debt |
Scalar Result: 6.64 %
| Quality Gate Pass: New Debt since Baseline |
Scalar Result: 0 man-days
| Quality Gate Pass: Debt Rating per Namespace |
No namespace matched
| Quality Gate Pass: New Annual Interest since Baseline |
Scalar Result: 0 man-days
| Hot Spots 000 |
| Code Smells 000 |
| Code Smells Regression 000 |
| Object Oriented Design 000 |
| Design 000 |
| Architecture 000 |
| API Breaking Changes 000 |
| Code Coverage 000 |
| Dead Code 000 |
| Security 000 |
| Visibility 000 |
| Immutability 000 |
| Naming Conventions 000 |
| Source Files Organization 000 |
| .NET Framework Usage 000 |
| API Usage 000 |
| Defining JustMyCode 000 |
| Trend Metrics 000 |
| Code Diff Summary 000 |
| Roslyn Analyzers 000 |
| Rules extracted from Source Code 000 |
| Object Oriented Design 1310 |
|
| Rule Violated: ND1203 Class with no descendant should be sealed if possible |
• How to Fix Issues of this Rule: For each matched class, take the time to assess if it is really meant to be subclassed. Certainly most matched class will end up being declared as sealed.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1203:ClassWithNoDescendantShouldBeSealedIfPossible", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 3 types matched |
Formatting: bold✱ means added ● means code was changed |
| Design 1110 |
|
| Rule Violated: ND1307 Declare types in namespaces |
• How to Fix Issues of this Rule: To fix a violation of this rule, declare all types of all anonymous namespaces in some named namespaces.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1307:DeclareTypesInNamespaces", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 1 namespace matched |
Formatting: bold✱ means added ● means code was changed |
| 1 namespace | childTypes | # lines of code (LOC) | Debt | Severity | Full Name |
|---|---|---|---|---|---|
| N:anonymous namespace in assembly ClearstreamAPIConnector | |m0|0| 1 type | |m0|0| 8 | |m0|0| 2min 0s | 0Medium | {anonymous namespace} in assembly ClearstreamAPIConnector |
| Dead Code 310 |
|
| Rule Violated: ND1701 Potentially Dead Methods |
• How to Fix Issues of this Rule: Static analysis cannot provide an exact list of dead methods, because there are several ways to invoke a method dynamically (like through reflection). For each method matched by this query, first investigate if the method is invoked somehow (like through reflection). If the method is really never invoked, it is important to remove it to avoid maintaining useless code. If you estimate the code of the method might be used in the future, at least comment it, and provide an explanatory comment about the future intentions. If a method is invoked somehow, but still is matched by this rule, you can tag it with the attribute IsNotDeadCodeAttribute found in NDepend.API.dll to avoid matching the method again. You can also provide your own attribute for this need, but then you'll need to adapt this code rule. Issues of this rule have a Debt equal to 10 minutes because it only takes a short while to investigate if a method can be safely discarded. On top of these 10 minutes, the depth of usage of such method adds up 3 minutes per unity because dead method only called by dead code takes a bit more time to be investigated. The Annual Interest of issues of this rule, the annual cost to not fix such issue, is proportional to the type #lines of code, because the bigger the method is, the more it slows down maintenance.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1701:PotentiallyDeadMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 3 methods matched |
Formatting: bold✱ means added ● means code was changed |
| 3 methods | depth | MethodsCallingMe | Debt | Annual Interest | Full Name |
|---|---|---|---|---|---|
| |m0|0| 0 | 0no method | |m0|0| 10min | 210min | TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) | |
| |m0|1| 0 | 1no method | |m0|1| 10min | 042min | TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) | |
| |m0|2| 0 | 2no method | |m0|2| 10min | 128min | TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token) |
| Security 810 |
|
| Rule Violated: ND3103 Don't disable certificate validation |
• How to Fix Issues of this Rule: Don't rely on a weak custom certificate validation. If a legitimate custom certificate validation procedure must be subscribed, you can chose to suppress related issue(s).
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND3103:DontDisableCertificateValidation", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 3 methods matched |
Formatting: bold✱ means added ● means code was changed |
| 3 methods | Debt | Severity | Full Name |
|---|---|---|---|
| |m0|0| 30min | 0High | TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) | |
| |m0|1| 30min | 1High | TestClearstreamAPIEndpoint.Program .GetElibilityTokenAsync() | |
| |m0|2| 30min | 2High | TestClearstreamAPIEndpoint.Program .Main(String[]) |
| Visibility 920 |
| Rule Violated: ND1807 Avoid public methods not publicly visible |
• How to Fix Issues of this Rule: Declare the method as internal if it is used outside of its type, else declare it as private.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1807:AvoidPublicMethodsNotPubliclyVisible", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 3 methods matched |
Formatting: bold✱ means added ● means code was changed |
| 3 methods | parentTypeVisibility | declareMethodAs | methodsCaller | Debt | Severity | Full Name |
|---|---|---|---|---|---|---|
| 0declared as *internal* | 0internal | |m100|0| 3 methods | |m0|0| 0min 30s | 0Low | Token.get_access_token() | |
| 1declared as *internal* | 1internal | |m0|2| 1 method | |m0|1| 0min 30s | 1Low | Token.get_expires_in() | |
| 2declared as *internal* | 2internal | |m50|1| 2 methods | |m0|2| 0min 30s | 2Low | Token.get_refresh_token() |
| Rule Violated: ND1803 Types that could be declared as private, nested in a parent type |
• How to Fix Issues of this Rule: Nest each matched type into the specified parent type and declare it as private. However nested private types are hardly testable. Hence this rule might not be applied to types consumed directly by tests.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1803:TypesThatCouldBeDeclaredAsPrivateNestedInAParentType", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 1 type matched |
Formatting: bold✱ means added ● means code was changed |
| 1 type | couldBeNestedIn | Debt | Severity | Full Name |
|---|---|---|---|---|
| 0 | |m0|0| 3min 0s | 0Low | TestClearstreamAPIEndpoint .DiTemplateList |
| Source Files Organization 420 |
| Rule Violated: ND2100 Avoid referencing source file out of the project directory |
• How to Fix Issues of this Rule: To fix a violation of this rule, prefer referencing from a VS project only source files defined in sub-directories of the VS project file location. By default issues of this rule have a Low severity because they reflect more an advice than a problem.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND2100:AvoidReferencingSourceFileOutOfVisualStudioProjectDirectory", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 4 types matched |
Formatting: bold✱ means added ● means code was changed |
| 4 types | sourceFilePath | projectFilePath | Debt | Severity | Full Name |
|---|---|---|---|---|---|
| 1 | 1 | |m0|1| 10min | 1Low | Token | |
| 0 | 0 | |m0|0| 10min | 0Low | TestClearstreamAPIEndpoint .DiTemplate | |
| 3 | 3 | |m0|3| 10min | 3Low | TestClearstreamAPIEndpoint .LoggingHandler | |
| 2 | 2 | |m0|2| 10min | 2Low | TestClearstreamAPIEndpoint.Program |
| Rule Violated: ND2104 Types with source files stored in the same directory, should be declared in the same namespace |
• How to Fix Issues of this Rule: Violations of this rule are types in the typesOutOfMainNamespace column. Typically such type … • … is contained in the wrong namespace but its source file is stored in the right directory. In such situation the type should be contained in main namespace. • … is contained in the right namespace but its source file is stored in the wrong directory In such situation the source file of the type must be moved to the proper parent namespace directory. • … is declared in multiple source files, stored in different directories. In such situation it is preferable that all source files are stored in a single directory. The estimated Debt, which means the effort to fix such issue, is equal to 2 minutes plus 5 minutes per type in typesOutOfMainNamespace.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND2104:TypesWithSourceFilesStoredInTheSameDirectoryShouldBeDeclaredInTheSameNamespace", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 1 namespace matched |
Formatting: bold✱ means added ● means code was changed |
| 1 namespace | typesOutOfMainNamespace | typesInMainNamespace | Debt | Severity | Full Name |
|---|---|---|---|---|---|
| |m0|0| 1 type | |m0|0| 3 types | |m0|0| 7min | 0High | TestClearstreamAPIEndpoint |
Hot Spots
| Code Query: Types Hot Spots |
3 types matched
| 3 types | Debt | Issues | Annual Interest | Breaking Point | # lines of code (LOC) | DebtRating | DebtRatio | Full Name |
|---|---|---|---|---|---|---|---|---|
| |m100|0| 2h 10min | |m100|0| First 3 of 8 issues
| |m100|0| 2h 22min | |m0|2| 335d | |m100|0| 172 | 1B | |m19|1| 8.3 | TestClearstreamAPIEndpoint.Program | |
| |m6|1| 12min | |m50|1| First 3 of 5 issues
| |m0|1| 2min 0s | |m100|0| 6y | |m4|1| 8 | 2B | |m0|2| 5.34 | Token | |
| |m0|2| 3min 30s | |m0|2| 2 issues
| |m0|2| 2min 0s | |m16|1| 1y 273d | |m0|2| 0 | 0D | |m100|0| 20.25 | TestClearstreamAPIEndpoint .DiTemplateList |
| Code Query: Types to Fix Priority |
1 type matched
| 1 type | Breaking Point | Debt | Annual Interest | Issues | # lines of code (LOC) | DebtRating | DebtRatio | Full Name |
|---|---|---|---|---|---|---|---|---|
| |m0|0| 335d | |m0|0| 2h 10min | |m0|0| 2h 22min | |m0|0| First 3 of 8 issues
| |m0|0| 172 | 0B | |m0|0| 8.3 | TestClearstreamAPIEndpoint.Program |
| Code Query: Issues to Fix Priority |
19 issues matched
| 19 issues | Debt | Annual Interest | Breaking Point | CodeElement | Full Name |
|---|---|---|---|---|---|
| High issue on: | |m32|05| 10min | 0042min | |m15|10| 86d | 06 | Rule violated: Potentially Dead Methods |
| Medium issue on: | |m0|14| 0min 30s | 102min 0s | |m16|09| 91d | 05 | Rule violated: Class with no descendant should be sealed if possible |
| Medium issue on: | |m0|13| 0min 30s | 072min 0s | |m16|07| 91d | 08 | Rule violated: Class with no descendant should be sealed if possible |
| {C:TestClearstreamAPIEndpoint .DiTemplateList} | |m0|18| 0min 30s | 082min 0s | |m16|08| 91d | 07 | Rule violated: Class with no descendant should be sealed if possible |
| {N:TestClearstreamAPIEndpoint} | |m22|10| 7min | 0420min | |m23|06| 127d | 04 | Rule violated: Types with source files stored in the same directory, should be declared in the same namespace |
| High issue on: | |m32|06| 10min | 0128min | |m23|05| 130d | 01 | Rule violated: Potentially Dead Methods |
| Medium issue on: | |m5|12| 2min 0s | 092min 0s | |m66|04| 1y | 00N:anonymous namespace in assembly ClearstreamAPIConnector | Rule violated: Declare types in namespaces |
| Medium issue on: | |m32|04| 10min | 0610min | |m66|03| 1y | 03 | Rule violated: Potentially Dead Methods |
| High issue on: | |m100|01| 30min | 0520min | |m100|00| 1y 182d | 02 | Rule violated: Don't disable certificate validation |
| High issue on: | |m100|02| 30min | 0220min | |m100|02| 1y 182d | 09 | Rule violated: Don't disable certificate validation |
| High issue on: | |m100|00| 30min | 0320min | |m100|01| 1y 182d | 16 | Rule violated: Don't disable certificate validation |
| {C:TestClearstreamAPIEndpoint .DiTemplateList} | |m8|11| 3min 0s | 150min 0s | |m0|16| 00:00:00 | 15 | Rule violated: Types that could be declared as private, nested in a parent type |
| Low issue on: | |m0|16| 0min 30s | 170min 0s | |m0|15| 00:00:00 | 18 | Rule violated: Avoid public methods not publicly visible |
| Low issue on: | |m0|15| 0min 30s | 140min 0s | |m0|18| 00:00:00 | 17 | Rule violated: Avoid public methods not publicly visible |
| Low issue on: | |m0|17| 0min 30s | 160min 0s | |m0|17| 00:00:00 | 14 | Rule violated: Avoid public methods not publicly visible |
| Low issue on: | |m32|07| 10min | 180min 0s | |m0|12| 00:00:00 | 11 | Rule violated: Avoid referencing source file out of the project directory |
| Low issue on: | |m32|08| 10min | 130min 0s | |m0|11| 00:00:00 | 10 | Rule violated: Avoid referencing source file out of the project directory |
| Low issue on: | |m32|09| 10min | 110min 0s | |m0|14| 00:00:00 | 13 | Rule violated: Avoid referencing source file out of the project directory |
| Low issue on: | |m32|03| 10min | 120min 0s | |m0|13| 00:00:00 | 12 | Rule violated: Avoid referencing source file out of the project directory |
| Code Query: Debt and Issues per Rule |
8 rules matched
| 8 rules | Issues | Debt | Annual Interest | Breaking Point | Category | Full Name |
|---|---|---|---|---|---|---|
| Don't disable certificate validation | |m66|1| 3 issues
| |m100|0| 1h 30min | |m75|1| 1h 0min | |m100|0| 1y 182d | 2Project Rules \ Security | Rule |
| Avoid referencing source file out of the project directory | |m100|0| First 3 of 4 issues
| |m43|1| 40min | |m0|6| 0min 0s | |m0|6| 00:00:00 | 3Project Rules \ Source Files Organization | Rule |
| Potentially Dead Methods | |m66|2| 3 issues
| |m32|2| 30min | |m100|0| 1h 20min | |m25|2| 136d | 0Project Rules \ Dead Code | Rule |
| Types with source files stored in the same directory, should be declared in the same namespace | |m0|5| 1 issue
| |m6|3| 7min | |m25|2| 20min | |m23|3| 127d | 1Project Rules \ Source Files Organization | Rule |
| Types that could be declared as private, nested in a parent type | |m0|7| 1 issue
| |m1|4| 3min 0s | |m0|7| 0min 0s | |m0|7| 00:00:00 | 6Project Rules \ Visibility | Rule |
| Declare types in namespaces | |m0|6| 1 issue
| |m0|5| 2min 0s | |m2|4| 2min 0s | |m66|1| 1y | 7Project Rules \ Design | Rule |
| Class with no descendant should be sealed if possible | |m66|4| 3 issues
| |m0|7| 1min 30s | |m7|3| 6min | |m16|4| 91d | 4Project Rules \ Object Oriented Design | Rule |
| Avoid public methods not publicly visible | |m66|3| 3 issues
| |m0|6| 1min 30s | |m0|5| 0min 0s | |m0|5| 00:00:00 | 5Project Rules \ Visibility | Rule |
| Code Query: New Debt and Issues per Rule |
No rule matched
| Code Query: Debt and Issues per Code Element |
15 code containers matched
| 15 code containers | Issues | Debt | Annual Interest | Breaking Point | Full Name |
|---|---|---|---|---|---|
| |m100|03| 2 issues
| |m100|00| 40min | |m100|00| 1h 2min | |m12|07| 235d | TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) | |
| |m0|07| 1 issue
| |m74|02| 30min | |m32|03| 20min | |m28|03| 1y 182d | TestClearstreamAPIEndpoint.Program .GetElibilityTokenAsync() | |
| |m0|06| 1 issue
| |m74|01| 30min | |m32|04| 20min | |m28|04| 1y 182d | TestClearstreamAPIEndpoint.Program .Main(String[]) | |
| |m100|01| 2 issues | |m25|04| 10min | |m3|07| 2min 0s | |m100|00| 5y 91d | Token | |
| |m100|02| 2 issues
| |m25|03| 10min | |m3|06| 2min 0s | |m100|01| 5y 91d | TestClearstreamAPIEndpoint.Program | |
| |m0|04| 1 issue
| |m24|06| 10min | |m0|13| 0min 0s | |m0|13| 00:00:00 | TestClearstreamAPIEndpoint .DiTemplate | |
| |m0|08| 1 issue
| |m24|05| 10min | |m0|14| 0min 0s | |m0|14| 00:00:00 | TestClearstreamAPIEndpoint .LoggingHandler | |
| |m0|05| 1 issue
| |m24|07| 10min | |m16|05| 10min | |m19|06| 1y | TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) | |
| |m0|13| 1 issue
| |m24|08| 10min | |m45|01| 28min | |m6|08| 130d | TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token) | |
| |m0|14| 1 issue
| |m16|09| 7min | |m32|02| 20min | |m6|09| 127d | TestClearstreamAPIEndpoint | |
| |m100|00| 2 issues
| |m7|10| 3min 30s | |m3|09| 2min 0s | |m33|02| 1y 273d | TestClearstreamAPIEndpoint .DiTemplateList | |
| N:anonymous namespace in assembly ClearstreamAPIConnector | |m0|09| 1 issue
| |m3|11| 2min 0s | |m3|08| 2min 0s | |m19|05| 1y | {anonymous namespace} in assembly ClearstreamAPIConnector |
| |m0|10| 1 issue
| |m0|14| 0min 30s | |m0|12| 0min 0s | |m0|12| 00:00:00 | Token.get_access_token() | |
| |m0|11| 1 issue
| |m0|13| 0min 30s | |m0|10| 0min 0s | |m0|10| 00:00:00 | Token.get_expires_in() | |
| |m0|12| 1 issue
| |m0|12| 0min 30s | |m0|11| 0min 0s | |m0|11| 00:00:00 | Token.get_refresh_token() |
| Code Query: New Debt and Issues per Code Element |
No code element matched
Object Oriented Design
| Validated Rule: Avoid interfaces too big |
• How to Fix Issues of this Rule: Typically to fix such issue, the interface must be refactored in a grape of smaller single-responsibility interfaces. For example if an interface IFoo handles both read and write operations, it can be split into two interfaces: IFooReader and IFooWriter. A usual problem for a large public interface is that it has many clients that consume it. As a consequence splitting it in smaller interfaces has an important impact and it is not always feasible. The estimated Debt, which means the effort to fix such issue, varies linearly from 20 minutes for an interface with 10 methods, up to 7 hours for an interface with 100 or more methods. The Debt is divided by two if the interface is not publicly visible, because in such situation only the current project is impacted by the refactoring.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1200:AvoidInterfacesTooBig", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Base class should not use derivatives |
• How to Fix Issues of this Rule: Understand the need for using derivatives, then imagine a new design, and then refactor. Typically an algorithm in the base class needs to access something from derived classes. You can try to encapsulate this access behind an abstract or a virtual method. If you see in the base class some conditions on typeof(DerivedClass) not only urgent refactoring is needed. Such condition can easily be replaced through an abstract or a virtual method. Sometime you'll see a base class that creates instance of some derived classes. In such situation, certainly using the factory method pattern http://en.wikipedia.org/wiki/Factory_method_pattern or the abstract factory pattern http://en.wikipedia.org/wiki/Abstract_factory_pattern will improve the design. The estimated Debt, which means the effort to fix such issue, is equal to 3 minutes per derived class used by the base class + 3 minutes per member of a derived class used by the base class.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1201:BaseClassShouldNotUseDerivatives", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Class shouldn't be too deep in inheritance tree |
• How to Fix Issues of this Rule: In Object-Oriented Programming, a well-known motto is Favor Composition over Inheritance. This is because inheritance comes with pitfalls. In general, the implementation of a derived class is very bound up with the base class implementation. Also a base class exposes implementation details to its derived classes, that's why it's often said that inheritance breaks encapsulation. On the other hands, Composition favors binding with interfaces over binding with implementations. Hence, not only the encapsulation is preserved, but the design is clearer, because interfaces make it explicit and less coupled. Hence, to break a long inheritance chain, Composition is often a powerful way to enhance the design of the refactored underlying logic. You can also read: http://en.wikipedia.org/wiki/Composition_over_inheritance and http://stackoverflow.com/questions/49002/prefer-composition-over-inheritance The estimated Debt, which means the effort to fix such issue, depends linearly upon the depth of inheritance.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1202:ClassShouldntBeTooDeepInInheritanceTree", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Rule Violated: ND1203 Class with no descendant should be sealed if possible |
• How to Fix Issues of this Rule: For each matched class, take the time to assess if it is really meant to be subclassed. Certainly most matched class will end up being declared as sealed.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1203:ClassWithNoDescendantShouldBeSealedIfPossible", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 3 types matched |
Formatting: bold✱ means added ● means code was changed |
| Validated Rule: Overrides of Method() should call base.Method() |
• How to Fix Issues of this Rule: You should investigate if inheritance is the right choice to bind the base class implementation with the derived classes implementations. Does presenting the method with polymorphic behavior through an interface, would be a better design choice? In such situation, often using the design pattern template method http://en.wikipedia.org/wiki/Template_method_pattern might help improving the design.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1204:OverridesOfMethodShouldCallBaseMethod", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
| Validated Rule: Do not hide base class methods |
• How to Fix Issues of this Rule: To fix a violation of this rule, remove or rename the method, or change the parameter signature so that the method does not hide the base method. However method hiding is for those times when you need to have two things to have the same name but different behavior. This is a very rare situations, described here: https://learn.microsoft.com/en-us/archive/blogs/ericlippert/method-hiding-apologia
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1205:DoNotHideBaseClassMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
| Validated Rule: A stateless class or structure might be turned into a static type |
• How to Fix Issues of this Rule: Declare all methods as static and transform the class or structure into a static class. By default issues of this rule have a Low severity because they reflect more an advice than a problem.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1206:AStatelessClassOrStructureMightBeTurnedIntoAStaticType", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Non-static classes should be instantiated or turned to static |
• How to Fix Issues of this Rule: First it is important to investigate why the class is never instantiated. If the reason is the class hosts only static methods then the class can be safely declared as static. Others reasons like, the class is meant to be instantiated via reflection, or is meant to be instantiated only by client code should lead to adapt this rule code to avoid these matches.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1207:NonStaticClassesShouldBeInstantiatedOrTurnedToStatic", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Methods should be declared static if possible |
• How to Fix Issues of this Rule: Declare matched methods as static. Since such method doesn't use any instance fields and methods of its type and base-types, you should consider if it makes sense, to move such a method to a static utility class.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1208:MethodsShouldBeDeclaredStaticIfPossible", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
| Validated Rule: Constructor should not call a virtual method |
• How to Fix Issues of this Rule: Issues reported can be solved by re-designing object initialisation or by declaring the parent class as sealed, if possible. A constructor should primarily focus on initializing the state of its own class. Additional setup can be handled in constructors of derived classes or in dedicated methods called after object construction.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1209:ConstructorShouldNotCallAVirtualMethod", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
| Validated Rule: Avoid the Singleton pattern |
• How to Fix Issues of this Rule: This rule pertains to the usual syntax of singletons, where a single static field holds the instance of the parent class. We emphasize that the issue lies in this specific syntax, which hinders testability. The concern is not having a single instance of the class during runtime. To address matches for this rule, create the single instance at the program's startup and pass it explicitly to all classes and methods requiring access. When dealing with multiple singletons, consider consolidating them into a single program execution context. This unified context simplifies propagation across various program units. The estimated Debt, which means the effort to fix such issue, is equal to 3 minutes per method relying on the singleton. It is not rare that hundreds of methods rely on the singleton and that it takes hours to get rid of a singleton, refactoring the way just explained above. The severity of each singleton issue is Critical because as explained, using a the singleton pattern can really prevent the whole program to be testable and maintained.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1210:AvoidTheSingletonPattern", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Don't assign static fields from instance methods |
• How to Fix Issues of this Rule: If the static field is just assigned once in the program lifetime, make sure to declare it as readonly and assign it inline, or from the static constructor. In Object-Oriented-Programming the natural artifact to hold states that can be modified is instance fields. Hence to fix violations of this rule, make sure to hold assignable states through instance fields, not through static fields.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1211:DontAssignStaticFieldsFromInstanceMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No field matched
| Validated Rule: Avoid empty interfaces |
• How to Fix Issues of this Rule: Remove the interface or add members to it. If the empty interface is being used to mark a set of types, replace the interface with a custom attribute. The estimated Debt, which means the effort to fix such issue, is equal to 10 minutes to discard an empty interface plus 3 minutes per type implementing an empty interface.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1212:AvoidEmptyInterfaces", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Avoid types initialization cycles |
• How to Fix Issues of this Rule: Types initialization cycles create confusion and unexpected behaviors. If several states hold by several classes must be initialized during the first access of any of those classes, a better design option is to create a dedicated class whose responsibility is to initialize and hold all these states. The estimated Debt, which means the effort to fix such issue, is equal to 20 minutes per cycle plus 10 minutes per type class constructor involved in the cycle.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1213:AvoidTypesInitializationCycles", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
API Breaking Changes
| Validated Rule: API Breaking Changes: Types |
• How to Fix Issues of this Rule: Make sure that public types that used to be presented to clients, still remain public now, and in the future. If a public type must really be removed, you can tag it with System.ObsoleteAttribute with a workaround message during a few public releases, until it gets removed definitely. Notice that this rule doesn't match types removed that were tagged as obsolete. Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consumers of the API.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1500:APIBreakingChangesTypes", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: API Breaking Changes: Methods |
• How to Fix Issues of this Rule: Make sure that public methods that used to be presented to clients, still remain public now, and in the future. If a public method must really be removed, you can tag it with System.ObsoleteAttribute with a workaround message during a few public releases, until it gets removed definitely. Notice that this rule doesn't match methods removed that were tagged as obsolete. Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consumers of the API.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1501:APIBreakingChangesMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
| Validated Rule: API Breaking Changes: Fields |
• How to Fix Issues of this Rule: Make sure that public fields that used to be presented to clients, still remain public now, and in the future. If a public field must really be removed, you can tag it with System.ObsoleteAttribute with a workaround message during a few public releases, until it gets removed definitely. Notice that this rule doesn't match fields removed that were tagged as obsolete. Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consumers of the API.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1502:APIBreakingChangesFields", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No field matched
| Validated Rule: API Breaking Changes: Interfaces and Abstract Classes |
• How to Fix Issues of this Rule: Make sure that the public contracts of interfaces and abstract classes that used to be presented to clients, remain stable now, and in the future. If a public contract must really be changed, you can tag abstract methods that will be removed with System.ObsoleteAttribute with a workaround message during a few public releases, until it gets removed definitely. Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consummers of the API. The severity is not set to Critical because an interface is not necessarily meant to be implemented by the consummer of the API.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1503:APIBreakingChangesInterfacesAndAbstractClasses", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Broken serializable types |
• How to Fix Issues of this Rule: Make sure that the serialization process of serializable types remains stable now, and in the future. Else you'll have to deal with Version Tolerant Serialization that is explained here: https://msdn.microsoft.com/en-us/library/ms229752(v=vs.110).aspx Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consummers of the API.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1504:BrokenSerializableTypes", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Avoid changing enumerations Flags status |
• How to Fix Issues of this Rule: Make sure the FlagsAttribute status of each enumeration remains stable now, and in the future.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1505:AvoidChangingEnumerationsFlagsStatus", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
Code Coverage
| Validated Rule: Code should be tested |
• How to Fix Issues of this Rule: Write unit tests to test and cover the methods and their parent types matched by this rule.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1600:CodeShouldBeTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No code container matched
| Validated Rule: New Types and Methods should be tested |
• How to Fix Issues of this Rule: Write unit-tests to cover the code of most methods and types added since the baseline.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1601:NewMethodsShouldBeTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No code container matched
| Validated Rule: Methods refactored should be tested |
• How to Fix Issues of this Rule: Write unit-tests to cover the code of most methods and classes refactored.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1602:MethodsRefactoredShouldBeTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
| Validated Rule: Assemblies and Namespaces should be tested |
• How to Fix Issues of this Rule: Write unit and integration tests to cover, even partially, code elements matched by this rule. Then use issues of the rules Code should be tested, New Types and Methods should be tested and Methods refactored should be tested to write more tests where it matters most, and eventually refactor some code to make it more testable.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1603:AssembliesNamespacesAndTypesShouldBeTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No code element parent matched
| Validated Rule: Types almost 100% tested should be 100% tested |
• How to Fix Issues of this Rule: Write more unit-tests dedicated to cover code not covered yet. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1604:TypesAlmost100PercentTestedShouldBe100PercentTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Namespaces almost 100% tested should be 100% tested |
• How to Fix Issues of this Rule: Write more unit-tests dedicated to cover code not covered yet in the namespace. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1605:NamespacesAlmost100PercentTestedShouldBe100PercentTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No namespace matched
| Validated Rule: Types that used to be 100% covered by tests should still be 100% covered |
• How to Fix Issues of this Rule: Write more unit-tests dedicated to cover code not covered anymore. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring. You'll find code impossible to cover by unit-tests, like calls to MessageBox.Show(). An infrastructure must be defined to be able to mock such code at test-time.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1606:TypesThatUsedToBe100PercentCoveredByTestsShouldStillBe100PercentCovered", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
| Validated Rule: Types tagged with FullCoveredAttribute should be 100% covered |
• How to Fix Issues of this Rule: Write more unit-tests dedicated to cover code of matched classes not covered yet. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1607:TypesTaggedWithFullCoveredAttributeShouldBe100PercentCovered", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
| Validated Rule: Types 100% covered should be tagged with FullCoveredAttribute |
• How to Fix Issues of this Rule: Just tag types 100% covered by tests with the FullCoveredAttribute class that can be found in NDepend.API.dll, or by an attribute of yours with this name defined in any namespace in your own code.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1608:Types100PercentCoveredShouldBeTaggedWithFullCoveredAttribute", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Validated Rule: Methods should have a low C.R.A.P score |
• How to Fix Issues of this Rule: In such situation, it is recommended to both refactor the complex method logic into several smaller and less complex methods (that might belong to some new types especially created), and also write unit-tests to full cover the refactored logic. You'll find code impossible to cover by unit-tests, like calls to MessageBox.Show(). An infrastructure must be defined to be able to mock such code at test-time.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1609:MethodsShouldHaveALowCRAPScore", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No method matched
Dead Code
|
| Validated Rule: Potentially Dead Types |
• How to Fix Issues of this Rule: Static analysis cannot provide an exact list of dead types, because there are several ways to use a type dynamically (like through reflection). For each type matched by this query, first investigate if the type is used somehow (like through reflection). If the type is really never used, it is important to remove it to avoid maintaining useless code. If you estimate the code of the type might be used in the future, at least comment it, and provide an explanatory comment about the future intentions. If a type is used somehow, but still is matched by this rule, you can tag it with the attribute IsNotDeadCodeAttribute found in NDepend.API.dll to avoid matching the type again. You can also provide your own attribute for this need, but then you'll need to adapt this code rule. Issues of this rule have a Debt equal to 15 minutes because it only takes a short while to investigate if a type can be safely discarded. The Annual Interest of issues of this rule, the annual cost to not fix such issue, is proportional to the type #lines of code, because the bigger the type is, the more it slows down maintenance.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1700:PotentiallyDeadTypes", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No type matched
| Rule Violated: ND1701 Potentially Dead Methods |
• How to Fix Issues of this Rule: Static analysis cannot provide an exact list of dead methods, because there are several ways to invoke a method dynamically (like through reflection). For each method matched by this query, first investigate if the method is invoked somehow (like through reflection). If the method is really never invoked, it is important to remove it to avoid maintaining useless code. If you estimate the code of the method might be used in the future, at least comment it, and provide an explanatory comment about the future intentions. If a method is invoked somehow, but still is matched by this rule, you can tag it with the attribute IsNotDeadCodeAttribute found in NDepend.API.dll to avoid matching the method again. You can also provide your own attribute for this need, but then you'll need to adapt this code rule. Issues of this rule have a Debt equal to 10 minutes because it only takes a short while to investigate if a method can be safely discarded. On top of these 10 minutes, the depth of usage of such method adds up 3 minutes per unity because dead method only called by dead code takes a bit more time to be investigated. The Annual Interest of issues of this rule, the annual cost to not fix such issue, is proportional to the type #lines of code, because the bigger the method is, the more it slows down maintenance.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1701:PotentiallyDeadMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
| 3 methods matched |
Formatting: bold✱ means added ● means code was changed |
| 3 methods | depth | MethodsCallingMe | Debt | Annual Interest | Full Name |
|---|---|---|---|---|---|
| |m0|0| 0 | 0no method | |m0|0| 10min | 210min | TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) | |
| |m0|1| 0 | 1no method | |m0|1| 10min | 042min | TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) | |
| |m0|2| 0 | 2no method | |m0|2| 10min | 128min | TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token) |
| Validated Rule: Potentially Dead Fields |
• How to Fix Issues of this Rule: Static analysis cannot provide an exact list of dead fields, because there are several ways to assign or read a field dynamically (like through reflection). For each field matched by this query, first investigate if the field is used somehow (like through reflection). If the field is really never used, it is important to remove it to avoid maintaining a useless code element. If a field is used somehow, but still is matched by this rule, you can tag it with the attribute IsNotDeadCodeAttribute found in NDepend.API.dll to avoid matching the field again. You can also provide your own attribute for this need, but then you'll need to adapt this code rule. Issues of this rule have a Debt equal to 10 minutes because it only takes a short while to investigate if a method can be safely discarded. The Annual Interest of issues of this rule, the annual cost to not fix such issue, is set by default to 8 minutes per unused field matched.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1702:PotentiallyDeadFields", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No field matched
| Validated Rule: Wrong usage of IsNotDeadCodeAttribute |
• How to Fix Issues of this Rule: Just remove IsNotDeadCodeAttribute tagging of types, methods and fields matched by this rule because this tag is not useful anymore.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1703:WrongUsageOfIsNotDeadCodeAttribute", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.
No member matched
Code Diff Summary
| Code Query: New assemblies |
No assembly matched
| Code Query: Assemblies removed |
No assembly matched
| Code Query: Assemblies where code was changed |
No assembly matched
| Code Query: New namespaces |
No namespace matched
| Code Query: Namespaces removed |
No namespace matched
| Code Query: Namespaces where code was changed |
No namespace matched
| Code Query: New types |
No type matched
| Code Query: Types removed |
No type matched
| Code Query: Types where code was changed |
No type matched
| Code Query: Heuristic to find types moved from one namespace or assembly to another |
No type matched
| Code Query: Types directly using one or several types changed |
No type matched
| Code Query: Types indirectly using one or several types changed |
No type matched
| Code Query: New methods |
No method matched
| Code Query: Methods removed |
No method matched
| Code Query: Methods where code was changed |
No method matched
| Code Query: Methods directly calling one or several methods changed |
No method matched
| Code Query: Methods indirectly calling one or several methods changed |
No method matched
| Code Query: New fields |
No field matched
| Code Query: Fields removed |
No field matched
| Code Query: Third party types that were not used and that are now used |
No type matched
| Code Query: Third party types that were used and that are not used anymore |
No type matched
| Code Query: Third party methods that were not used and that are now used |
No method matched
| Code Query: Third party methods that were used and that are not used anymore |
No method matched
| Code Query: Third party fields that were not used and that are now used |
No field matched
| Code Query: Third party fields that were used and that are not used anymore |
No field matched
Assemblies Dependencies
| Assembly | Depends on | Is referenced by |
|---|---|---|
| ClearstreamAPIConnector v1.0.0.0 | System.Runtime v7.0.0.0 ; System.Collections v7.0.0.0 ; System.Net.Http v7.0.0.0 ; System.Console v7.0.0.0 ; System.Security.Cryptography v7.0.0.0 ; System.Net.Primitives v7.0.0.0 ; System.Net.Security v7.0.0.0 ; System.Text.Json v7.0.0.0 ; System.Net.ServicePoint v7.0.0.0 ; System.Net.WebProxy v7.0.0.0 ; | - |
Assemblies Build Order
- ClearstreamAPIConnector
Assemblies Build Order
- ClearstreamAPIConnector
Abstractness versus Instability Diagram
The Abstractness versus Instability Diagram helps to detect which assemblies are potentially painful to maintain (i.e concrete and stable) and which assemblies are potentially useless (i.e abstract and instable).
- Abstractness:
If an assembly contains many abstract types (i.e interfaces and abstract classes) and few concrete types, it is considered as abstract.
- Instability: An assembly is considered stable if its types are used by a lot of types from other assemblies. In this context stable means painful to modify.
Online documentation: