It is recommended to use the NDepend interactive UI capabilities
to make the most of NDepend by mastering all aspects of your code.
Diagrams
Application Metrics
Note: Further Application Statistics are available.
|
Quality Gates summary
811can be stopped upon quality gate
failure. Online documentation.
be run on the baseline. Hence they
have blank trend and baseline value.
Name | Trend | Baseline Value | Value | Group | |||
---|---|---|---|---|---|---|---|
| N/A because no coverage data | Project Rules \ Quality Gates | |||||
| N/A because no coverage data | Project Rules \ Quality Gates | |||||
| N/A because no coverage data | Project Rules \ Quality Gates | |||||
| 0 issues | 0 issues | Project Rules \ Quality Gates | ||||
| 0 issues | 0 issues | Project Rules \ Quality Gates | ||||
| 5 issues | Project Rules \ Quality Gates | |||||
| 6.82 % | 5.94 % | Project Rules \ Quality Gates | ||||
| -0.31 man-days | Project Rules \ Quality Gates | |||||
| 0 namespaces | 0 namespaces | Project Rules \ Quality Gates | ||||
| 0.29 man-days | Project Rules \ Quality Gates |
Rules summary
129200- Number of Rules or Queries with Error (syntax error, exception thrown, time-out): 0
- Number of Rules violated: 20
development-time, from within Visual
Studio. Online documentation.
run on the baseline. Hence they
have blank # Issues Fixed or Added.
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 | 16 Classes | 1.31 | 2.49 | 9 public properties on SqlWrangler.FieldDefinition |
Public methods on classes | 16 classes | 3.81 | 4.81 | 19 public methods on SqlWrangler.FieldDefinition |
Arguments on public methods on classes | 61 methods | 0.64 | 0.91 | 5 arguments on SqlWrangler.Services.SnippetMenuBuilder.BuildSnippetMenu(List<TextSnippet>,ToolStripMenuItem,Keys,Scintilla,DataGridView) |
IL instructions in non-abstract methods | 177 methods | 52.77 | 120.01 | 1256 IL instructions in SqlWrangler.SqlClient.InitializeComponent() |
Cyclomatic complexity on non abstract Methods | 177 Methods | 3.1 | 3.89 | CC = 18 for SqlWrangler.FrmExportSql.btnOk_Click(Object,EventArgs) |
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SqliteTools v1.0.0.0 | 74 | 585 | 1 | 0 | 46 | 38.33 | - | 1 | 33 | 1 | 0.97 | 0 | 0.02 |
SqlWrangler v1.0.0.0 | 1448 | 8755 | 16 | 0 | 410 | 22.07 | - | 0 | 199 | 1.56 | 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 |
---|---|---|---|---|---|---|---|---|---|---|---|
FrmLogin | 2.03 | 205 | 1126 | 50 | 19.61 | 35 | 45 | - | 2 | 74 | SqlWrangler |
Resources | 1.38 | 37 | 217 | 52 | 58.43 | 20 | 20 | - | 6 | 14 | SqlWrangler.Properties |
TextSnippet | 0.79 | 4 | 18 | 0 | 0 | 4 | 5 | - | 3 | 5 | SqlWrangler.Models |
MapperAttributeType | 0.57 | - | - | 0 | - | 0 | - | - | 1 | 2 | SqlWrangler |
FieldDefinition | 0.57 | 18 | 67 | 0 | 0 | 18 | 19 | - | 1 | 7 | SqlWrangler |
Settings | 0.56 | 12 | 98 | 0 | 0 | 12 | 13 | - | 2 | 12 | SqlWrangler.Properties |
FrmNameInput | 0.49 | 62 | 318 | 26 | 29.55 | 11 | 12 | - | 1 | 33 | SqlWrangler.Forms |
Table | 0.38 | 74 | 585 | 29 | 28.16 | 31 | 46 | - | 1 | 33 | SqliteTools |
SqlClient | 0.35 | 407 | 2556 | 104 | 20.35 | 81 | 119 | - | 1 | 120 | SqlWrangler |
FrmMain | 0.33 | 110 | 637 | 37 | 25.17 | 26 | 35 | - | 1 | 59 | SqlWrangler |
RowComparerResult | 0.31 | 4 | 18 | 0 | 0 | 4 | 5 | - | 1 | 7 | SqlWrangler |
SnippetMenuBuilder | 0.25 | 44 | 342 | 0 | 0 | 14 | 26 | - | 1 | 35 | SqlWrangler.Services |
FrmExportSql | 0.25 | 129 | 773 | 39 | 23.21 | 21 | 34 | - | 1 | 52 | SqlWrangler |
ScintillaStyler | 0.25 | 17 | 125 | 8 | 32 | 1 | 2 | - | 1 | 9 | SqlWrangler.Services |
Wizard | 0.25 | 169 | 1056 | 5 | 2.87 | 49 | 69 | - | 1 | 28 | SqlWrangler |
DataRowComparerViewer | 0.25 | 227 | 1394 | 44 | 16.24 | 58 | 97 | - | 1 | 76 | SqlWrangler |
Program | 0.15 | 3 | 10 | 3 | 50 | 1 | 1 | - | 0 | 7 | SqlWrangler |
Types Metrics : Code Members and Inheritance
Type Name | # Instance Methods | Nb Static Methods | Nb Properties | # Fields | # Children Classes | Depth Of Inheritance Tree | Type Namespace |
---|---|---|---|---|---|---|---|
FrmLogin | 11 | 0 | 0 | 12 | 0 | 7 | SqlWrangler |
Resources | 1 | 18 | 17 | 2 | 0 | 1 | SqlWrangler.Properties |
TextSnippet | 5 | 0 | 2 | 2 | 0 | 1 | SqlWrangler.Models |
MapperAttributeType | - | - | - | - | - | - | SqlWrangler |
FieldDefinition | 19 | 0 | 9 | 9 | 0 | 1 | SqlWrangler |
Settings | 11 | 2 | 6 | 1 | 0 | 3 | SqlWrangler.Properties |
FrmNameInput | 8 | 0 | 1 | 6 | 0 | 7 | SqlWrangler.Forms |
Table | 12 | 1 | 3 | 3 | 0 | 1 | SqliteTools |
SqlClient | 29 | 0 | 2 | 33 | 0 | 7 | SqlWrangler |
FrmMain | 16 | 0 | 2 | 11 | 0 | 7 | SqlWrangler |
RowComparerResult | 5 | 0 | 2 | 2 | 0 | 1 | SqlWrangler |
SnippetMenuBuilder | 3 | 0 | 0 | 0 | 0 | 1 | SqlWrangler.Services |
FrmExportSql | 8 | 0 | 1 | 10 | 0 | 7 | SqlWrangler |
ScintillaStyler | 2 | 0 | 0 | 0 | 0 | 1 | SqlWrangler.Services |
Wizard | 10 | 0 | 0 | 1 | 0 | 1 | SqlWrangler |
DataRowComparerViewer | 15 | 0 | 0 | 14 | 0 | 7 | SqlWrangler |
Program | 0 | 1 | 0 | 0 | 0 | 1 | SqlWrangler |
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 |
---|---|---|---|---|
FrmLogin | 0.82 | 0.9 | 116 | SqlWrangler |
Resources | 0 | 0 | 5 | SqlWrangler.Properties |
TextSnippet | 0 | 0 | 1 | SqlWrangler.Models |
MapperAttributeType | - | - | 0 | SqlWrangler |
FieldDefinition | 0 | 0 | 1 | SqlWrangler |
Settings | 0 | 0 | 4 | SqlWrangler.Properties |
FrmNameInput | 0.73 | 0.88 | 42 | SqlWrangler.Forms |
Table | 0 | 0 | 37 | SqliteTools |
SqlClient | 0.92 | 0.96 | 208 | SqlWrangler |
FrmMain | 0.88 | 0.96 | 80 | SqlWrangler |
RowComparerResult | 0 | 0 | 1 | SqlWrangler |
SnippetMenuBuilder | 0 | 0 | 51 | SqlWrangler.Services |
FrmExportSql | 0.73 | 0.85 | 78 | SqlWrangler |
ScintillaStyler | 0 | 0 | 17 | SqlWrangler.Services |
Wizard | 0.8 | 0.89 | 62 | SqlWrangler |
DataRowComparerViewer | 0.8 | 0.86 | 134 | SqlWrangler |
Program | 0 | 0 | 4 | SqlWrangler |
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 |
---|---|---|---|---|---|---|---|---|
SqliteTools | 74 | 585 | 1 | 29 | 28.16 | - | 1 | 8 |
SqlWrangler | 1272 | 7637 | 10 | 282 | 18.15 | - | 0 | 34 |
SqlWrangler.Properties | 49 | 315 | 2 | 59 | 54.63 | - | 2 | 10 |
SqlWrangler.Services | 61 | 467 | 2 | 8 | 11.59 | - | 1 | 12 |
SqlWrangler.Models | 4 | 18 | 1 | 0 | 0 | - | 2 | 3 |
SqlWrangler.Forms | 62 | 318 | 1 | 26 | 29.55 | - | 1 | 7 |
Project Rules | 811 |
Quality Gates | 811 |
|
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 Fail: New Blocker / Critical / High Issues |
5 issues matched
5 issues | Severity | Debt | Annual Interest | Full Name |
---|---|---|---|---|
High issue on: SqlWrangler.SqlClient .ColorToolStripMenuItem_Click(Object ,EventArgs) | High | 5min | 1h 0min | Rule violated: From now, all methods added should respect basic quality principles |
High issue on: SqlWrangler.Services .SnippetMenuBuilder.BuildSnippetMenu (List<TextSnippet>,ToolStripMenuItem ,Keys,Scintilla,DataGridView) | High | 5min | 1h 0min | Rule violated: From now, all methods added should respect basic quality principles |
High issue on: SqlWrangler.Services .SnippetMenuBuilder.InsertFields (Scintilla,DataGridView) | High | 5min | 1h 0min | Rule violated: From now, all methods added should respect basic quality principles |
High issue on: SqlWrangler.SqlClient | High | 20min | 20min | Rule violated: Avoid adding instance fields to a type that already had many instance fields |
High issue on: SqlWrangler.Services.SnippetMenuBuilder | High | 36min | 20min | Rule violated: UI layer shouldn't use directly DB types |
Statistics
Stat | Severity | Debt | Annual Interest |
---|---|---|---|
Sum: | - | 1h 11min | 3h 40min |
Average: | - | 14min | 44min |
Minimum: | - | 5min | 20min |
Maximum: | - | 36min | 1h 0min |
Standard deviation: | - | 12min | 19min |
Variance: | - | 19d 0h | 47d |
Quality Gate Pass: Percentage Debt |
Scalar Result: 5.94 %
Quality Gate Pass: New Debt since Baseline |
Scalar Result: -0.31 man-days
Quality Gate Pass: Debt Rating per Namespace |
No namespace matched
Quality Gate Warn: New Annual Interest since Baseline |
Scalar Result: 0.29 man-days
Rules extracted from Source Code | 000 |
Project Rules | 129200 |
Code Smells | 530 |
Rule Violated: Avoid types with too many methods |
• How to Fix Issues of this Rule: To refactor properly a God Class please read HowToFix advices from the default rule Types to Big. // The estimated Debt, which means the effort to fix such issue, varies linearly from 1 hour for a type with 20 methods, up to 10 hours for a type with 200 or more methods. In Debt and Interest computation, this rule takes account of the fact that static types with no mutable fields are just a collection of static methods that can be easily splitted and moved from one type to another.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1001:AvoidTypesWithTooManyMethods", 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, underlined means code was changed,
strike-boldmeans removed (since baseline)
1 type | nbMethods | instanceMethods | staticMethods | # lines of code (LOC) | Debt | Annual Interest | Full Name |
---|---|---|---|---|---|---|---|
SqlClient | 25 | 25 methods | no method | 407 | 1h 15min | 5min | SqlWrangler.SqlClient |
Rule Violated: Avoid methods potentially poorly commented |
• How to Fix Issues of this Rule: Typically add more comment. But code commenting is subject to controversy. While poorly written and designed code would needs a lot of comment to be understood, clean code doesn't need that much comment, especially if variables and methods are properly named and convey enough information. Unit-Test code can also play the role of code commenting. However, even when writing clean and well-tested code, one will have to write hacks at a point, usually to circumvent some API limitations or bugs. A hack is a non-trivial piece of code, that doesn't make sense at first glance, and that took time and web research to be found. In such situation comments must absolutely be used to express the intention, the need for the hacks and the source where the solution has been found. The estimated Debt, which means the effort to comment such method, varies linearly from 2 minutes for 10 lines of code not commented, up to 20 minutes for 200 or more, lines of code not commented.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1006:AvoidMethodsPotentiallyPoorlyCommented", 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.
13 methods matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
13 methods | Percentage Comment | # lines of code (LOC) | # lines of comment | nbLinesOfCodeNotCommented | Debt | Annual Interest | Full Name |
---|---|---|---|---|---|---|---|
BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) | 0 | 30 | 0 | 30 | 3min 0s | 16min | SqlWrangler.Services.SnippetMenuBuilder .BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) |
CreateNhSessionFactory(String) | 8.16 | 45 | 4 | 41 | 4min 6s | 10min | SqlWrangler.FrmLogin .CreateNhSessionFactory(String) |
WriteCsWizard(DataTable,StreamWriter ,String,String) | 0 | 28 | 0 | 28 | 2min 48s | 16min | SqlWrangler.Wizard.WriteCsWizard (DataTable,StreamWriter,String,String) |
WriteMaterializer(DataTable,StreamWriter ,IEnumerable<FieldDefinition>) | 3.57 | 27 | 1 | 26 | 2min 36s | 13min | SqlWrangler.Wizard.WriteMaterializer (DataTable,StreamWriter,IEnumerable <FieldDefinition>) |
GetFields(DataTableReader) | 3.57 | 27 | 1 | 26 | 2min 36s | 13min | SqlWrangler.Wizard.GetFields (DataTableReader) |
Compare(DataRow,DataTable,String) | 6.9 | 27 | 2 | 25 | 2min 30s | 11min | SqlWrangler.DataRowComparerViewer .Compare(DataRow,DataTable,String) |
WriteModelClass(DataTable,StreamWriter ,IEnumerable<FieldDefinition> ,MapperAttributeType) | 0 | 25 | 0 | 25 | 2min 30s | 16min | SqlWrangler.Wizard.WriteModelClass (DataTable,StreamWriter,IEnumerable <FieldDefinition>,MapperAttributeType) |
ToggleMenuItems() | 0 | 24 | 0 | 24 | 2min 24s | 16min | SqlWrangler.DataRowComparerViewer .ToggleMenuItems() |
SaveExternalFile(Boolean) | 0 | 24 | 0 | 24 | 2min 24s | 16min | SqlWrangler.SqlClient.SaveExternalFile (Boolean) |
WriteMappings(DataTable,StreamWriter ,IEnumerable<FieldDefinition>) | 3.85 | 25 | 1 | 24 | 2min 24s | 13min | SqlWrangler.Wizard.WriteMappings (DataTable,StreamWriter,IEnumerable <FieldDefinition>) |
GenerateInsertSql(DataRow) | 7.41 | 25 | 2 | 23 | 2min 18s | 10min | SqliteTools.Table.GenerateInsertSql (DataRow) |
WizardToolStripMenuItem1_Click(Object ,EventArgs) | 0 | 22 | 0 | 22 | 2min 12s | 16min | SqlWrangler.SqlClient .WizardToolStripMenuItem1_Click(Object ,EventArgs) |
GetSnippets() | 8.33 | 22 | 2 | 20 | 2min 0s | 10min | SqlWrangler.FrmMain.GetSnippets() |
Rule Violated: Avoid types with poor cohesion |
• How to Fix Issues of this Rule: To refactor a poorly cohesive type and increase code quality and maintainability, certainly you'll have to split the type into several smaller and more cohesive types that together, implement the same logic. The estimated Debt, which means the effort to fix such issue, varies linearly from 5 minutes for a type with a low poorCohesionScore, up to 4 hours for a type with high poorCohesionScore.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1007:AvoidTypesWithPoorCohesion", 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, underlined means code was changed,
strike-boldmeans removed (since baseline)
4 types | Lack of Cohesion Of Methods (LCOM) | # Methods | # Fields | poorCohesionScore | Debt | Annual Interest | Full Name |
---|---|---|---|---|---|---|---|
DataRowComparerViewer | 0.8 | 15 | 14 | 4.76 | 5min | 2min 0s | SqlWrangler.DataRowComparerViewer |
SqlClient | 0.92 | 29 | 33 | 11.5 | 38min | 13min | SqlWrangler.SqlClient |
FrmMain | 0.88 | 16 | 11 | 7.67 | 18min | 6min | SqlWrangler.FrmMain |
FrmLogin | 0.82 | 11 | 12 | 5.21 | 6min | 2min 22s | SqlWrangler.FrmLogin |
Code Smells Regression | 720 |
Rule Violated: From now, all methods added should respect basic quality principles |
• How to Fix Issues of this Rule: To refactor such method and increase code quality and maintainability, certainly you'll have to split the method into several smaller methods or even create one or several classes to implement the logic. During this process it is important to question the scope of each variable local to the method. This can be an indication if such local variable will become an instance field of the newly created class(es). Large switch…case structures might be refactored through the help of a set of types that implement a common interface, the interface polymorphism playing the role of the switch cases tests. Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality. Issues of this rule have a constant 5 minutes Debt, because the Debt, which means the effort to fix such issue, is already estimated for issues of rules in the category Code Smells. However issues of this rule have a High severity, with even more interests for issues on new methods since baseline, because the proper time to increase the quality of these methods is now, before they get commited in the next production release.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1102:FromNowAllMethodsAddedShouldRespectBasicQualityPrinciples", 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, underlined means code was changed,
strike-boldmeans removed (since baseline)
3 methods | # lines of code (LOC) | # IL instructions | Cyclomatic Complexity (CC) | IL Cyclomatic Complexity (ILCC) | IL Nesting Depth | # Parameters | # Variables | # Overloads | Debt | Annual Interest | Full Name |
---|---|---|---|---|---|---|---|---|---|---|---|
ColorToolStripMenuItem_Click(Object ,EventArgs) | 15 | 73 | 7 | 8 | 6 | 2 | 2 | 1 | 5min | 1h 0min | SqlWrangler.SqlClient .ColorToolStripMenuItem_Click(Object ,EventArgs) |
BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) | 30 | 244 | 9 | 15 | 1 | 5 | 5 | 1 | 5min | 1h 0min | SqlWrangler.Services.SnippetMenuBuilder .BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) |
InsertFields(Scintilla,DataGridView) | 14 | 94 | 5 | 10 | 3 | 2 | 9 | 1 | 5min | 1h 0min | SqlWrangler.Services.SnippetMenuBuilder .InsertFields(Scintilla,DataGridView) |
Rule Violated: Avoid adding instance fields to a type that already had many instance fields |
• How to Fix Issues of this Rule: To refactor such type and increase code quality and maintainability, certainly you'll have to group subsets of fields into smaller types and dispatch the logic implemented into the methods into these smaller types. The estimated Debt, which means the effort to fix such issue, is equal to 10 minutes per field added. Issues of this rule have a High severity, because it is important to focus on these issues now, before such code gets released in production.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1107:AvoidAddingInstanceFieldsToATypeThatAlreadyHadManyInstanceFields", 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, underlined means code was changed,
strike-boldmeans removed (since baseline)
1 type | nbOldFields | nbNewFields | addedFields | removedFields | Debt | Annual Interest | Full Name |
---|---|---|---|---|---|---|---|
SqlClient | 29 | 31 | 2 fields | no field | 20min | 20min | SqlWrangler.SqlClient |
Object Oriented Design | 1130 |
Rule Violated: 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, underlined means code was changed,
strike-boldmeans removed (since baseline)
3 types | # lines of code (LOC) | Debt | Severity | Full Name |
---|---|---|---|---|
SnippetMenuBuilder | 44 | 0min 30s | Medium | SqlWrangler.Services.SnippetMenuBuilder |
ScintillaStyler | 17 | 0min 30s | Medium | SqlWrangler.Services.ScintillaStyler |
FieldDefinition | 18 | 0min 30s | Medium | SqlWrangler.FieldDefinition |
Rule Violated: 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.
2 types matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
2 types | methodsUsingMe | Debt | Severity | Full Name |
---|---|---|---|---|
ScintillaStyler | 1 method | 2min 0s | Low | SqlWrangler.Services.ScintillaStyler |
SnippetMenuBuilder | 1 method | 2min 0s | Low | SqlWrangler.Services.SnippetMenuBuilder |
Rule Violated: 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.
9 methods matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
9 methods | staticFieldsUsed | methodsCallingMe | Debt | Severity | Full Name |
---|---|---|---|---|---|
StyleElement(Scintilla) | no field | 1 method | 1min 0s | Medium | SqlWrangler.Services.ScintillaStyler .StyleElement(Scintilla) |
IsString(Type) | no field | 1 method | 1min 0s | Medium | SqliteTools.Table.IsString(Type) |
IsDateTime(Type) | no field | 1 method | 1min 0s | Medium | SqliteTools.Table.IsDateTime(Type) |
ExportSql(FileInfo,DataTable,String ,String,Boolean,Boolean) | no field | 1 method | 1min 0s | Medium | SqlWrangler.FrmExportSql.ExportSql (FileInfo,DataTable,String,String ,Boolean,Boolean) |
CreateNhSessionFactory(String) | no field | 2 methods | 1min 30s | Medium | SqlWrangler.FrmLogin .CreateNhSessionFactory(String) |
GetExcelConnectionString(String) | no field | 1 method | 1min 0s | Medium | SqlWrangler.FrmLogin .GetExcelConnectionString(String) |
WriteLinq2DbField(StreamWriter ,FieldDefinition,String) | no field | 1 method | 1min 0s | Medium | SqlWrangler.Wizard.WriteLinq2DbField (StreamWriter,FieldDefinition,String) |
WriteEntityFrameworkField(StreamWriter ,FieldDefinition,String) | no field | 1 method | 1min 0s | Medium | SqlWrangler.Wizard .WriteEntityFrameworkField(StreamWriter ,FieldDefinition,String) |
GetFieldName(String) | no field | 4 methods | 2min 30s | Medium | SqlWrangler.Wizard.GetFieldName(String) |
Design | 1110 |
|
Rule Violated: Avoid namespaces with few types |
• How to Fix Issues of this Rule: To fix a violation of this rule, try to combine namespaces that contain just a few types into a single namespace.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1305:AvoidNamespacesWithFewTypes", 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, underlined means code was changed,
strike-boldmeans removed (since baseline)
1 namespace | types | Debt | Severity | Full Name |
---|---|---|---|---|
SqlWrangler.Forms | 1 type | 5min | Low | SqlWrangler.Forms |
Architecture | 620 |
Rule Violated: UI layer shouldn't use directly DB types |
• How to Fix Issues of this Rule: This rule lists precisely which UI type uses which DB framework type. Instead of fixing matches one by one, first imagine how DB framework accesses could be encapsulated into a dedicated layer.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1403:UILayerShouldntUseDirectlyDBTypes", 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.
7 types matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
7 types | dbTypesAndMembersUsed | Debt | Severity | Full Name |
---|---|---|---|---|
SnippetMenuBuilder | 4 types 2 methods | 36min | High | SqlWrangler.Services.SnippetMenuBuilder |
DataRowComparerViewer | 4 types 5 methods | 1h 0min | High | SqlWrangler.DataRowComparerViewer |
FrmExportSql | 2 types 1 method | 24min | High | SqlWrangler.FrmExportSql |
FrmLogin | 17 types 16 methods 1 field | 2h 36min | High | SqlWrangler.FrmLogin |
FrmMain | 1 type 2 methods | 28min | High | SqlWrangler.FrmMain |
SqlClient | 6 types 6 methods 1 field | 1h 20min | High | SqlWrangler.SqlClient |
Wizard | 4 types 2 methods | 36min | High | SqlWrangler.Wizard |
Rule Violated: UI layer shouldn't use directly DAL layer |
• How to Fix Issues of this Rule: This rule lists precisely which UI type uses which DAL type. More about this particular design topic here: http://www.kenneth-truyers.net/2013/05/12/the-n-layer-myth-and-basic-dependency-injection/
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1404:UILayerShouldntUseDirectlyDALLayer", 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.
5 types matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
5 types | dalTypesAndMembersUsed | Debt | Severity | Full Name |
---|---|---|---|---|
FrmExportSql | 1 type 4 methods | 32min | High | SqlWrangler.FrmExportSql |
FrmLogin | 1 type 3 methods | 32min | High | SqlWrangler.FrmLogin |
FrmMain | 2 types 2 methods | 28min | High | SqlWrangler.FrmMain |
SqlClient | 4 types 6 methods | 1h 0min | High | SqlWrangler.SqlClient |
Program | 1 type 1 method | 20min | High | SqlWrangler.Program |
Visibility | 730 |
Rule Violated: Methods that could have a lower visibility |
• How to Fix Issues of this Rule: Declare each matched method with the specified optimal visibility in the CouldBeDeclared rule result column. By default, this rule matches public methods. If you are publishing an API many public methods matched should remain public. In such situation, you can opt for the coarse solution to this problem by adding in the rule source code && !m.IsPubliclyVisible or you can prefer the finer solution by tagging each concerned method with CannotDecreaseVisibilityAttribute.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1800:MethodsThatCouldHaveALowerVisibility", 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, underlined means code was changed,
strike-boldmeans removed (since baseline)
3 methods | Visibility | CouldBeDeclared | MethodsCallingMe | Debt | Severity | Full Name |
---|---|---|---|---|---|---|
get_TableName() | Public | Private | no method | 0min 30s | Medium | SqlWrangler.FieldDefinition .get_TableName() |
get_TableSchema() | Public | Private | no method | 0min 30s | Medium | SqlWrangler.FieldDefinition .get_TableSchema() |
get_ClassName() | Public | Private | no method | 0min 30s | Medium | SqlWrangler.FieldDefinition .get_ClassName() |
Rule Violated: 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, underlined means code was changed,
strike-boldmeans removed (since baseline)
1 type | couldBeNestedIn | Debt | Severity | Full Name |
---|---|---|---|---|
FieldDefinition | Wizard | 3min 0s | Low | SqlWrangler.FieldDefinition |
Rule Violated: 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.
20 methods matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
20 methods | parentTypeVisibility | declareMethodAs | methodsCaller | Debt | Severity | Full Name |
---|---|---|---|---|---|---|
StyleElement(Scintilla) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.Services.ScintillaStyler .StyleElement(Scintilla) |
BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.Services.SnippetMenuBuilder .BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) |
get_TableName() | Internal | Private | no method | 0min 30s | Low | SqlWrangler.FieldDefinition .get_TableName() |
set_TableName(String) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition .set_TableName(String) |
get_TableSchema() | Internal | Private | no method | 0min 30s | Low | SqlWrangler.FieldDefinition .get_TableSchema() |
set_TableSchema(String) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition .set_TableSchema(String) |
get_ClassName() | Internal | Private | no method | 0min 30s | Low | SqlWrangler.FieldDefinition .get_ClassName() |
set_ClassName(String) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition .set_ClassName(String) |
get_Name() | Internal | Internal | 6 methods | 0min 30s | Low | SqlWrangler.FieldDefinition.get_Name() |
set_Name(String) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition.set_Name (String) |
get_DbFieldName() | Internal | Internal | 6 methods | 0min 30s | Low | SqlWrangler.FieldDefinition .get_DbFieldName() |
set_DbFieldName(String) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition .set_DbFieldName(String) |
get_Length() | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition.get_Length() |
set_Length(Int32) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition.set_Length (Int32) |
get_AllowsNull() | Internal | Internal | 5 methods | 0min 30s | Low | SqlWrangler.FieldDefinition .get_AllowsNull() |
set_AllowsNull(Boolean) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition .set_AllowsNull(Boolean) |
get_Type() | Internal | Internal | 3 methods | 0min 30s | Low | SqlWrangler.FieldDefinition.get_Type() |
set_Type(String) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition.set_Type (String) |
get_IsShortBool() | Internal | Internal | 2 methods | 0min 30s | Low | SqlWrangler.FieldDefinition .get_IsShortBool() |
set_IsShortBool(Boolean) | Internal | Internal | 1 method | 0min 30s | Low | SqlWrangler.FieldDefinition .set_IsShortBool(Boolean) |
Immutability | 1010 |
|
Rule Violated: Fields should be marked as ReadOnly when possible |
• How to Fix Issues of this Rule: Declare the field with the C# readonly keyword (ReadOnly in VB.NET). This way the intention that the field value shouldn't change is made explicit.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1900:FieldsShouldBeMarkedAsReadOnlyWhenPossible", 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.
6 fields matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
6 fields | MethodsReadingMeButNotAssigningMe | MethodsAssigningMe | Debt | Severity | Full Name |
---|---|---|---|---|---|
components | 2 methods | no method | 5min | Medium | SqlWrangler.Forms.FrmNameInput .components |
components | 2 methods | no method | 5min | Medium | SqlWrangler.DataRowComparerViewer .components |
components | 2 methods | no method | 5min | Medium | SqlWrangler.FrmExportSql.components |
components | 2 methods | no method | 5min | Medium | SqlWrangler.FrmLogin.components |
components | 2 methods | no method | 5min | Medium | SqlWrangler.FrmMain.components |
components | 2 methods | no method | 5min | Medium | SqlWrangler.SqlClient.components |
Naming Conventions | 1820 |
Rule Violated: Methods name should begin with an Upper character |
• How to Fix Issues of this Rule: Pascal Case the names of matched methods.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND2007:MethodsNameShouldBeginWithAnUpperCharacter", 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.
11 methods matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
11 methods | Debt | Severity | Full Name |
---|---|---|---|
button1_Click(Object,EventArgs) | 3min 0s | Medium | SqlWrangler.Forms.FrmNameInput .button1_Click(Object,EventArgs) |
button2_Click(Object,EventArgs) | 3min 0s | Medium | SqlWrangler.Forms.FrmNameInput .button2_Click(Object,EventArgs) |
txtName_KeyPress(Object ,KeyPressEventArgs) | 3min 0s | Medium | SqlWrangler.Forms.FrmNameInput .txtName_KeyPress(Object ,KeyPressEventArgs) |
btnCancel_Click(Object,EventArgs) | 3min 0s | Medium | SqlWrangler.FrmExportSql.btnCancel_Click (Object,EventArgs) |
btnOk_Click(Object,EventArgs) | 3min 0s | Medium | SqlWrangler.FrmExportSql.btnOk_Click (Object,EventArgs) |
button1_Click(Object,EventArgs) | 3min 0s | Medium | SqlWrangler.FrmLogin.button1_Click (Object,EventArgs) |
button2_Click(Object,EventArgs) | 3min 0s | Medium | SqlWrangler.FrmLogin.button2_Click (Object,EventArgs) |
frmLogin_Load(Object,EventArgs) | 3min 0s | Medium | SqlWrangler.FrmLogin.frmLogin_Load (Object,EventArgs) |
comboBox1_SelectedIndexChanged(Object ,EventArgs) | 3min 0s | Medium | SqlWrangler.FrmLogin .comboBox1_SelectedIndexChanged(Object ,EventArgs) |
txtPassword_KeyDown(Object,KeyEventArgs) | 3min 0s | Medium | SqlWrangler.FrmLogin.txtPassword_KeyDown (Object,KeyEventArgs) |
button3_Click(Object,EventArgs) | 3min 0s | Medium | SqlWrangler.FrmLogin.button3_Click (Object,EventArgs) |
Rule Violated: Avoid methods with name too long |
• How to Fix Issues of this Rule: To fix a violation of this rule, rename the method with a shortest name that equally conveys the behavior of the method. Or eventually split the method into several smaller methods.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND2010:AvoidMethodsWithNameTooLong", 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 method matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
1 method | SimpleName | NameLength | Debt | Severity | Full Name |
---|---|---|---|---|---|
ClearAllCheckFieldsToolStripMenuItem_Cli ck(Object,EventArgs) | ClearAllCheckFieldsToolStripMenuItem_Click | 42 | 3min 0s | Medium | SqlWrangler.DataRowComparerViewer .ClearAllCheckFieldsToolStripMenuItem_Cl ick(Object,EventArgs) |
Source Files Organization | 510 |
|
Rule Violated: Avoid defining multiple types in a source file |
• How to Fix Issues of this Rule: To fix a violation of this rule, create a source file for each type. 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", "ND2102:AvoidDefiningMultipleTypesInASourceFile", 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.
2 types matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
2 types | TypesInSourceFile | SourceFilePathString | Debt | Severity | Full Name |
---|---|---|---|---|---|
DataRowComparerViewer | 2 types | D:\src\SqlWrangler\SqlWrangler\SqlWrangler\DataRowComparerViewer.cs | 3min 0s | Low | SqlWrangler.DataRowComparerViewer |
Wizard | 2 types | D:\src\SqlWrangler\SqlWrangler\SqlWrangler\Wizard.cs | 3min 0s | Low | SqlWrangler.Wizard |
.NET Framework Usage | 2320 |
System | 910 |
|
Rule Violated: Do not raise too general exception types |
• How to Fix Issues of this Rule: To fix a violation of this rule, change the type of the thrown exception to either a more derived type that already exists in the framework, or create your own type that derives from System.Exception. The estimated Debt, which means the effort to fix such issue, is equal to 15 minutes per method matched, plus 5 minutes per too general exception types instantiated by the method.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND2207:DoNotRaiseTooGeneralExceptionTypes", 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 method matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
1 method | exceptionsCreated | Debt | Severity | Full Name |
---|---|---|---|---|
GenerateInsertSql(DataRow) | 1 type | 20min | High | SqliteTools.Table.GenerateInsertSql (DataRow) |
System.Globalization | 010 |
|
Rule Violated: Float and Date Parsing must be culture aware |
• How to Fix Issues of this Rule: Globalize your applicaton and make sure to use the globalized overloads of these methods. In the column MethodsCallingMe of this rule result are listed the methods of your application that call the non-globalized overloads. More information on Creating Globally Aware Applications here: https://msdn.microsoft.com/en-us/library/cc853414(VS.95).aspx The estimated Debt, which means the effort to fix such issue, is equal to 5 minutes per application method calling at least one non-culture aware method called, plus 3 minutes per non-culture aware method called.
• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND2700:FloatAndDateParsingMustBeCultureAware", 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 method matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
1 method | shouldntCall | Debt | Annual Interest | Full Name |
---|---|---|---|---|
GenerateInsertSql(DataRow) | 1 method | 8min | 5min | SqliteTools.Table.GenerateInsertSql (DataRow) |
Quality Gates
|
Code Query: Quality Gates Evolution |
7 quality gates matched
7 quality gates | Evolution | BaselineStatus | Status | BaselineValue | Value | Full Name |
---|---|---|---|---|---|---|
Blocker Issues | Pass | Pass | 0 issues | 0 issues | Quality Gate | |
Critical Issues | Pass | Pass | 0 issues | 0 issues | Quality Gate | |
New Blocker / Critical / High Issues | N/A | N/A | Fail | null | 5 issues | Quality Gate |
Percentage Debt | Pass | Pass | 6.82 % | 5.94 % | Quality Gate | |
New Debt since Baseline | N/A | N/A | Pass | null | -0.31 man-days | Quality Gate |
Debt Rating per Namespace | Pass | Pass | 0 namespaces | 0 namespaces | Quality Gate | |
New Annual Interest since Baseline | N/A | N/A | Warn | null | 0.29 man-days | Quality Gate |
Statistics
Stat | Evolution | BaselineStatus | Status | BaselineValue | Value |
---|---|---|---|---|---|
Sum: | - | - | - | - | - |
Average: | - | - | - | - | - |
Minimum: | - | - | - | - | - |
Maximum: | - | - | - | - | - |
Standard deviation: | - | - | - | - | - |
Variance: | - | - | - | - | - |
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 Fail: New Blocker / Critical / High Issues |
5 issues matched
5 issues | Severity | Debt | Annual Interest | Full Name |
---|---|---|---|---|
High issue on: SqlWrangler.SqlClient .ColorToolStripMenuItem_Click(Object ,EventArgs) | High | 5min | 1h 0min | Rule violated: From now, all methods added should respect basic quality principles |
High issue on: SqlWrangler.Services .SnippetMenuBuilder.BuildSnippetMenu (List<TextSnippet>,ToolStripMenuItem ,Keys,Scintilla,DataGridView) | High | 5min | 1h 0min | Rule violated: From now, all methods added should respect basic quality principles |
High issue on: SqlWrangler.Services .SnippetMenuBuilder.InsertFields (Scintilla,DataGridView) | High | 5min | 1h 0min | Rule violated: From now, all methods added should respect basic quality principles |
High issue on: SqlWrangler.SqlClient | High | 20min | 20min | Rule violated: Avoid adding instance fields to a type that already had many instance fields |
High issue on: SqlWrangler.Services.SnippetMenuBuilder | High | 36min | 20min | Rule violated: UI layer shouldn't use directly DB types |
Statistics
Stat | Severity | Debt | Annual Interest |
---|---|---|---|
Sum: | - | 1h 11min | 3h 40min |
Average: | - | 14min | 44min |
Minimum: | - | 5min | 20min |
Maximum: | - | 36min | 1h 0min |
Standard deviation: | - | 12min | 19min |
Variance: | - | 19d 0h | 47d |
Quality Gate Pass: Percentage Debt |
Scalar Result: 5.94 %
Quality Gate Pass: New Debt since Baseline |
Scalar Result: -0.31 man-days
Quality Gate Pass: Debt Rating per Namespace |
No namespace matched
Quality Gate Warn: New Annual Interest since Baseline |
Scalar Result: 0.29 man-days
Hot Spots
Code Query: Types Hot Spots |
12 types matched
12 types | Debt | Issues | Annual Interest | Breaking Point | # lines of code (LOC) | DebtRating | DebtRatio | Full Name |
---|---|---|---|---|---|---|---|---|
SqlClient | 4h 48min | 9 issues | 2h 53min | 608d | 407 | B | 7.11 | SqlWrangler.SqlClient |
FrmLogin | 3h 43min | 13 issues | 1h 10min | 1 155d | 205 | C | 11.31 | SqlWrangler.FrmLogin |
FrmMain | 1h 21min | 5 issues | 58min | 508d | 110 | B | 6.87 | SqlWrangler.FrmMain |
DataRowComparerViewer | 1h 20min | 7 issues | 53min | 555d | 227 | A | 3.64 | SqlWrangler.DataRowComparerViewer |
FrmExportSql | 1h 8min | 6 issues | 48min | 517d | 129 | B | 5.32 | SqlWrangler.FrmExportSql |
Wizard | 56min | 10 issues | 1h 38min | 209d | 169 | A | 3.61 | SqlWrangler.Wizard |
SnippetMenuBuilder | 52min | 7 issues | 2h 38min | 120d | 44 | C | 12.54 | SqlWrangler.Services.SnippetMenuBuilder |
Table | 32min | 5 issues | 39min | 296d | 74 | A | 4.11 | SqliteTools.Table |
Program | 20min | 1 issue | 20min | 365d | 3 | D | 46.3 | SqlWrangler.Program |
FieldDefinition | 14min | 23 issues | 8min | 638d | 18 | A | 3.45 | SqlWrangler.FieldDefinition |
FrmNameInput | 14min | 4 issues | 8min | 638d | 62 | A | 2.1 | SqlWrangler.Forms.FrmNameInput |
ScintillaStyler | 4min 0s | 4 issues | 4min 0s | 365d | 17 | A | 2.31 | SqlWrangler.Services.ScintillaStyler |
Statistics
Stat | Debt | Issues | Annual Interest | Breaking Point | # lines of code (LOC) | DebtRating | DebtRatio |
---|---|---|---|---|---|---|---|
Sum: | 1d 7h | 94 | 1d 4h | 5 978d | 1 465 | - | 108.66 |
Average: | 1h 17min | 7.83 | 1h 1min | 498d | 122.08 | - | 9.06 |
Minimum: | 4min 0s | 1 | 4min 0s | 120d | 3 | - | 2.1 |
Maximum: | 4h 48min | 23 | 2h 53min | 1 155d | 407 | - | 46.3 |
Standard deviation: | 1h 24min | 5.47 | 53min | 256d | 111.63 | - | 11.67 |
Variance: | 895d | 29.97 | 361d | overflow | 12 461 | - | 136.27 |
Code Query: Types to Fix Priority |
8 types matched
8 types | Breaking Point | Debt | Annual Interest | Issues | # lines of code (LOC) | DebtRating | DebtRatio | Full Name |
---|---|---|---|---|---|---|---|---|
SnippetMenuBuilder | 120d | 52min | 2h 38min | 7 issues | 44 | C | 12.54 | SqlWrangler.Services.SnippetMenuBuilder |
Wizard | 209d | 56min | 1h 38min | 10 issues | 169 | A | 3.61 | SqlWrangler.Wizard |
Table | 296d | 32min | 39min | 5 issues | 74 | A | 4.11 | SqliteTools.Table |
FrmMain | 508d | 1h 21min | 58min | 5 issues | 110 | B | 6.87 | SqlWrangler.FrmMain |
FrmExportSql | 517d | 1h 8min | 48min | 6 issues | 129 | B | 5.32 | SqlWrangler.FrmExportSql |
DataRowComparerViewer | 555d | 1h 20min | 53min | 7 issues | 227 | A | 3.64 | SqlWrangler.DataRowComparerViewer |
SqlClient | 608d | 4h 48min | 2h 53min | 9 issues | 407 | B | 7.11 | SqlWrangler.SqlClient |
FrmLogin | 1 155d | 3h 43min | 1h 10min | 13 issues | 205 | C | 11.31 | SqlWrangler.FrmLogin |
Statistics
Stat | Breaking Point | Debt | Annual Interest | Issues | # lines of code (LOC) | DebtRating | DebtRatio |
---|---|---|---|---|---|---|---|
Sum: | 3 970d | 1d 6h | 1d 3h | 62 | 1 365 | - | 54.5 |
Average: | 496d | 1h 50min | 1h 27min | 7.75 | 170.62 | - | 6.81 |
Minimum: | 120d | 32min | 39min | 5 | 44 | - | 3.61 |
Maximum: | 1 155d | 4h 48min | 2h 53min | 13 | 407 | - | 12.54 |
Standard deviation: | 299d | 1h 26min | 48min | 2.59 | 106.66 | - | 3.22 |
Variance: | overflow | 945d | 289d | 6.69 | 11 377 | - | 10.37 |
Code Query: Issues to Fix Priority |
95 issues matched
95 issues | Debt | Annual Interest | Breaking Point | CodeElement | Full Name |
---|---|---|---|---|---|
High issue on: SqlWrangler.SqlClient .ColorToolStripMenuItem_Click(Object ,EventArgs) | 5min | 1h 0min | 30d | ColorToolStripMenuItem_Click(Object,EventArgs) | Rule violated: From now, all methods added should respect basic quality principles |
High issue on: SqlWrangler.Services .SnippetMenuBuilder.BuildSnippetMenu (List<TextSnippet>,ToolStripMenuItem ,Keys,Scintilla,DataGridView) | 5min | 1h 0min | 30d | BuildSnippetMenu(List<TextSnippet>,ToolStripMenuItem,Keys,Scintilla,DataGridView) | Rule violated: From now, all methods added should respect basic quality principles |
High issue on: SqlWrangler.Services .SnippetMenuBuilder.InsertFields (Scintilla,DataGridView) | 5min | 1h 0min | 30d | InsertFields(Scintilla,DataGridView) | Rule violated: From now, all methods added should respect basic quality principles |
Medium issue on: SqlWrangler.SqlClient .WizardToolStripMenuItem1_Click(Object ,EventArgs) | 2min 12s | 16min | 50d | WizardToolStripMenuItem1_Click(Object,EventArgs) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler .DataRowComparerViewer.ToggleMenuItems() | 2min 24s | 16min | 54d | ToggleMenuItems() | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler.SqlClient .SaveExternalFile(Boolean) | 2min 24s | 16min | 54d | SaveExternalFile(Boolean) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler.Wizard .WriteModelClass(DataTable,StreamWriter ,IEnumerable<FieldDefinition> ,MapperAttributeType) | 2min 30s | 16min | 57d | WriteModelClass(DataTable,StreamWriter,IEnumerable<FieldDefinition>,MapperAttributeType) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler.Wizard .WriteCsWizard(DataTable,StreamWriter ,String,String) | 2min 48s | 16min | 63d | WriteCsWizard(DataTable,StreamWriter,String,String) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler.Wizard .WriteMappings(DataTable,StreamWriter ,IEnumerable<FieldDefinition>) | 2min 24s | 13min | 65d | WriteMappings(DataTable,StreamWriter,IEnumerable<FieldDefinition>) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler.Services .SnippetMenuBuilder.BuildSnippetMenu (List<TextSnippet>,ToolStripMenuItem ,Keys,Scintilla,DataGridView) | 3min 0s | 16min | 68d | BuildSnippetMenu(List<TextSnippet>,ToolStripMenuItem,Keys,Scintilla,DataGridView) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler.Wizard .WriteMaterializer(DataTable ,StreamWriter,IEnumerable <FieldDefinition>) | 2min 36s | 13min | 70d | WriteMaterializer(DataTable,StreamWriter,IEnumerable<FieldDefinition>) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler.Wizard .GetFields(DataTableReader) | 2min 36s | 13min | 70d | GetFields(DataTableReader) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler.FrmMain.GetSnippets() | 2min 0s | 10min | 71d | GetSnippets() | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqliteTools.Table .GenerateInsertSql(DataRow) | 2min 18s | 10min | 77d | GenerateInsertSql(DataRow) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler .DataRowComparerViewer.Compare(DataRow ,DataTable,String) | 2min 30s | 11min | 81d | Compare(DataRow,DataTable,String) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqlWrangler.Services.SnippetMenuBuilder | 0min 30s | 2min 0s | 91d | SnippetMenuBuilder | Rule violated: Class with no descendant should be sealed if possible |
Medium issue on: SqlWrangler.FieldDefinition | 0min 30s | 2min 0s | 91d | FieldDefinition | Rule violated: Class with no descendant should be sealed if possible |
Medium issue on: SqlWrangler.Services.ScintillaStyler | 0min 30s | 2min 0s | 91d | ScintillaStyler | Rule violated: Class with no descendant should be sealed if possible |
Medium issue on: SqlWrangler .FieldDefinition.get_TableName() | 0min 30s | 2min 0s | 91d | get_TableName() | Rule violated: Methods that could have a lower visibility |
Medium issue on: SqlWrangler .FieldDefinition.get_TableSchema() | 0min 30s | 2min 0s | 91d | get_TableSchema() | Rule violated: Methods that could have a lower visibility |
Medium issue on: SqlWrangler .FieldDefinition.get_ClassName() | 0min 30s | 2min 0s | 91d | get_ClassName() | Rule violated: Methods that could have a lower visibility |
Medium issue on: SqlWrangler.FrmLogin .CreateNhSessionFactory(String) | 4min 6s | 10min | 145d | CreateNhSessionFactory(String) | Rule violated: Avoid methods potentially poorly commented |
Medium issue on: SqliteTools.Table.IsString(Type) | 1min 0s | 2min 0s | 182d | IsString(Type) | Rule violated: Methods should be declared static if possible |
Medium issue on: SqliteTools.Table.IsDateTime(Type) | 1min 0s | 2min 0s | 182d | IsDateTime(Type) | Rule violated: Methods should be declared static if possible |
Medium issue on: SqlWrangler .FrmExportSql.ExportSql(FileInfo ,DataTable,String,String,Boolean,Boolean ) | 1min 0s | 2min 0s | 182d | ExportSql(FileInfo,DataTable,String,String,Boolean,Boolean) | Rule violated: Methods should be declared static if possible |
Medium issue on: SqlWrangler.FrmLogin .GetExcelConnectionString(String) | 1min 0s | 2min 0s | 182d | GetExcelConnectionString(String) | Rule violated: Methods should be declared static if possible |
Medium issue on: SqlWrangler.Wizard .WriteLinq2DbField(StreamWriter ,FieldDefinition,String) | 1min 0s | 2min 0s | 182d | WriteLinq2DbField(StreamWriter,FieldDefinition,String) | Rule violated: Methods should be declared static if possible |
Medium issue on: SqlWrangler.Wizard .WriteEntityFrameworkField(StreamWriter ,FieldDefinition,String) | 1min 0s | 2min 0s | 182d | WriteEntityFrameworkField(StreamWriter,FieldDefinition,String) | Rule violated: Methods should be declared static if possible |
Medium issue on: SqlWrangler.Services .ScintillaStyler.StyleElement(Scintilla) | 1min 0s | 2min 0s | 182d | StyleElement(Scintilla) | Rule violated: Methods should be declared static if possible |
Medium issue on: SqlWrangler.FrmLogin .CreateNhSessionFactory(String) | 1min 30s | 2min 0s | 273d | CreateNhSessionFactory(String) | Rule violated: Methods should be declared static if possible |
High issue on: SqlWrangler.SqlClient | 20min | 20min | 354d | SqlClient | Rule violated: Avoid adding instance fields to a type that already had many instance fields |
High issue on: SqlWrangler.Program | 20min | 20min | 365d | Program | Rule violated: UI layer shouldn't use directly DAL layer |
High issue on: SqliteTools.Table .GenerateInsertSql(DataRow) | 20min | 20min | 365d | GenerateInsertSql(DataRow) | Rule violated: Do not raise too general exception types |
High issue on: SqlWrangler.FrmExportSql | 24min | 20min | 438d | FrmExportSql | Rule violated: UI layer shouldn't use directly DB types |
Medium issue on: SqlWrangler.Wizard.GetFieldName(String) | 2min 30s | 2min 0s | 456d | GetFieldName(String) | Rule violated: Methods should be declared static if possible |
High issue on: SqlWrangler.FrmMain | 28min | 20min | 511d | FrmMain | Rule violated: UI layer shouldn't use directly DB types |
High issue on: SqlWrangler.FrmMain | 28min | 20min | 511d | FrmMain | Rule violated: UI layer shouldn't use directly DAL layer |
Medium issue on: SqlWrangler .FrmExportSql.btnCancel_Click(Object ,EventArgs) | 3min 0s | 2min 0s | 547d | btnCancel_Click(Object,EventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler .FrmExportSql.btnOk_Click(Object ,EventArgs) | 3min 0s | 2min 0s | 547d | btnOk_Click(Object,EventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.FrmLogin .button1_Click(Object,EventArgs) | 3min 0s | 2min 0s | 547d | button1_Click(Object,EventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.FrmLogin .button2_Click(Object,EventArgs) | 3min 0s | 2min 0s | 547d | button2_Click(Object,EventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.FrmLogin .frmLogin_Load(Object,EventArgs) | 3min 0s | 2min 0s | 547d | frmLogin_Load(Object,EventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.FrmLogin .comboBox1_SelectedIndexChanged(Object ,EventArgs) | 3min 0s | 2min 0s | 547d | comboBox1_SelectedIndexChanged(Object,EventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.FrmLogin .txtPassword_KeyDown(Object,KeyEventArgs ) | 3min 0s | 2min 0s | 547d | txtPassword_KeyDown(Object,KeyEventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.FrmLogin .button3_Click(Object,EventArgs) | 3min 0s | 2min 0s | 547d | button3_Click(Object,EventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.Forms .FrmNameInput.button1_Click(Object ,EventArgs) | 3min 0s | 2min 0s | 547d | button1_Click(Object,EventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.Forms .FrmNameInput.button2_Click(Object ,EventArgs) | 3min 0s | 2min 0s | 547d | button2_Click(Object,EventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.Forms .FrmNameInput.txtName_KeyPress(Object ,KeyPressEventArgs) | 3min 0s | 2min 0s | 547d | txtName_KeyPress(Object,KeyPressEventArgs) | Rule violated: Methods name should begin with an Upper character |
Medium issue on: SqlWrangler.DataRowComparerViewer .ClearAllCheckFieldsToolStripMenuItem_Cl ick(Object,EventArgs) | 3min 0s | 2min 0s | 547d | ClearAllCheckFieldsToolStripMenuItem_Click(Object,EventArgs) | Rule violated: Avoid methods with name too long |
High issue on: SqlWrangler.FrmExportSql | 32min | 20min | 584d | FrmExportSql | Rule violated: UI layer shouldn't use directly DAL layer |
High issue on: SqlWrangler.FrmLogin | 32min | 20min | 584d | FrmLogin | Rule violated: UI layer shouldn't use directly DAL layer |
Medium issue on: SqliteTools.Table .GenerateInsertSql(DataRow) | 8min | 5min | 584d | GenerateInsertSql(DataRow) | Rule violated: Float and Date Parsing must be culture aware |
High issue on: SqlWrangler.Wizard | 36min | 20min | 657d | Wizard | Rule violated: UI layer shouldn't use directly DB types |
High issue on: SqlWrangler.Services.SnippetMenuBuilder | 36min | 20min | 657d | SnippetMenuBuilder | Rule violated: UI layer shouldn't use directly DB types |
Medium issue on: SqlWrangler.DataRowComparerViewer | 5min | 2min 0s | 912d | DataRowComparerViewer | Rule violated: Avoid types with poor cohesion |
Medium issue on: SqlWrangler .DataRowComparerViewer.components | 5min | 2min 0s | 912d | components | Rule violated: Fields should be marked as ReadOnly when possible |
Medium issue on: SqlWrangler.FrmExportSql.components | 5min | 2min 0s | 912d | components | Rule violated: Fields should be marked as ReadOnly when possible |
Medium issue on: SqlWrangler.FrmLogin.components | 5min | 2min 0s | 912d | components | Rule violated: Fields should be marked as ReadOnly when possible |
Medium issue on: SqlWrangler.FrmMain.components | 5min | 2min 0s | 912d | components | Rule violated: Fields should be marked as ReadOnly when possible |
Medium issue on: SqlWrangler.SqlClient.components | 5min | 2min 0s | 912d | components | Rule violated: Fields should be marked as ReadOnly when possible |
Medium issue on: SqlWrangler.Forms .FrmNameInput.components | 5min | 2min 0s | 912d | components | Rule violated: Fields should be marked as ReadOnly when possible |
Medium issue on: SqlWrangler.FrmLogin | 6min | 2min 22s | 941d | FrmLogin | Rule violated: Avoid types with poor cohesion |
Medium issue on: SqlWrangler.FrmMain | 18min | 6min | 1 043d | FrmMain | Rule violated: Avoid types with poor cohesion |
Medium issue on: SqlWrangler.SqlClient | 38min | 13min | 1 071d | SqlClient | Rule violated: Avoid types with poor cohesion |
High issue on: SqlWrangler.DataRowComparerViewer | 1h 0min | 20min | 1 095d | DataRowComparerViewer | Rule violated: UI layer shouldn't use directly DB types |
High issue on: SqlWrangler.SqlClient | 1h 0min | 20min | 1 095d | SqlClient | Rule violated: UI layer shouldn't use directly DAL layer |
High issue on: SqlWrangler.SqlClient | 1h 20min | 20min | 1 460d | SqlClient | Rule violated: UI layer shouldn't use directly DB types |
High issue on: SqlWrangler.FrmLogin | 2h 36min | 20min | 2 847d | FrmLogin | Rule violated: UI layer shouldn't use directly DB types |
Medium issue on: SqlWrangler.SqlClient | 1h 15min | 5min | 5 186d | SqlClient | Rule violated: Avoid types with too many methods |
Low issue on: SqlWrangler.Services.ScintillaStyler | 2min 0s | 0min 0s | 00:00:00 | ScintillaStyler | Rule violated: A stateless class or structure might be turned into a static type |
Low issue on: SqlWrangler.Services.SnippetMenuBuilder | 2min 0s | 0min 0s | 00:00:00 | SnippetMenuBuilder | Rule violated: A stateless class or structure might be turned into a static type |
Low issue on: SqlWrangler.Forms | 5min | 0min 0s | 00:00:00 | SqlWrangler.Forms | Rule violated: Avoid namespaces with few types |
Low issue on: SqlWrangler.FieldDefinition | 3min 0s | 0min 0s | 00:00:00 | FieldDefinition | Rule violated: Types that could be declared as private, nested in a parent type |
Low issue on: SqlWrangler .FieldDefinition.get_TableName() | 0min 30s | 0min 0s | 00:00:00 | get_TableName() | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.set_TableName(String) | 0min 30s | 0min 0s | 00:00:00 | set_TableName(String) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.get_TableSchema() | 0min 30s | 0min 0s | 00:00:00 | get_TableSchema() | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.set_TableSchema(String) | 0min 30s | 0min 0s | 00:00:00 | set_TableSchema(String) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.get_ClassName() | 0min 30s | 0min 0s | 00:00:00 | get_ClassName() | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.set_ClassName(String) | 0min 30s | 0min 0s | 00:00:00 | set_ClassName(String) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler.FieldDefinition.get_Name() | 0min 30s | 0min 0s | 00:00:00 | get_Name() | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.set_Name(String) | 0min 30s | 0min 0s | 00:00:00 | set_Name(String) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.get_DbFieldName() | 0min 30s | 0min 0s | 00:00:00 | get_DbFieldName() | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.set_DbFieldName(String) | 0min 30s | 0min 0s | 00:00:00 | set_DbFieldName(String) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.get_Length() | 0min 30s | 0min 0s | 00:00:00 | get_Length() | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.set_Length(Int32) | 0min 30s | 0min 0s | 00:00:00 | set_Length(Int32) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.get_AllowsNull() | 0min 30s | 0min 0s | 00:00:00 | get_AllowsNull() | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.set_AllowsNull(Boolean) | 0min 30s | 0min 0s | 00:00:00 | set_AllowsNull(Boolean) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler.FieldDefinition.get_Type() | 0min 30s | 0min 0s | 00:00:00 | get_Type() | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.set_Type(String) | 0min 30s | 0min 0s | 00:00:00 | set_Type(String) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.get_IsShortBool() | 0min 30s | 0min 0s | 00:00:00 | get_IsShortBool() | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler .FieldDefinition.set_IsShortBool(Boolean ) | 0min 30s | 0min 0s | 00:00:00 | set_IsShortBool(Boolean) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler.Services .ScintillaStyler.StyleElement(Scintilla) | 0min 30s | 0min 0s | 00:00:00 | StyleElement(Scintilla) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler.Services .SnippetMenuBuilder.BuildSnippetMenu (List<TextSnippet>,ToolStripMenuItem ,Keys,Scintilla,DataGridView) | 0min 30s | 0min 0s | 00:00:00 | BuildSnippetMenu(List<TextSnippet>,ToolStripMenuItem,Keys,Scintilla,DataGridView) | Rule violated: Avoid public methods not publicly visible |
Low issue on: SqlWrangler.DataRowComparerViewer | 3min 0s | 0min 0s | 00:00:00 | DataRowComparerViewer | Rule violated: Avoid defining multiple types in a source file |
Low issue on: SqlWrangler.Wizard | 3min 0s | 0min 0s | 00:00:00 | Wizard | Rule violated: Avoid defining multiple types in a source file |
Statistics
Stat | Debt | Annual Interest | Breaking Point | CodeElement |
---|---|---|---|---|
Sum: | 1d 7h | 1d 4h | 36 886d | - |
Average: | 9min | 7min | 388d | - |
Minimum: | 0min 30s | 0min 0s | 00:00:00 | - |
Maximum: | 2h 36min | 1h 0min | 5 186d | - |
Standard deviation: | 21min | 11min | 660d | - |
Variance: | 58d | 17d 7h | overflow | - |
Code Query: Debt and Issues per Rule |
20 rules matched
20 rules | Issues | Debt | Annual Interest | Breaking Point | Category | Full Name |
---|---|---|---|---|---|---|
UI layer shouldn't use directly DB types | 7 issues | 7h 0min | 2h 20min | 1 095d | Project Rules \ Architecture | Rule |
UI layer shouldn't use directly DAL layer | 5 issues | 2h 52min | 1h 40min | 627d | Project Rules \ Architecture | Rule |
Avoid types with too many methods | 1 issue | 1h 15min | 5min | 5 186d | Project Rules \ Code Smells | Rule |
Avoid types with poor cohesion | 4 issues | 1h 9min | 24min | 1 037d | Project Rules \ Code Smells | Rule |
Avoid methods potentially poorly commented | 13 issues | 33min | 2h 58min | 69d | Project Rules \ Code Smells | Rule |
Methods name should begin with an Upper character | 11 issues | 33min | 22min | 547d | Project Rules \ Naming Conventions | Rule |
Fields should be marked as ReadOnly when possible | 6 issues | 30min | 12min | 912d | Project Rules \ Immutability | Rule |
Avoid adding instance fields to a type that already had many instance fields | 1 issue | 20min | 20min | 354d | Project Rules \ Code Smells Regression | Rule |
Do not raise too general exception types | 1 issue | 20min | 20min | 365d | Project Rules \ .NET Framework Usage \ System | Rule |
From now, all methods added should respect basic quality principles | 3 issues | 15min | 3h 0min | 30d | Project Rules \ Code Smells Regression | Rule |
Methods should be declared static if possible | 9 issues | 11min | 18min | 223d | Project Rules \ Object Oriented Design | Rule |
Avoid public methods not publicly visible | 20 issues | 10min | 0min 0s | 00:00:00 | Project Rules \ Visibility | Rule |
Float and Date Parsing must be culture aware | 1 issue | 8min | 5min | 584d | Project Rules \ .NET Framework Usage \ System.Globalization | Rule |
Avoid defining multiple types in a source file | 2 issues | 6min | 0min 0s | 00:00:00 | Project Rules \ Source Files Organization | Rule |
Avoid namespaces with few types | 1 issue | 5min | 0min 0s | 00:00:00 | Project Rules \ Design | Rule |
A stateless class or structure might be turned into a static type | 2 issues | 4min 0s | 0min 0s | 00:00:00 | Project Rules \ Object Oriented Design | Rule |
Types that could be declared as private, nested in a parent type | 1 issue | 3min 0s | 0min 0s | 00:00:00 | Project Rules \ Visibility | Rule |
Avoid methods with name too long | 1 issue | 3min 0s | 2min 0s | 547d | Project Rules \ Naming Conventions | Rule |
Class with no descendant should be sealed if possible | 3 issues | 1min 30s | 6min | 91d | Project Rules \ Object Oriented Design | Rule |
Methods that could have a lower visibility | 3 issues | 1min 30s | 6min | 91d | Project Rules \ Visibility | Rule |
Statistics
Stat | Issues | Debt | Annual Interest | Breaking Point | Category |
---|---|---|---|---|---|
Sum: | 95 | 1d 7h | 1d 4h | 11 763d | - |
Average: | 4.75 | 47min | 36min | 588d | - |
Minimum: | 1 | 1min 30s | 0min 0s | 00:00:00 | - |
Maximum: | 20 | 7h 0min | 3h 0min | 5 186d | - |
Standard deviation: | 4.94 | 1h 33min | 58min | 1 112d | - |
Variance: | 24.39 | 1 104d | 431d | overflow | - |
Code Query: New Debt and Issues per Rule |
13 rules matched
13 rules | IssuesAdded | IssuesFixed | Issues | Debt | DebtDiff | Category | Full Name |
---|---|---|---|---|---|---|---|
Avoid adding instance fields to a type that already had many instance fields | 1 issue | no issue | 1 issue | 20min | 20min | Project Rules \ Code Smells Regression | Rule |
From now, all methods added should respect basic quality principles | 3 issues | no issue | 3 issues | 15min | 15min | Project Rules \ Code Smells Regression | Rule |
UI layer shouldn't use directly DB types | 1 issue | no issue | 7 issues | 7h 0min | 8min | Project Rules \ Architecture | Rule |
Avoid namespaces with few types | 1 issue | no issue | 1 issue | 5min | 5min | Project Rules \ Design | Rule |
A stateless class or structure might be turned into a static type | 2 issues | no issue | 2 issues | 4min 0s | 4min 0s | Project Rules \ Object Oriented Design | Rule |
Avoid types with poor cohesion | 1 issue | no issue | 4 issues | 1h 9min | 2min 42s | Project Rules \ Code Smells | Rule |
Class with no descendant should be sealed if possible | 2 issues | no issue | 3 issues | 1min 30s | 1min 0s | Project Rules \ Object Oriented Design | Rule |
Methods should be declared static if possible | 1 issue | no issue | 9 issues | 11min | 1min 0s | Project Rules \ Object Oriented Design | Rule |
Avoid public methods not publicly visible | 2 issues | no issue | 20 issues | 10min | 1min 0s | Project Rules \ Visibility | Rule |
Fields should be marked as ReadOnly when possible | 1 issue | 1 issue | 6 issues | 30min | 0min 0s | Project Rules \ Immutability | Rule |
Avoid methods with name too long | 1 issue | 1 issue | 1 issue | 3min 0s | 0min 0s | Project Rules \ Naming Conventions | Rule |
Avoid methods potentially poorly commented | 1 issue | 1 issue | 13 issues | 33min | -(1min 30s) | Project Rules \ Code Smells | Rule |
Methods name should begin with an Upper character | 3 issues | 24 issues | 11 issues | 33min | -(1h 3min) | Project Rules \ Naming Conventions | Rule |
Statistics
Stat | IssuesAdded | IssuesFixed | Issues | Debt | DebtDiff | Category |
---|---|---|---|---|---|---|
Sum: | 20 | 27 | 81 | 1d 2h | -(6min) | - |
Average: | 1.54 | 2.08 | 6.23 | 50min | -(0min 31s) | - |
Minimum: | 1 | 0 | 1 | 1min 30s | -(1h 3min) | - |
Maximum: | 3 | 24 | 20 | 7h 0min | 20min | - |
Standard deviation: | 0.75 | 6.34 | 5.49 | 1h 48min | 19min | - |
Variance: | 0.56 | 40.22 | 30.18 | 1 463d | 45d | - |
Code Query: Debt and Issues per Code Element |
70 code elements matched
70 code elements | Issues | Debt | Annual Interest | Breaking Point | Full Name |
---|---|---|---|---|---|
SqlClient | 5 issues | 4h 33min | 1h 19min | 1 263d | SqlWrangler.SqlClient |
FrmLogin | 3 issues | 3h 14min | 42min | 1 672d | SqlWrangler.FrmLogin |
FrmMain | 3 issues | 1h 14min | 46min | 586d | SqlWrangler.FrmMain |
DataRowComparerViewer | 3 issues | 1h 8min | 22min | 1 128d | SqlWrangler.DataRowComparerViewer |
FrmExportSql | 2 issues | 56min | 40min | 511d | SqlWrangler.FrmExportSql |
Wizard | 2 issues | 39min | 20min | 711d | SqlWrangler.Wizard |
SnippetMenuBuilder | 3 issues | 38min | 22min | 638d | SqlWrangler.Services.SnippetMenuBuilder |
GenerateInsertSql(DataRow) | 3 issues | 30min | 35min | 308d | SqliteTools.Table.GenerateInsertSql (DataRow) |
Program | 1 issue | 20min | 20min | 365d | SqlWrangler.Program |
BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) | 3 issues | 8min | 1h 16min | 40d | SqlWrangler.Services.SnippetMenuBuilder .BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) |
CreateNhSessionFactory(String) | 2 issues | 5min | 12min | 166d | SqlWrangler.FrmLogin .CreateNhSessionFactory(String) |
components | 1 issue | 5min | 2min 0s | 912d | SqlWrangler.DataRowComparerViewer .components |
components | 1 issue | 5min | 2min 0s | 912d | SqlWrangler.FrmExportSql.components |
components | 1 issue | 5min | 2min 0s | 912d | SqlWrangler.FrmLogin.components |
components | 1 issue | 5min | 2min 0s | 912d | SqlWrangler.FrmMain.components |
ColorToolStripMenuItem_Click(Object ,EventArgs) | 1 issue | 5min | 1h 0min | 30d | SqlWrangler.SqlClient .ColorToolStripMenuItem_Click(Object ,EventArgs) |
components | 1 issue | 5min | 2min 0s | 912d | SqlWrangler.SqlClient.components |
InsertFields(Scintilla,DataGridView) | 1 issue | 5min | 1h 0min | 30d | SqlWrangler.Services.SnippetMenuBuilder .InsertFields(Scintilla,DataGridView) |
SqlWrangler.Forms | 1 issue | 5min | 0min 0s | 00:00:00 | SqlWrangler.Forms |
components | 1 issue | 5min | 2min 0s | 912d | SqlWrangler.Forms.FrmNameInput .components |
FieldDefinition | 2 issues | 3min 30s | 2min 0s | 638d | SqlWrangler.FieldDefinition |
ClearAllCheckFieldsToolStripMenuItem_Cli ck(Object,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.DataRowComparerViewer .ClearAllCheckFieldsToolStripMenuItem_Cl ick(Object,EventArgs) |
btnCancel_Click(Object,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.FrmExportSql.btnCancel_Click (Object,EventArgs) |
btnOk_Click(Object,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.FrmExportSql.btnOk_Click (Object,EventArgs) |
button1_Click(Object,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.FrmLogin.button1_Click (Object,EventArgs) |
button2_Click(Object,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.FrmLogin.button2_Click (Object,EventArgs) |
frmLogin_Load(Object,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.FrmLogin.frmLogin_Load (Object,EventArgs) |
comboBox1_SelectedIndexChanged(Object ,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.FrmLogin .comboBox1_SelectedIndexChanged(Object ,EventArgs) |
txtPassword_KeyDown(Object,KeyEventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.FrmLogin.txtPassword_KeyDown (Object,KeyEventArgs) |
button3_Click(Object,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.FrmLogin.button3_Click (Object,EventArgs) |
button1_Click(Object,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.Forms.FrmNameInput .button1_Click(Object,EventArgs) |
button2_Click(Object,EventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.Forms.FrmNameInput .button2_Click(Object,EventArgs) |
txtName_KeyPress(Object ,KeyPressEventArgs) | 1 issue | 3min 0s | 2min 0s | 547d | SqlWrangler.Forms.FrmNameInput .txtName_KeyPress(Object ,KeyPressEventArgs) |
WriteCsWizard(DataTable,StreamWriter ,String,String) | 1 issue | 2min 48s | 16min | 63d | SqlWrangler.Wizard.WriteCsWizard (DataTable,StreamWriter,String,String) |
WriteMaterializer(DataTable,StreamWriter ,IEnumerable<FieldDefinition>) | 1 issue | 2min 36s | 13min | 70d | SqlWrangler.Wizard.WriteMaterializer (DataTable,StreamWriter,IEnumerable <FieldDefinition>) |
GetFields(DataTableReader) | 1 issue | 2min 36s | 13min | 70d | SqlWrangler.Wizard.GetFields (DataTableReader) |
Compare(DataRow,DataTable,String) | 1 issue | 2min 30s | 11min | 81d | SqlWrangler.DataRowComparerViewer .Compare(DataRow,DataTable,String) |
WriteModelClass(DataTable,StreamWriter ,IEnumerable<FieldDefinition> ,MapperAttributeType) | 1 issue | 2min 30s | 16min | 57d | SqlWrangler.Wizard.WriteModelClass (DataTable,StreamWriter,IEnumerable <FieldDefinition>,MapperAttributeType) |
GetFieldName(String) | 1 issue | 2min 30s | 2min 0s | 456d | SqlWrangler.Wizard.GetFieldName(String) |
ScintillaStyler | 2 issues | 2min 30s | 2min 0s | 456d | SqlWrangler.Services.ScintillaStyler |
ToggleMenuItems() | 1 issue | 2min 24s | 16min | 54d | SqlWrangler.DataRowComparerViewer .ToggleMenuItems() |
SaveExternalFile(Boolean) | 1 issue | 2min 24s | 16min | 54d | SqlWrangler.SqlClient.SaveExternalFile (Boolean) |
WriteMappings(DataTable,StreamWriter ,IEnumerable<FieldDefinition>) | 1 issue | 2min 24s | 13min | 65d | SqlWrangler.Wizard.WriteMappings (DataTable,StreamWriter,IEnumerable <FieldDefinition>) |
WizardToolStripMenuItem1_Click(Object ,EventArgs) | 1 issue | 2min 12s | 16min | 50d | SqlWrangler.SqlClient .WizardToolStripMenuItem1_Click(Object ,EventArgs) |
GetSnippets() | 1 issue | 2min 0s | 10min | 71d | SqlWrangler.FrmMain.GetSnippets() |
StyleElement(Scintilla) | 2 issues | 1min 30s | 2min 0s | 273d | SqlWrangler.Services.ScintillaStyler .StyleElement(Scintilla) |
IsString(Type) | 1 issue | 1min 0s | 2min 0s | 182d | SqliteTools.Table.IsString(Type) |
IsDateTime(Type) | 1 issue | 1min 0s | 2min 0s | 182d | SqliteTools.Table.IsDateTime(Type) |
ExportSql(FileInfo,DataTable,String ,String,Boolean,Boolean) | 1 issue | 1min 0s | 2min 0s | 182d | SqlWrangler.FrmExportSql.ExportSql (FileInfo,DataTable,String,String ,Boolean,Boolean) |
GetExcelConnectionString(String) | 1 issue | 1min 0s | 2min 0s | 182d | SqlWrangler.FrmLogin .GetExcelConnectionString(String) |
get_TableName() | 2 issues | 1min 0s | 2min 0s | 182d | SqlWrangler.FieldDefinition .get_TableName() |
get_TableSchema() | 2 issues | 1min 0s | 2min 0s | 182d | SqlWrangler.FieldDefinition .get_TableSchema() |
get_ClassName() | 2 issues | 1min 0s | 2min 0s | 182d | SqlWrangler.FieldDefinition .get_ClassName() |
WriteLinq2DbField(StreamWriter ,FieldDefinition,String) | 1 issue | 1min 0s | 2min 0s | 182d | SqlWrangler.Wizard.WriteLinq2DbField (StreamWriter,FieldDefinition,String) |
WriteEntityFrameworkField(StreamWriter ,FieldDefinition,String) | 1 issue | 1min 0s | 2min 0s | 182d | SqlWrangler.Wizard .WriteEntityFrameworkField(StreamWriter ,FieldDefinition,String) |
set_TableName(String) | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition .set_TableName(String) |
set_TableSchema(String) | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition .set_TableSchema(String) |
set_ClassName(String) | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition .set_ClassName(String) |
get_Name() | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition.get_Name() |
set_Name(String) | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition.set_Name (String) |
get_DbFieldName() | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition .get_DbFieldName() |
set_DbFieldName(String) | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition .set_DbFieldName(String) |
get_Length() | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition.get_Length() |
set_Length(Int32) | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition.set_Length (Int32) |
get_AllowsNull() | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition .get_AllowsNull() |
set_AllowsNull(Boolean) | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition .set_AllowsNull(Boolean) |
get_Type() | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition.get_Type() |
set_Type(String) | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition.set_Type (String) |
get_IsShortBool() | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition .get_IsShortBool() |
set_IsShortBool(Boolean) | 1 issue | 0min 30s | 0min 0s | 00:00:00 | SqlWrangler.FieldDefinition .set_IsShortBool(Boolean) |
Statistics
Stat | Issues | Debt | Annual Interest | Breaking Point |
---|---|---|---|---|
Sum: | 95 | 1d 7h | 1d 4h | 23 606d |
Average: | 1.36 | 13min | 10min | 337d |
Minimum: | 1 | 0min 30s | 0min 0s | 00:00:00 |
Maximum: | 5 | 4h 33min | 1h 19min | 1 672d |
Standard deviation: | 0.76 | 41min | 17min | 364d |
Variance: | 0.57 | 211d | 39d | overflow |
Code Query: New Debt and Issues per Code Element |
14 code elements matched
14 code elements | IssuesAdded | IssuesFixed | Issues | Debt | DebtDiff | Full Name |
---|---|---|---|---|---|---|
SnippetMenuBuilder | 3 issues | no issue | 3 issues | 38min | 38min | SqlWrangler.Services.SnippetMenuBuilder |
BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) | 3 issues | no issue | 3 issues | 8min | 8min | SqlWrangler.Services.SnippetMenuBuilder .BuildSnippetMenu(List<TextSnippet> ,ToolStripMenuItem,Keys,Scintilla ,DataGridView) |
DataRowComparerViewer | 1 issue | no issue | 3 issues | 1h 8min | 5min | SqlWrangler.DataRowComparerViewer |
ColorToolStripMenuItem_Click(Object ,EventArgs) | 1 issue | no issue | 1 issue | 5min | 5min | SqlWrangler.SqlClient .ColorToolStripMenuItem_Click(Object ,EventArgs) |
InsertFields(Scintilla,DataGridView) | 1 issue | no issue | 1 issue | 5min | 5min | SqlWrangler.Services.SnippetMenuBuilder .InsertFields(Scintilla,DataGridView) |
SqlWrangler.Forms | 1 issue | no issue | 1 issue | 5min | 5min | SqlWrangler.Forms |
components | 1 issue | no issue | 1 issue | 5min | 5min | SqlWrangler.Forms.FrmNameInput .components |
ClearAllCheckFieldsToolStripMenuItem_Cli ck(Object,EventArgs) | 1 issue | no issue | 1 issue | 3min 0s | 3min 0s | SqlWrangler.DataRowComparerViewer .ClearAllCheckFieldsToolStripMenuItem_Cl ick(Object,EventArgs) |
button1_Click(Object,EventArgs) | 1 issue | no issue | 1 issue | 3min 0s | 3min 0s | SqlWrangler.Forms.FrmNameInput .button1_Click(Object,EventArgs) |
button2_Click(Object,EventArgs) | 1 issue | no issue | 1 issue | 3min 0s | 3min 0s | SqlWrangler.Forms.FrmNameInput .button2_Click(Object,EventArgs) |
txtName_KeyPress(Object ,KeyPressEventArgs) | 1 issue | no issue | 1 issue | 3min 0s | 3min 0s | SqlWrangler.Forms.FrmNameInput .txtName_KeyPress(Object ,KeyPressEventArgs) |
ScintillaStyler | 2 issues | no issue | 2 issues | 2min 30s | 2min 30s | SqlWrangler.Services.ScintillaStyler |
StyleElement(Scintilla) | 2 issues | no issue | 2 issues | 1min 30s | 1min 30s | SqlWrangler.Services.ScintillaStyler .StyleElement(Scintilla) |
SqlClient | 1 issue | 2 issues | 5 issues | 4h 33min | -(1h 24min) | SqlWrangler.SqlClient |
Statistics
Stat | IssuesAdded | IssuesFixed | Issues | Debt | DebtDiff |
---|---|---|---|---|---|
Sum: | 20 | 2 | 26 | 7h 4min | 3min 54s |
Average: | 1.43 | 0.14 | 1.86 | 30min | 0min 16s |
Minimum: | 1 | 0 | 1 | 1min 30s | -(1h 24min) |
Maximum: | 3 | 2 | 5 | 4h 33min | 38min |
Standard deviation: | 0.73 | 0.52 | 1.19 | 1h 9min | 25min |
Variance: | 0.53 | 0.27 | 1.41 | 611d | 78d |
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. A classic example is a ISession large interface, responsible for holding states, run commands and offer various accesses and facilities. The classic 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: 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, underlined means code was changed,
strike-boldmeans removed (since baseline)
3 types | # lines of code (LOC) | Debt | Severity | Full Name |
---|---|---|---|---|
SnippetMenuBuilder | 44 | 0min 30s | Medium | SqlWrangler.Services.SnippetMenuBuilder |
FieldDefinition | 18 | 0min 30s | Medium | SqlWrangler.FieldDefinition |
ScintillaStyler | 17 | 0min 30s | Medium | SqlWrangler.Services.ScintillaStyler |
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: http://blogs.msdn.com/b/ericlippert/archive/2008/05/21/method-hiding-apologia.aspx
• 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
Rule Violated: 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.
2 types matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
2 types | methodsUsingMe | Debt | Severity | Full Name |
---|---|---|---|---|
ScintillaStyler | 1 method | 2min 0s | Low | SqlWrangler.Services.ScintillaStyler |
SnippetMenuBuilder | 1 method | 2min 0s | Low | SqlWrangler.Services.SnippetMenuBuilder |
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
Rule Violated: 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.
9 methods matched
-
Formatting: bold means added, underlined means code was changed,
strike-boldmeans removed (since baseline)
9 methods | staticFieldsUsed | methodsCallingMe | Debt | Severity | Full Name |
---|---|---|---|---|---|
IsString(Type) | no field | 1 method | 1min 0s | Medium | SqliteTools.Table.IsString(Type) |
IsDateTime(Type) | no field | 1 method | 1min 0s | Medium | SqliteTools.Table.IsDateTime(Type) |
ExportSql(FileInfo,DataTable,String ,String,Boolean,Boolean) | no field | 1 method | 1min 0s | Medium | SqlWrangler.FrmExportSql.ExportSql (FileInfo,DataTable,String,String ,Boolean,Boolean) |
CreateNhSessionFactory(String) | no field | 2 methods | 1min 30s | Medium | SqlWrangler.FrmLogin .CreateNhSessionFactory(String) |
GetExcelConnectionString(String) | no field | 1 method | 1min 0s | Medium | SqlWrangler.FrmLogin .GetExcelConnectionString(String) |
WriteLinq2DbField(StreamWriter ,FieldDefinition,String) | no field | 1 method | 1min 0s | Medium | SqlWrangler.Wizard.WriteLinq2DbField (StreamWriter,FieldDefinition,String) |
WriteEntityFrameworkField(StreamWriter ,FieldDefinition,String) | no field | 1 method | 1min 0s | Medium | SqlWrangler.Wizard .WriteEntityFrameworkField(StreamWriter ,FieldDefinition,String) |
GetFieldName(String) | no field | 4 methods | 2min 30s | Medium | SqlWrangler.Wizard.GetFieldName(String) |
StyleElement(Scintilla) | no field | 1 method | 1min 0s | Medium | SqlWrangler.Services.ScintillaStyler .StyleElement(Scintilla) |
Validated Rule: Constructor should not call a virtual method |
• How to Fix Issues of this Rule: Violations reported can be solved by re-designing object initialisation or by declaring the parent class as sealed, if possible.
• 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 matches the classic syntax of singletons, where one static field hold the single instance of the parent class. We underline that the problem is this particular syntax, that plays against testability. The problem is not the fact that a single instance of the class lives at runtime. Hence to fix matches fo this rule, creates the single instance at the startup of the program, and pass it to all classes and methods that need to access it. If multiple singletons are identified, they actually form together a program execution context. Such context can be unified in a unique singleton context. Doing so will make it easier to propagate the context across the 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.
• 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 label 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: 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 classes 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 method matched
Validated Rule: New Methods should be tested |
• How to Fix Issues of this Rule: Write unit-tests to cover the code of most methods and classes added.
• 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 method 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 Namespaces and Types 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 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 that can be found in NDepend.API.dll, or by an attribute of yours defined in your own code (in which case this rule must be adapted).
• 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
Validated Rule: 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.
No method matched
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
» Baseline for comparison : Compare with analysis result obtained on 2019 July - 21 Sunday 06:51 (which is the analysis result with date closest to 30 days ago) |
|
Code Query: New assemblies |
No assembly matched
Code Query: Assemblies removed |
No assembly matched
Code Query: Assemblies where code was changed |
2 assemblies matched
2 assemblies | # lines of code (LOC) | oldNbLinesOfCode | delta | Full Name |
---|---|---|---|---|
SqliteTools | 74 | 76 | -2 | SqliteTools |
SqlWrangler | 1 448 | 1 459 | -11 | SqlWrangler |
Code Query: New namespaces |
3 namespaces matched
3 namespaces | # lines of code (LOC) | Full Name |
---|---|---|
SqlWrangler.Services | 61 | SqlWrangler.Services |
SqlWrangler.Models | 4 | SqlWrangler.Models |
SqlWrangler.Forms | 62 | SqlWrangler.Forms |
Code Query: Namespaces removed |
No namespace matched
Code Query: Namespaces where code was changed |
2 namespaces matched
2 namespaces | # lines of code (LOC) | oldNbLinesOfCode | delta | Full Name |
---|---|---|---|---|
SqliteTools | 74 | 76 | -2 | SqliteTools |
SqlWrangler | 1 272 | 1 410 | -138 | SqlWrangler |
Code Query: New types |
No type matched
Code Query: Types removed |
4 types matched
4 types | # lines of code (LOC) | Full Name |
---|---|---|
N/A | SqliteTools.DataUpdateMode | |
1 | SqliteTools.SqliteTypes | |
62 | SqlWrangler.FrmNameInput | |
4 | SqlWrangler.TextSnippet |
Code Query: Types where code was changed |
7 types matched
7 types | # lines of code (LOC) | oldNbLinesOfCode | delta | Full Name |
---|---|---|---|---|
Table | 74 | 75 | -1 | SqliteTools.Table |
DataRowComparerViewer | 227 | 233 | -6 | SqlWrangler.DataRowComparerViewer |
FrmExportSql | 129 | 130 | -1 | SqlWrangler.FrmExportSql |
FrmLogin | 205 | 205 | 0 | SqlWrangler.FrmLogin |
FrmMain | 110 | 110 | 0 | SqlWrangler.FrmMain |
SqlClient | 407 | 469 | -62 | SqlWrangler.SqlClient |
Wizard | 169 | 172 | -3 | SqlWrangler.Wizard |
Code Query: Heuristic to find types moved from one namespace or assembly to another |
2 types matched
2 types | OlderParentNamespace | OlderParentAssembly | Full Name |
---|---|---|---|
TextSnippet | SqlWrangler | SqlWrangler | SqlWrangler.Models.TextSnippet |
FrmNameInput | SqlWrangler | SqlWrangler | SqlWrangler.Forms.FrmNameInput |
Code Query: Types directly using one or several types changed |
1 type matched
1 type | typesChangedUsed | Full Name |
---|---|---|
Program | 1 type | SqlWrangler.Program |
Code Query: Types indirectly using one or several types changed |
1 type matched
1 type | depthOfUsingTypesChanged | typesChangedDirectlyUsed | Full Name |
---|---|---|---|
Program | 1 | 1 type | SqlWrangler.Program |
Code Query: New methods |
24 methods matched
24 methods | # lines of code (LOC) | Full Name |
---|---|---|
GenerateImportDataSql(DataTable) | 7 | SqliteTools.Table.GenerateImportDataSql (DataTable) |
.cctor() | 1 | SqliteTools.Table..cctor() |
DataGridView1_CellFormatting(Object ,DataGridViewCellFormattingEventArgs) | 5 | SqlWrangler.DataRowComparerViewer .DataGridView1_CellFormatting(Object ,DataGridViewCellFormattingEventArgs) |
DataGridView1_RowHeaderMouseClick(Object ,DataGridViewCellMouseEventArgs) | 1 | SqlWrangler.DataRowComparerViewer .DataGridView1_RowHeaderMouseClick (Object,DataGridViewCellMouseEventArgs) |
SetKeyToolStripMenuItem_Click(Object ,EventArgs) | 2 | SqlWrangler.DataRowComparerViewer .SetKeyToolStripMenuItem_Click(Object ,EventArgs) |
FormatDataGridColumns() | 13 | SqlWrangler.DataRowComparerViewer .FormatDataGridColumns() |
DataGridView1_ColumnHeaderMouseClick (Object,DataGridViewCellMouseEventArgs) | 16 | SqlWrangler.DataRowComparerViewer .DataGridView1_ColumnHeaderMouseClick (Object,DataGridViewCellMouseEventArgs) |
SetCheckFieldsToolStripMenuItem_Click (Object,EventArgs) | 2 | SqlWrangler.DataRowComparerViewer .SetCheckFieldsToolStripMenuItem_Click (Object,EventArgs) |
ClearAllCheckFieldsToolStripMenuItem_Cli ck(Object,EventArgs) | 5 | SqlWrangler.DataRowComparerViewer .ClearAllCheckFieldsToolStripMenuItem_Cl ick(Object,EventArgs) |
NewToolStripMenuItem_Click_1(Object ,EventArgs) | 1 | SqlWrangler.FrmMain .NewToolStripMenuItem_Click_1(Object ,EventArgs) |
FrmMain_FormClosed(Object ,FormClosedEventArgs) | 4 | SqlWrangler.FrmMain.FrmMain_FormClosed (Object,FormClosedEventArgs) |
FrmMain_DragDrop(Object,DragEventArgs) | 0 | SqlWrangler.FrmMain.FrmMain_DragDrop (Object,DragEventArgs) |
HelpToolStripMenuItem_Click(Object ,EventArgs) | 0 | SqlWrangler.FrmMain .HelpToolStripMenuItem_Click(Object ,EventArgs) |
AboutToolStripMenuItem_Click(Object ,EventArgs) | 1 | SqlWrangler.FrmMain .AboutToolStripMenuItem_Click(Object ,EventArgs) |
ExecuteToolStripMenuItem_Click(Object ,EventArgs) | 1 | SqlWrangler.SqlClient .ExecuteToolStripMenuItem_Click(Object ,EventArgs) |
ToCSVToolStripMenuItem_Click(Object ,EventArgs) | 7 | SqlWrangler.SqlClient .ToCSVToolStripMenuItem_Click(Object ,EventArgs) |
TextBox1_KeyUp_1(Object,KeyEventArgs) | 4 | SqlWrangler.SqlClient.TextBox1_KeyUp_1 (Object,KeyEventArgs) |
ToXMLToolStripMenuItem_Click(Object ,EventArgs) | 1 | SqlWrangler.SqlClient .ToXMLToolStripMenuItem_Click(Object ,EventArgs) |
CancelToolStripMenuItem_Click(Object ,EventArgs) | 4 | SqlWrangler.SqlClient .CancelToolStripMenuItem_Click(Object ,EventArgs) |
ToDaveSqlToolStripMenuItem_Click(Object ,EventArgs) | 4 | SqlWrangler.SqlClient .ToDaveSqlToolStripMenuItem_Click(Object ,EventArgs) |
DataGridView1_DataError(Object ,DataGridViewDataErrorEventArgs) | 0 | SqlWrangler.SqlClient .DataGridView1_DataError(Object ,DataGridViewDataErrorEventArgs) |
ToJSONToolStripMenuItem_Click(Object ,EventArgs) | 1 | SqlWrangler.SqlClient .ToJSONToolStripMenuItem_Click(Object ,EventArgs) |
ColorToolStripMenuItem_Click(Object ,EventArgs) | 15 | SqlWrangler.SqlClient .ColorToolStripMenuItem_Click(Object ,EventArgs) |
CompareRowsToolStripMenuItem_Click (Object,EventArgs) | 6 | SqlWrangler.SqlClient .CompareRowsToolStripMenuItem_Click (Object,EventArgs) |
Code Query: Methods removed |
25 methods matched
25 methods | # lines of code (LOC) | Full Name |
---|---|---|
7 | SqliteTools.Table.GenerateImportDataSql (DataTable,DataUpdateMode) | |
5 | SqlWrangler.DataRowComparerViewer .dataGridView1_CellFormatting(Object ,DataGridViewCellFormattingEventArgs) | |
1 | SqlWrangler.DataRowComparerViewer .dataGridView1_RowHeaderMouseClick (Object,DataGridViewCellMouseEventArgs) | |
4 | SqlWrangler.DataRowComparerViewer .setKeyToolStripMenuItem_Click(Object ,EventArgs) | |
16 | SqlWrangler.DataRowComparerViewer .dataGridView1_ColumnHeaderMouseClick (Object,DataGridViewCellMouseEventArgs) | |
4 | SqlWrangler.DataRowComparerViewer .setCheckFieldsToolStripMenuItem_Click (Object,EventArgs) | |
5 | SqlWrangler.DataRowComparerViewer .clearAllCheckFieldsToolStripMenuItem_Cl ick(Object,EventArgs) | |
1 | SqlWrangler.FrmMain .newToolStripMenuItem_Click_1(Object ,EventArgs) | |
4 | SqlWrangler.FrmMain.frmMain_FormClosed (Object,FormClosedEventArgs) | |
0 | SqlWrangler.FrmMain.frmMain_DragDrop (Object,DragEventArgs) | |
0 | SqlWrangler.FrmMain .helpToolStripMenuItem_Click(Object ,EventArgs) | |
1 | SqlWrangler.FrmMain .aboutToolStripMenuItem_Click(Object ,EventArgs) | |
30 | SqlWrangler.SqlClient.BuildSnippetMenu() | |
17 | SqlWrangler.SqlClient.ScintallaStyle() | |
1 | SqlWrangler.SqlClient .executeToolStripMenuItem_Click(Object ,EventArgs) | |
7 | SqlWrangler.SqlClient .toCSVToolStripMenuItem_Click(Object ,EventArgs) | |
4 | SqlWrangler.SqlClient.textBox1_KeyUp_1 (Object,KeyEventArgs) | |
1 | SqlWrangler.SqlClient .toXMLToolStripMenuItem_Click(Object ,EventArgs) | |
4 | SqlWrangler.SqlClient .cancelToolStripMenuItem_Click(Object ,EventArgs) | |
4 | SqlWrangler.SqlClient .toDaveSqlToolStripMenuItem_Click(Object ,EventArgs) | |
0 | SqlWrangler.SqlClient .dataGridView1_DataError(Object ,DataGridViewDataErrorEventArgs) | |
1 | SqlWrangler.SqlClient .toJSONToolStripMenuItem_Click(Object ,EventArgs) | |
15 | SqlWrangler.SqlClient .colorToolStripMenuItem_Click(Object ,EventArgs) | |
14 | SqlWrangler.SqlClient.InsertFields() | |
7 | SqlWrangler.SqlClient .compareRowsToolStripMenuItem_Click (Object,EventArgs) |
Code Query: Methods where code was changed |
25 methods matched
25 methods | # lines of code (LOC) | oldNbLinesOfCode | delta | Full Name |
---|---|---|---|---|
get_ActualName() | 3 | 3 | 0 | SqliteTools.Table.get_ActualName() |
.ctor(String,String) | 3 | 5 | -2 | SqliteTools.Table..ctor(String,String) |
GenerateCreateTableSql(DataTable) | 28 | 28 | 0 | SqliteTools.Table.GenerateCreateTableSql (DataTable) |
GenerateInsertSql(DataRow) | 25 | 25 | 0 | SqliteTools.Table.GenerateInsertSql (DataRow) |
.ctor(DataTable,String) | 14 | 16 | -2 | SqlWrangler.DataRowComparerViewer..ctor (DataTable,String) |
FillGrid() | 17 | 17 | 0 | SqlWrangler.DataRowComparerViewer .FillGrid() |
DisplayDetailForRow(Int32) | 14 | 15 | -1 | SqlWrangler.DataRowComparerViewer .DisplayDetailForRow(Int32) |
ToggleMenuItems() | 24 | 36 | -12 | SqlWrangler.DataRowComparerViewer .ToggleMenuItems() |
InitializeComponent() | 84 | 84 | 0 | SqlWrangler.DataRowComparerViewer .InitializeComponent() |
.ctor(DataTable) | 13 | 13 | 0 | SqlWrangler.FrmExportSql..ctor(DataTable ) |
btnOk_Click(Object,EventArgs) | 19 | 19 | 0 | SqlWrangler.FrmExportSql.btnOk_Click (Object,EventArgs) |
ExportSql(FileInfo,DataTable,String ,String,Boolean,Boolean) | 17 | 17 | 0 | SqlWrangler.FrmExportSql.ExportSql (FileInfo,DataTable,String,String ,Boolean,Boolean) |
button1_Click(Object,EventArgs) | 16 | 16 | 0 | SqlWrangler.FrmLogin.button1_Click (Object,EventArgs) |
button3_Click(Object,EventArgs) | 12 | 12 | 0 | SqlWrangler.FrmLogin.button3_Click (Object,EventArgs) |
.ctor() | 10 | 10 | 0 | SqlWrangler.FrmMain..ctor() |
NewSqlForm() | 2 | 2 | 0 | SqlWrangler.FrmMain.NewSqlForm() |
PersistSnippets() | 6 | 6 | 0 | SqlWrangler.FrmMain.PersistSnippets() |
GetSnippets() | 22 | 22 | 0 | SqlWrangler.FrmMain.GetSnippets() |
InitializeComponent() | 53 | 53 | 0 | SqlWrangler.FrmMain.InitializeComponent( ) |
.ctor(List<TextSnippet>) | 14 | 12 | 2 | SqlWrangler.SqlClient..ctor(List <TextSnippet>) |
Uncheck(Object) | 8 | 9 | -1 | SqlWrangler.SqlClient.Uncheck(Object) |
InitializeComponent() | 220 | 220 | 0 | SqlWrangler.SqlClient .InitializeComponent() |
WriteModelClass(DataTable,StreamWriter ,IEnumerable<FieldDefinition> ,MapperAttributeType) | 25 | 27 | -2 | SqlWrangler.Wizard.WriteModelClass (DataTable,StreamWriter,IEnumerable <FieldDefinition>,MapperAttributeType) |
WriteMaterializer(DataTable,StreamWriter ,IEnumerable<FieldDefinition>) | 27 | 27 | 0 | SqlWrangler.Wizard.WriteMaterializer (DataTable,StreamWriter,IEnumerable <FieldDefinition>) |
GetFields(DataTableReader) | 27 | 28 | -1 | SqlWrangler.Wizard.GetFields (DataTableReader) |
Code Query: Methods directly calling one or several methods changed |
3 methods matched
3 methods | methodsChangedCalled | Full Name |
---|---|---|
CreateSql(DataTable) | 1 method | SqliteTools.Table.CreateSql(DataTable) |
ProcessCmdKey(Message&,Keys) | 1 method | SqlWrangler.FrmMain.ProcessCmdKey (Message&,Keys) |
WriteCsWizard(DataTable,StreamWriter ,String,String) | 3 methods | SqlWrangler.Wizard.WriteCsWizard (DataTable,StreamWriter,String,String) |
Code Query: Methods indirectly calling one or several methods changed |
6 methods matched
6 methods | depthOfUsingMethodsChanged | methodsChangedDirectlyUsed | Full Name |
---|---|---|---|
CreateSql(DataTable) | 1 | 1 method | SqliteTools.Table.CreateSql(DataTable) |
ProcessCmdKey(Message&,Keys) | 1 | 1 method | SqlWrangler.FrmMain.ProcessCmdKey (Message&,Keys) |
WriteCsWizard(DataTable,StreamWriter ,String,String) | 1 | 3 methods | SqlWrangler.Wizard.WriteCsWizard (DataTable,StreamWriter,String,String) |
.ctor() | 2 | no method | SqlWrangler.FrmLogin..ctor() |
WizardToolStripMenuItem1_Click(Object ,EventArgs) | 2 | no method | SqlWrangler.SqlClient .WizardToolStripMenuItem1_Click(Object ,EventArgs) |
Main() | 3 | no method | SqlWrangler.Program.Main() |
Code Query: New fields |
4 fields matched
4 fields | Full Name |
---|---|
SqlLiteTypes | SqliteTools.Table.SqlLiteTypes |
_snippets | SqlWrangler.FrmMain._snippets |
_styler | SqlWrangler.SqlClient._styler |
_menuBuilder | SqlWrangler.SqlClient._menuBuilder |
Code Query: Fields removed |
1 field matched
1 field | Full Name |
---|---|
SqlWrangler.FrmMain.Snippets |
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 |
2 methods matched
2 methods | MethodsCallingMe | Full Name |
---|---|---|
Concat(String,String,String,String) | 2 methods | System.String.Concat(String,String ,String,String) |
Concat(String[]) | 3 methods | System.String.Concat(String[]) |
Code Query: Third party methods that were used and that are not used anymore |
2 methods matched
2 methods | MethodsThatCalledMe | Full Name |
---|---|---|
Format(String,Object,Object,Object) | 3 methods | System.String.Format(String,Object ,Object,Object) |
Format(String,Object[]) | 1 method | System.String.Format(String,Object[]) |
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
Trend Charts
Size
% Coverage and % Debt
Issues
Rules
Quality Gates
Debt
Assemblies Dependencies
Assembly | Depends on | Is referenced by |
---|---|---|
SqliteTools v1.0.0.0 | mscorlib v4.0.0.0 ; System.Data v4.0.0.0 ; System.Core v4.0.0.0 ; | SqlWrangler v1.0.0.0 ; |
SqlWrangler v1.0.0.0 | mscorlib v4.0.0.0 ; System.Data v4.0.0.0 ; System.Drawing v4.0.0.0 ; System v4.0.0.0 ; System.Windows.Forms v4.0.0.0 ; System.Core v4.0.0.0 ; System.Data.DataSetExtensions v4.0.0.0 ; SqliteTools v1.0.0.0 ; NHibernate v4.0.0.4000 ; System.Configuration v4.0.0.0 ; System.Xml v4.0.0.0 ; ScintillaNET v3.5.6.0 ; Newtonsoft.Json v9.0.0.0 ; Oracle.ManagedDataAccess v4.121.2.0 ; | - |
Assemblies Build Order
- SqliteTools
- SqlWrangler
Assemblies Build Order
- SqliteTools
- SqlWrangler
Analysis Log : Information and Warnings
The Warnings can reveal potential flaws concerning the health of the build process.
A particular warn can be disabled through the NDepend interactive UI, panel Error List, tick the checkbox Disabled corresponding to the warn to disable.
Message | |
---|---|
Begin full analysis with NDepend v2019.2.5 | |
Compare with analysis result obtained on 2019 July - 21 Sunday 06:51 (which is the analysis result with date closest to 30 days ago) | |
.NET Assemblies resolved from the Visual Studio solution file {D:\src\SqlWrangler\SqlWrangler\SqlWrangler.sln} D:\src\SqlWrangler\SqlWrangler\SqlWrangler\bin\Debug\SqlWrangler.exe D:\src\SqlWrangler\SqlWrangler\SqliteTools\bin\Debug\SqliteTools.dll | |
No .NET Assembly filtered out from the Visual Studio solution file {D:\src\SqlWrangler\SqlWrangler\SqlWrangler.sln}. | |
Concurrent mode | |
.NET Assemblies loaded from {C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319} System.Core.dll v4.0.0.0 System.Data.DataSetExtensions.dll v4.0.0.0 System.Xml.dll v4.0.0.0 System.Configuration.dll v4.0.0.0 System.Drawing.dll v4.0.0.0 System.dll v4.0.0.0 System.Data.dll v4.0.0.0 System.Windows.Forms.dll v4.0.0.0 mscorlib.dll v4.0.0.0 | |
23 source files parsed ; all source files found ; all source files in-sync with PDB | |
0 code rule has been extracted from code. | |
No dependency cycle detected in assemblies referencement graph. | |
Do merge code generated by compiler into application code. | |
Analyse 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. | |
Execute queries and rules. | |
1 quality gate warns: - 'New Annual Interest since Baseline' value 0.29 man-days greater than warn threshold 0 man-days | |
1 quality gate fails: - 'New Blocker / Critical / High Issues' value 5 issues greater than fail threshold 0 issues | |
NDepend analysis done. Duration: 00:15 | |
Building the report (standard). |
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: