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.
|
Rules summary
78556This section lists all Rules violated, and Rules or Queries with Error- Number of Rules or Queries with Error (syntax error, exception thrown, time-out): 0
- Number of Rules violated: 61
Summary of Rules violated
development-time, from within Visual
Studio. Online documentation.
existing code base? Use the option
Recent Violations Only!
can be used to break the build process if
violated. Online documentation.
Application Statistics
Stat | # Occurences | Avg | StdDev | Max |
---|---|---|---|---|
Properties on interfaces | 9 interfaces | 0.44 | 0.83 | 2 properties on Mathos.Geometry.Shapes.IShape2D |
Methods on interfaces | 9 interfaces | 0.44 | 0.83 | 2 methods on Mathos.Geometry.Shapes.IShape2D |
Arguments on methods on interfaces | 4 methods | 0 | 0 | 0 arguments on Mathos.Geometry.Shapes.IShape2D.get_Area() |
Public properties on classes | 169 Classes | 0.59 | 1.57 | 8 public properties on Mathos.Geometry.Shapes.Triangle |
Public methods on classes | 169 classes | 6.01 | 6.54 | 32 public methods on Mathos.Matrix |
Arguments on public methods on classes | 1,016 methods | 0.86 | 1.01 | 6 arguments on B_Geometry.GeomBox..ctor(Double,Double,Double,Double,Double,Double) |
IL instructions in non-abstract methods | 1,363 methods | 31.29 | 63.78 | 1539 IL instructions in MathosTest.Statistics+Literals..cctor() |
Cyclomatic complexity on non abstract Methods | 1,363 Methods | 2.38 | 3.21 | CC = 75 for Mathos.Geometry.Shapes.Triangle..ctor(Double,Double,Double,Double,Double,Double) |
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Laboratory v1.0.0.0 | 430 | 2473 | 28 | 0 | 1302 | 75 | - | 0 | 94 | 0.11 | 1 | 0 | 0 |
B_Geometry v1.0.0.0 | 668 | 3503 | 15 | 0 | 297 | 30 | - | 0 | 59 | 1.6 | 1 | 0 | 0 |
MathosTest v1.0.0.0 | 1042 | 10587 | 31 | 0 | 231 | 18 | - | 0 | 113 | 0.16 | 1 | 0 | 0 |
RubyInt v1.0.0.0 | 225 | 2076 | 13 | 0 | 105 | 31 | - | 0 | 150 | 1.23 | 1 | 0 | 0 |
ProjectWebsite v1.0.0.0 | 171 | 1904 | 2 | 0 | 95 | 35 | - | 0 | 46 | 1.5 | 1 | 0 | 0 |
Interactive Mathematics v1.0.0.0 | 134 | 1483 | 7 | 0 | 85 | 38 | - | 0 | 68 | 0.86 | 1 | 0 | 0 |
Mathos v1.0.5.1 | 2370 | 20626 | 100 | 9 | 3891 | 62 | - | 50 | 73 | 1.11 | 0.59 | 0.09 | 0.22 |
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 |
---|---|---|---|---|---|---|---|---|---|---|---|
INaturalNumber | 6.63 | - | - | 0 | - | 0 | - | - | 5 | 0 | Mathos.Arithmetic.Numbers |
IShape2D | 3.08 | - | - | 6 | 100 | 0 | - | - | 9 | 1 | Mathos.Geometry.Shapes |
IInteger | 2.58 | - | - | 0 | - | 0 | - | - | 4 | 1 | Mathos.Arithmetic.Numbers |
IShape3D | 2.09 | - | - | 6 | 100 | 0 | - | - | 7 | 1 | Mathos.Geometry.Shapes |
Pythagorean | 2.03 | 6 | 59 | 14 | 70 | 7 | 8 | - | 7 | 7 | Mathos.Geometry |
Check | 1.78 | 17 | 139 | 45 | 72.58 | 11 | 14 | - | 9 | 11 | Mathos.Arithmetic.Numbers |
Get | 1.71 | 70 | 473 | 90 | 56.25 | 29 | 48 | - | 13 | 20 | Mathos.Arithmetic.Numbers |
Finance | 1.61 | 27 | 295 | 71 | 72.45 | 21 | 32 | - | 10 | 14 | Mathos.Finance |
Vector | 1.23 | 84 | 606 | 79 | 48.47 | 44 | 64 | - | 7 | 17 | Mathos |
DoubleArithmetic | 1.18 | 64 | 499 | 119 | 65.03 | 36 | 42 | - | 5 | 6 | Mathos.Arithmetic |
IRationalNumber | 1.15 | - | - | 0 | - | 0 | - | - | 3 | 2 | Mathos.Arithmetic.Numbers |
TolerantUtilities | 1.13 | 6 | 43 | 7 | 53.85 | 5 | 7 | - | 5 | 4 | B_Geometry |
Fraction | 1.13 | 166 | 1500 | 250 | 60.1 | 71 | 95 | - | 7 | 27 | Mathos.Arithmetic.Fractions |
Base | 1.1 | - | - | 0 | - | 0 | - | - | 5 | 4 | Mathos.Converter |
IIRationalNumber | 1.05 | - | - | 0 | - | 0 | - | - | 2 | 0 | Mathos.Arithmetic.Numbers |
IntegralCalculus+IntegrationAlgorithm | 1.04 | - | - | 9 | 100 | 0 | - | - | 5 | 4 | Mathos.Calculus |
StatisticalProcedures | 1 | 112 | 779 | 122 | 52.14 | 53 | 72 | - | 5 | 27 | Mathos.Statistics |
ComplexNumber | 1 | 110 | 770 | 18 | 14.06 | 57 | 68 | - | 5 | 18 | Mathos.Arithmetic.ComplexNumbers |
ComplexArithmetic | 0.96 | 59 | 413 | 73 | 55.3 | 25 | 31 | - | 4 | 11 | Mathos.Arithmetic |
Vector | 0.89 | 83 | 446 | 59 | 41.55 | 28 | 36 | - | 5 | 10 | B_Geometry |
Matrix | 0.82 | 249 | 1764 | 163 | 39.56 | 114 | 169 | - | 4 | 25 | Mathos |
Convert | 0.81 | 6 | 41 | 10 | 62.5 | 4 | 7 | - | 4 | 5 | Mathos.Arithmetic.Numbers |
PhysicalConstants+SI | 0.81 | 0 | 0 | 24 | 100 | 0 | 0 | - | 1 | 2 | Mathos.Arithmetic |
ConversionInfo | 0.79 | 3 | 12 | 11 | 78.57 | 1 | 1 | - | 4 | 4 | Mathos.Converter |
Circle | 0.75 | 26 | 226 | 42 | 61.76 | 25 | 32 | - | 3 | 7 | Mathos.Geometry.Shapes |
Square | 0.75 | 24 | 204 | 38 | 61.29 | 22 | 28 | - | 3 | 8 | Mathos.Geometry.Shapes |
DiceSimulator | 0.7 | 40 | 248 | 28 | 41.18 | 13 | 18 | - | 2 | 13 | Mathos.Statistics |
LinearModels+LinearRegressionResults | 0.68 | 13 | 82 | 28 | 68.29 | 5 | 6 | - | 3 | 9 | Mathos.Statistics |
MainWindow | 0.67 | 122 | 960 | 16 | 11.59 | 43 | 78 | - | 5 | 99 | RubyInt |
IntegerArithmetic | 0.65 | 37 | 237 | 40 | 51.95 | 20 | 27 | - | 1 | 12 | Mathos.Arithmetic |
Elementary | 0.64 | 46 | 276 | 64 | 58.18 | 21 | 27 | - | 2 | 11 | Mathos.Calculus |
IntegralCalculus | 0.64 | 28 | 179 | 14 | 33.33 | 9 | 14 | - | 4 | 6 | Mathos.Calculus |
FiniteCalculus | 0.59 | 93 | 716 | 53 | 36.3 | 44 | 69 | - | 3 | 15 | Mathos.Calculus |
MathematicalConstants+Single | 0.55 | 0 | 0 | 9 | 100 | 0 | 0 | - | 1 | 2 | Mathos.Arithmetic |
SingleArithmetic | 0.55 | 65 | 501 | 119 | 64.67 | 34 | 43 | - | 1 | 7 | Mathos.Arithmetic |
Antiderivatives | 0.55 | 4 | 42 | 16 | 80 | 4 | 5 | - | 1 | 11 | Mathos.SpecialFunctions |
LinearModels | 0.54 | 24 | 152 | 10 | 29.41 | 4 | 6 | - | 2 | 16 | Mathos.Statistics |
ConversionBase | 0.52 | 3 | 12 | 11 | 78.57 | 1 | 1 | - | 4 | 4 | Mathos.Converter |
Rectangle | 0.52 | 27 | 295 | 42 | 60.87 | 32 | 43 | - | 2 | 8 | Mathos.Geometry.Shapes |
BGeomMatrix | 0.52 | 96 | 491 | 6 | 5.88 | 29 | 41 | - | 3 | 11 | B_Geometry |
DecimalArithmetic | 0.51 | 22 | 151 | 44 | 66.67 | 12 | 20 | - | 2 | 5 | Mathos.Arithmetic |
BasisFunction | 0.5 | 98 | 523 | 61 | 38.36 | 20 | 31 | - | 3 | 8 | B_Geometry |
ComplexOperation | 0.5 | 29 | 223 | 69 | 70.41 | 15 | 19 | - | 2 | 11 | Mathos.Arithmetic.ComplexNumbers |
BenchmarkUtil | 0.5 | 15 | 64 | 6 | 28.57 | 3 | 6 | - | 3 | 10 | Mathos.Testing |
IntegralApproximation | 0.49 | 88 | 461 | 123 | 58.29 | 17 | 22 | - | 1 | 28 | Laboratory.Module |
SingleArithmetic+FloatIntUnion | 0.48 | 0 | 0 | 0 | - | 0 | 0 | - | 1 | 4 | Mathos.Arithmetic |
IRealNumber | 0.48 | - | - | 0 | - | 0 | - | - | 1 | 4 | Mathos.Arithmetic.Numbers |
IImaginary | 0.48 | - | - | 0 | - | 0 | - | - | 1 | 0 | Mathos.Arithmetic.Numbers |
Extension | 0.47 | 33 | 268 | 5 | 13.16 | 20 | 24 | - | 2 | 36 | RubyInt |
RightTriangle | 0.46 | 26 | 286 | 39 | 60 | 31 | 42 | - | 2 | 8 | Mathos.Geometry.Shapes |
Converter | 0.45 | 43 | 749 | 56 | 56.57 | 22 | 28 | - | 3 | 30 | Mathos.Converter |
EquationSolver | 0.44 | 13 | 216 | 41 | 75.93 | 4 | 4 | - | 2 | 13 | Mathos |
ArithmeticProgression | 0.43 | 11 | 83 | 20 | 64.52 | 8 | 8 | - | 1 | 4 | Mathos.PreCalculus.Sequences |
GeometricProgression | 0.43 | 15 | 124 | 24 | 61.54 | 11 | 13 | - | 1 | 8 | Mathos.PreCalculus.Sequences |
Fibonacci | 0.43 | 41 | 271 | 28 | 40.58 | 18 | 22 | - | 1 | 7 | Mathos.PreCalculus.Sequences |
Coordinate | 0.42 | 30 | 287 | 56 | 65.12 | 20 | 24 | - | 2 | 13 | Mathos.Geometry.CoordinateGeometry .TwoDimensional |
Get+<>c__DisplayClass7 | 0.41 | 1 | 10 | - | - | - | 2 | - | 2 | 6 | Mathos.Arithmetic.Numbers |
SyntaxExtension | 0.41 | 27 | 217 | 150 | 84.75 | 27 | 27 | - | 2 | 8 | Mathos.Syntax |
Triangle | 0.4 | 93 | 1483 | 94 | 50.27 | 127 | 129 | - | 2 | 11 | Mathos.Geometry.Shapes |
Finance+<>c__DisplayClass2 | 0.38 | 2 | 32 | - | - | - | 5 | - | 1 | 8 | Mathos.Finance |
InvalidTriangleException | 0.35 | 4 | 29 | 17 | 80.95 | 4 | 4 | - | 1 | 6 | Mathos.Exceptions |
DifferentialCalculus | 0.35 | 11 | 173 | 28 | 71.79 | 4 | 4 | - | 2 | 9 | Mathos.Calculus |
UncertainNumber | 0.35 | 112 | 1085 | 166 | 59.71 | 60 | 82 | - | 2 | 32 | Mathos.Statistics |
BCurve | 0.34 | 41 | 191 | 9 | 18 | 10 | 11 | - | 2 | 13 | B_Geometry |
LinearAlgebra | 0.34 | 45 | 245 | 17 | 27.42 | 8 | 15 | - | 2 | 12 | B_Geometry |
BinomialDistribution | 0.33 | 24 | 207 | 51 | 68 | 11 | 14 | - | 1 | 9 | Mathos.Statistics |
HypergeometricDistribution | 0.33 | 12 | 117 | 29 | 70.73 | 7 | 8 | - | 1 | 9 | Mathos.Statistics |
PoissonDistribution | 0.33 | 20 | 158 | 43 | 68.25 | 11 | 14 | - | 1 | 10 | Mathos.Statistics |
InvalidCoordinateFormat | 0.32 | 4 | 29 | 17 | 80.95 | 4 | 4 | - | 1 | 6 | Mathos.Exceptions |
Get+<Factors>d__9 | 0.32 | 14 | 244 | - | - | - | 37 | - | 1 | 22 | Mathos.Arithmetic.Numbers |
Get+<CustomList>d__0 | 0.32 | 5 | 142 | - | - | - | 22 | - | 1 | 15 | Mathos.Arithmetic.Numbers |
Statistics+Literals | 0.3 | 7 | 1542 | 0 | 0 | 1 | 2 | - | 1 | 7 | MathosTest |
ComplexArithmeticTest+<>c__DisplayClass2 | 0.3 | 2 | 17 | - | - | - | 3 | - | 1 | 7 | MathosTest.Mathos_Main.Arithmetic |
Program | 0.3 | 14 | 79 | 3 | 17.65 | 3 | 5 | - | 1 | 16 | B_Geometry.New |
LinearModels+<>c__DisplayClass1 | 0.29 | 1 | 14 | - | - | - | 2 | - | 1 | 4 | Mathos.Statistics |
Calculate | 0.29 | 16 | 171 | 24 | 60 | 8 | 10 | - | 1 | 16 | Mathos.Geometry.CoordinateGeometry .TwoDimensional |
FrmTable | 0.29 | 5 | 56 | 0 | 0 | 1 | 8 | - | 2 | 18 | Interactive_Mathematics |
DiceSimulatorTest+<>c__DisplayClass1 | 0.28 | 1 | 8 | - | - | - | 2 | - | 1 | 5 | MathosTest |
Program+<>c__DisplayClass5 | 0.28 | 8 | 48 | - | - | - | 4 | - | 1 | 14 | B_Geometry.New |
Temperature | 0.28 | - | - | 9 | 100 | 0 | - | - | 2 | 4 | Mathos.Converter |
GammaRelated | 0.27 | 26 | 196 | 26 | 50 | 12 | 18 | - | 1 | 11 | Mathos.SpecialFunctions |
Resources | 0.27 | 8 | 49 | 14 | 63.64 | 6 | 6 | - | 1 | 13 | MathosTest.Properties |
Cube | 0.26 | 26 | 211 | 39 | 60 | 20 | 24 | - | 1 | 8 | Mathos.Geometry.Shapes |
RightCircularCone | 0.26 | 31 | 312 | 47 | 60.26 | 33 | 43 | - | 1 | 9 | Mathos.Geometry.Shapes |
SquarePyramid | 0.26 | 29 | 296 | 44 | 60.27 | 31 | 41 | - | 1 | 9 | Mathos.Geometry.Shapes |
RightCircularCylinder | 0.26 | 31 | 303 | 47 | 60.26 | 33 | 43 | - | 1 | 8 | Mathos.Geometry.Shapes |
RectangularPrism | 0.26 | 31 | 318 | 48 | 60.76 | 33 | 43 | - | 1 | 8 | Mathos.Geometry.Shapes |
Trapezoid | 0.26 | 39 | 443 | 56 | 58.95 | 52 | 66 | - | 1 | 7 | Mathos.Geometry.Shapes |
Parallelogram | 0.26 | 26 | 285 | 39 | 60 | 31 | 42 | - | 1 | 7 | Mathos.Geometry.Shapes |
Sphere | 0.26 | 23 | 198 | 35 | 60.34 | 21 | 27 | - | 1 | 7 | Mathos.Geometry.Shapes |
MainWindow | 0.26 | 99 | 1122 | 13 | 11.61 | 45 | 92 | - | 1 | 64 | Interactive_Mathematics |
DenominatorNullException | 0.25 | 4 | 29 | 18 | 81.82 | 4 | 4 | - | 1 | 6 | Mathos.Exceptions |
InvalidFractionFormatException | 0.25 | 4 | 29 | 17 | 80.95 | 4 | 4 | - | 1 | 6 | Mathos.Exceptions |
Matrix+<>c__DisplayClass2 | 0.25 | 1 | 22 | - | - | - | 4 | - | 1 | 8 | Mathos |
StatisticalProcedures+<>c__DisplayClass1 | 0.25 | 1 | 16 | - | - | - | 2 | - | 1 | 4 | Mathos.Statistics |
IntegralApproximation+<>c__DisplayClass1 | 0.23 | 1 | 10 | - | - | - | 2 | - | 1 | 6 | Laboratory.Module |
_Default | 0.23 | 87 | 844 | 71 | 44.94 | 34 | 62 | - | 1 | 39 | ProjectWebsite |
TemperatureConversion | 0.22 | 13 | 172 | 8 | 38.1 | 13 | 21 | - | 1 | 6 | Mathos.Converter |
UncertainNumber+UncertaintyType | 0.22 | - | - | 6 | 100 | 0 | - | - | 1 | 4 | Mathos.Statistics |
UncertainNumber+<>c__DisplayClass1 | 0.22 | 1 | 14 | - | - | - | 2 | - | 1 | 6 | Mathos.Statistics |
UncertainNumber+<>c__DisplayClass6 | 0.22 | 1 | 14 | - | - | - | 2 | - | 1 | 6 | Mathos.Statistics |
Extension+<>c__DisplayClass1 | 0.21 | 1 | 14 | - | - | - | 2 | - | 1 | 7 | RubyInt |
Pressure | 0.21 | - | - | 26 | 100 | 0 | - | - | 1 | 4 | Mathos.Converter |
Angle | 0.21 | - | - | 9 | 100 | 0 | - | - | 1 | 4 | Mathos.Converter |
Power | 0.21 | - | - | 36 | 100 | 0 | - | - | 1 | 4 | Mathos.Converter |
Mass | 0.21 | - | - | 18 | 100 | 0 | - | - | 1 | 4 | Mathos.Converter |
Length | 0.21 | - | - | 18 | 100 | 0 | - | - | 1 | 4 | Mathos.Converter |
Speed | 0.21 | - | - | 14 | 100 | 0 | - | - | 1 | 4 | Mathos.Converter |
Volume | 0.21 | - | - | 54 | 100 | 0 | - | - | 1 | 4 | Mathos.Converter |
Area | 0.21 | - | - | 24 | 100 | 0 | - | - | 1 | 4 | Mathos.Converter |
_Default+<>c__DisplayClass1f | 0.2 | 84 | 1060 | - | - | - | 56 | - | 1 | 26 | ProjectWebsite |
GeomUtils | 0.19 | 85 | 430 | 31 | 26.72 | 20 | 30 | - | 1 | 14 | B_Geometry |
MainWindow+<dataGrid1_MouseDoubleClick >o__SiteContainer1b | 0.18 | 0 | 0 | - | - | - | 0 | - | 1 | 8 | Interactive_Mathematics |
MainWindow+<>c__DisplayClass19 | 0.18 | 20 | 230 | - | - | - | 10 | - | 1 | 19 | Interactive_Mathematics |
ResultsWindow | 0.17 | 3 | 47 | 0 | 0 | 1 | 8 | - | 1 | 14 | RubyInt |
DataViewWindow | 0.17 | 16 | 208 | 0 | 0 | 6 | 21 | - | 1 | 32 | RubyInt |
MainWindow+<>c__DisplayClass6 | 0.17 | 3 | 24 | - | - | - | 2 | - | 1 | 11 | RubyInt |
MainWindow+<DoError>d__8 | 0.17 | 1 | 91 | - | - | - | 10 | - | 1 | 18 | RubyInt |
MainWindow+<About_Executed>d__e | 0.17 | 1 | 85 | - | - | - | 10 | - | 1 | 19 | RubyInt |
MyCompletionData | 0.17 | 7 | 73 | 1 | 12.5 | 5 | 11 | - | 1 | 11 | RubyInt |
HelpWindow | 0.17 | 24 | 211 | 13 | 35.14 | 9 | 21 | - | 1 | 37 | RubyInt |
FinancePresentValue | 0.15 | 12 | 65 | 49 | 80.33 | 7 | 8 | - | 0 | 16 | Laboratory.Module.Finance |
FinanceNetPresentValue | 0.15 | 18 | 101 | 49 | 73.13 | 8 | 10 | - | 0 | 22 | Laboratory.Module.Finance |
FinanceFutureValueOfAnAnnuity | 0.15 | 12 | 65 | 49 | 80.33 | 7 | 8 | - | 0 | 16 | Laboratory.Module.Finance |
FinanceFutureValue | 0.15 | 12 | 65 | 49 | 80.33 | 7 | 8 | - | 0 | 16 | Laboratory.Module.Finance |
Torus | 0.15 | 10 | 100 | 22 | 68.75 | 12 | 16 | - | 0 | 5 | Mathos.Geometry.Shapes |
DiscreteMathematics | 0.15 | 38 | 350 | 6 | 13.64 | 13 | 27 | - | 0 | 29 | MathosTest |
FinanceAnnuityPaymentFutureValue | 0.15 | 12 | 65 | 49 | 80.33 | 7 | 8 | - | 0 | 16 | Laboratory.Module.Finance |
ChangePassword | 0.15 | 0 | 4 | 7 | 100 | 1 | 2 | - | 0 | 5 | Laboratory.Account |
ChangePasswordSuccess | 0.15 | 0 | 4 | 0 | - | 1 | 2 | - | 0 | 4 | Laboratory.Account |
Login | 0.15 | 1 | 15 | 14 | 93.33 | 1 | 2 | - | 0 | 10 | Laboratory.Account |
NumberList | 0.15 | 2 | 14 | 4 | 66.67 | 2 | 2 | - | 0 | 4 | Mathos.Statistics |
Register | 0.15 | 6 | 31 | 15 | 71.43 | 3 | 4 | - | 0 | 12 | Laboratory.Account |
Default | 0.15 | 0 | 4 | 7 | 100 | 1 | 2 | - | 0 | 5 | Laboratory |
Global | 0.15 | 0 | 8 | 8 | 100 | 5 | 6 | - | 0 | 5 | Laboratory |
Modules | 0.15 | 0 | 4 | 7 | 100 | 1 | 2 | - | 0 | 5 | Laboratory |
Converter | 0.15 | 75 | 409 | 64 | 46.04 | 30 | 35 | - | 0 | 36 | Laboratory.Module |
LinearRegression | 0.15 | 17 | 114 | 63 | 78.75 | 5 | 6 | - | 0 | 19 | Laboratory.Module.DataAnalysis |
WebForm1 | 0.15 | 24 | 124 | 28 | 53.85 | 9 | 12 | - | 0 | 16 | Laboratory.Module.DataAnalysis |
EquationSolver | 0.15 | 35 | 221 | 119 | 77.27 | 15 | 16 | - | 0 | 18 | Laboratory.Module |
Elliptic | 0.15 | 9 | 27 | 65 | 87.84 | 9 | 9 | - | 0 | 5 | Mathos.SpecialFunctions |
Bessel | 0.15 | 9 | 27 | 66 | 88 | 9 | 9 | - | 0 | 5 | Mathos.SpecialFunctions |
Factorial | 0.15 | 9 | 52 | 35 | 79.55 | 4 | 6 | - | 0 | 16 | Laboratory.Module |
FinanceAnnuityPaymentPresentValue | 0.15 | 12 | 65 | 49 | 80.33 | 7 | 8 | - | 0 | 16 | Laboratory.Module.Finance |
Ring | 0.15 | 15 | 149 | 29 | 65.91 | 19 | 25 | - | 0 | 4 | Mathos.Geometry.Shapes |
SiteMaster | 0.15 | 0 | 4 | 21 | 100 | 1 | 2 | - | 0 | 6 | Laboratory |
FinancePresentValueOfAnAnnuity | 0.15 | 12 | 65 | 49 | 80.33 | 7 | 8 | - | 0 | 16 | Laboratory.Module.Finance |
Settings | 0.15 | 2 | 14 | 0 | 0 | 2 | 3 | - | 0 | 6 | Interactive_Mathematics.Properties |
Resources | 0.15 | 7 | 40 | 7 | 50 | 5 | 5 | - | 0 | 13 | Interactive_Mathematics.Properties |
App | 0.15 | 1 | 21 | 0 | 0 | 0 | 3 | - | 0 | 9 | Interactive_Mathematics |
Settings | 0.15 | 2 | 14 | 0 | 0 | 2 | 3 | - | 0 | 6 | RubyInt.Properties |
Resources | 0.15 | 7 | 40 | 7 | 50 | 5 | 5 | - | 0 | 13 | RubyInt.Properties |
UnitTest1 | 0.15 | 2 | 22 | 0 | 0 | 2 | 3 | - | 0 | 5 | MathosTest.SpecialFunctions |
DiceSimulatorTest | 0.15 | 12 | 94 | 1 | 7.69 | 2 | 3 | - | 0 | 15 | MathosTest |
App | 0.15 | 5 | 41 | 0 | 0 | 0 | 5 | - | 0 | 11 | RubyInt |
Statistics | 0.15 | 57 | 467 | 0 | 0 | 22 | 27 | - | 0 | 13 | MathosTest |
TestOfFractions | 0.15 | 75 | 550 | 16 | 17.58 | 23 | 25 | - | 0 | 14 | MathosTest |
VectorsAndMatrices | 0.15 | 166 | 2436 | 1 | 0.6 | 34 | 31 | - | 0 | 13 | MathosTest |
Uncertainty | 0.15 | 52 | 428 | 3 | 5.45 | 17 | 27 | - | 0 | 16 | MathosTest.Uncertainty |
ConverterTest | 0.15 | 48 | 348 | 3 | 5.88 | 12 | 13 | - | 0 | 12 | MathosTest |
Shapes | 0.15 | 98 | 500 | 10 | 9.26 | 13 | 14 | - | 0 | 18 | MathosTest |
PythagoreanTest | 0.15 | 23 | 109 | 7 | 23.33 | 9 | 10 | - | 0 | 6 | MathosTest |
SyntaxTest | 0.15 | 12 | 70 | 9 | 42.86 | 3 | 7 | - | 0 | 17 | MathosTest.Mathos_Main |
LinearModelsTest | 0.15 | 10 | 201 | - | - | - | 3 | - | 0 | 7 | MathosTest |
StatisticalDistributions | 0.15 | 20 | 287 | 0 | 0 | 20 | 21 | - | 0 | 11 | MathosTest.Mathos_Main |
FinanceTest | 0.15 | 17 | 184 | 2 | 10.53 | 8 | 9 | - | 0 | 9 | MathosTest |
EquationSolverTest | 0.15 | 10 | 99 | 4 | 28.57 | 3 | 4 | - | 0 | 11 | MathosTest |
coordinateStruct | 0.15 | 28 | 210 | 17 | 37.78 | 6 | 9 | - | 0 | 14 | MathosTest |
GammaTests | 0.15 | 14 | 128 | 5 | 26.32 | 8 | 10 | - | 0 | 16 | MathosTest.Mathos_Main.SpecialFunctions |
ElementaryTests | 0.15 | 24 | 189 | 9 | 27.27 | 7 | 9 | - | 0 | 7 | MathosTest.Mathos_Main.SpecialFunctions |
PreCalculus | 0.15 | 9 | 45 | 0 | 0 | 3 | 4 | - | 0 | 7 | MathosTest |
FiniteCalculusTest | 0.15 | 38 | 283 | 3 | 7.32 | 8 | 9 | - | 0 | 11 | MathosTest.Mathos_Main.Calculus |
FinanceRemainingBalanceOfAnnuity | 0.15 | 14 | 77 | 56 | 80 | 8 | 9 | - | 0 | 16 | Laboratory.Module.Finance |
MConverter | 0.15 | 1 | 25 | 14 | 93.33 | 4 | 3 | - | 0 | 8 | Laboratory.Module |
NumberChecker | 0.15 | 25 | 127 | 42 | 62.69 | 13 | 14 | - | 0 | 18 | Laboratory.Module |
AngleConversionM | 0.15 | 30 | 207 | 17 | 36.17 | 11 | 14 | - | 0 | 8 | Mathos.Converter |
Triangle | 0.15 | 16 | 122 | 63 | 79.75 | 6 | 7 | - | 0 | 14 | Laboratory.Module |
Uncertainty | 0.15 | 28 | 162 | 49 | 63.64 | 13 | 14 | - | 0 | 27 | Laboratory.Module |
Form1 | 0.15 | 170 | 908 | 36 | 17.48 | 20 | 23 | - | 0 | 46 | B_Geometry |
GeomBox | 0.15 | 13 | 42 | 0 | 0 | 1 | 1 | - | 0 | 3 | B_Geometry |
GeometryVisUtils | 0.15 | 0 | 3 | 0 | - | 0 | 1 | - | 0 | 2 | B_Geometry |
PhysicalConstants | 0.15 | 0 | 0 | 6 | 100 | 0 | 0 | - | 0 | 3 | Mathos.Arithmetic |
Ellipse | 0.15 | 14 | 159 | 34 | 70.83 | 16 | 20 | - | 0 | 5 | Mathos.Geometry.Shapes |
IComplex | 0.15 | - | - | 0 | - | 0 | - | - | 0 | 6 | Mathos.Arithmetic.Numbers |
Resources | 0.15 | 7 | 40 | 7 | 50 | 5 | 5 | - | 0 | 13 | B_Geometry.Properties |
Settings | 0.15 | 2 | 14 | 0 | 0 | 2 | 3 | - | 0 | 6 | B_Geometry.Properties |
ComplexArithmeticTest | 0.15 | 50 | 381 | 0 | 0 | 9 | 12 | - | 0 | 13 | MathosTest.Mathos_Main.Arithmetic |
MathematicalConstants | 0.15 | 0 | 0 | 70 | 100 | 0 | 0 | - | 0 | 5 | Mathos.Arithmetic |
TestofcomplexNumbers | 0.15 | 96 | 615 | 44 | 31.43 | 17 | 19 | - | 0 | 11 | MathosTest |
DoubleArthimeticTest | 0.15 | 90 | 535 | 6 | 6.25 | 15 | 22 | - | 0 | 11 | MathosTest.Mathos_Main.Arithmetic |
IntegerArthimeticTest | 0.15 | 2 | 15 | 13 | 86.67 | 1 | 2 | - | 0 | 4 | MathosTest.Mathos_Main.Arithmetic |
SingleArthimeticTest | 0.15 | 4 | 23 | 0 | 0 | 2 | 2 | - | 0 | 5 | MathosTest.Mathos_Main.Arithmetic |
DecimalArithmetic | 0.15 | 2 | 19 | 1 | 33.33 | 1 | 2 | - | 0 | 7 | MathosTest.Mathos_Main.Arithmetic |
CalculusTest | 0.15 | 27 | 383 | 24 | 47.06 | 20 | 32 | - | 0 | 15 | MathosTest.Calculus |
Program | 0.15 | 0 | 0 | 10 | 100 | 0 | 0 | - | 0 | 1 | B_Geometry |
About | 0.15 | 0 | 4 | 0 | - | 1 | 2 | - | 0 | 4 | Laboratory |
Types Metrics : Code Members and Inheritance
Type Name | # Instance Methods | Nb Static Methods | Nb Properties | # Fields | # Children Classes | Depth Of Inheritance Tree | Type Namespace |
---|---|---|---|---|---|---|---|
INaturalNumber | 0 | 0 | 0 | 0 | - | - | Mathos.Arithmetic.Numbers |
IShape2D | 2 | 0 | 2 | 0 | - | - | Mathos.Geometry.Shapes |
IInteger | 0 | 0 | 0 | 0 | - | - | Mathos.Arithmetic.Numbers |
IShape3D | 2 | 0 | 2 | 0 | - | - | Mathos.Geometry.Shapes |
Pythagorean | 0 | 2 | 0 | 0 | 0 | 1 | Mathos.Geometry |
Check | 1 | 7 | 0 | 0 | 0 | 1 | Mathos.Arithmetic.Numbers |
Get | 1 | 14 | 0 | 2 | 0 | 1 | Mathos.Arithmetic.Numbers |
Finance | 0 | 9 | 0 | 0 | 0 | 1 | Mathos.Finance |
Vector | 10 | 17 | 1 | 6 | 0 | 1 | Mathos |
DoubleArithmetic | 0 | 20 | 0 | 0 | 0 | 1 | Mathos.Arithmetic |
IRationalNumber | 0 | 0 | 0 | 0 | - | - | Mathos.Arithmetic.Numbers |
TolerantUtilities | 2 | 1 | 0 | 1 | 0 | 1 | B_Geometry |
Fraction | 18 | 19 | 2 | 2 | - | - | Mathos.Arithmetic.Fractions |
Base | - | - | - | - | - | - | Mathos.Converter |
IIRationalNumber | 0 | 0 | 0 | 0 | - | - | Mathos.Arithmetic.Numbers |
IntegralCalculus+IntegrationAlgorithm | - | - | - | - | - | - | Mathos.Calculus |
StatisticalProcedures | 0 | 26 | 0 | 3 | 0 | 1 | Mathos.Statistics |
ComplexNumber | 20 | 16 | 9 | 2 | - | - | Mathos.Arithmetic.ComplexNumbers |
ComplexArithmetic | 0 | 12 | 0 | 0 | 0 | 1 | Mathos.Arithmetic |
Vector | 11 | 4 | 1 | 3 | 0 | 1 | B_Geometry |
Matrix | 19 | 24 | 1 | 7 | 0 | 1 | Mathos |
Convert | 1 | 2 | 0 | 0 | 0 | 1 | Mathos.Arithmetic.Numbers |
PhysicalConstants+SI | 0 | 0 | 0 | 8 | 0 | 1 | Mathos.Arithmetic |
ConversionInfo | 1 | 0 | 0 | 2 | 0 | 1 | Mathos.Converter |
Circle | 12 | 2 | 5 | 1 | 0 | 1 | Mathos.Geometry.Shapes |
Square | 10 | 2 | 4 | 1 | 0 | 1 | Mathos.Geometry.Shapes |
DiceSimulator | 7 | 0 | 0 | 4 | 0 | 1 | Mathos.Statistics |
LinearModels+LinearRegressionResults | 4 | 0 | 0 | 4 | 0 | 1 | Mathos.Statistics |
MainWindow | 20 | 1 | 0 | 19 | 0 | 2 | RubyInt |
IntegerArithmetic | 0 | 7 | 0 | 0 | 0 | 1 | Mathos.Arithmetic |
Elementary | 0 | 11 | 0 | 0 | 0 | 1 | Mathos.Calculus |
IntegralCalculus | 0 | 1 | 0 | 0 | 0 | 1 | Mathos.Calculus |
FiniteCalculus | 0 | 9 | 0 | 0 | 0 | 1 | Mathos.Calculus |
MathematicalConstants+Single | 0 | 0 | 0 | 3 | 0 | 1 | Mathos.Arithmetic |
SingleArithmetic | 0 | 21 | 0 | 0 | 0 | 1 | Mathos.Arithmetic |
Antiderivatives | 0 | 4 | 0 | 1 | 0 | 1 | Mathos.SpecialFunctions |
LinearModels | 0 | 1 | 0 | 0 | 0 | 1 | Mathos.Statistics |
ConversionBase | 1 | 0 | 0 | 2 | 0 | 1 | Mathos.Converter |
Rectangle | 12 | 2 | 5 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
BGeomMatrix | 16 | 0 | 0 | 3 | 0 | 1 | B_Geometry |
DecimalArithmetic | 0 | 2 | 0 | 0 | 0 | 1 | Mathos.Arithmetic |
BasisFunction | 7 | 0 | 0 | 7 | 0 | 1 | B_Geometry |
ComplexOperation | 0 | 11 | 0 | 0 | 0 | 1 | Mathos.Arithmetic.ComplexNumbers |
BenchmarkUtil | 1 | 1 | 0 | 0 | 0 | 1 | Mathos.Testing |
IntegralApproximation | 10 | 0 | 0 | 17 | 0 | 4 | Laboratory.Module |
SingleArithmetic+FloatIntUnion | 0 | 0 | 0 | 2 | - | - | Mathos.Arithmetic |
IRealNumber | 0 | 0 | 0 | 0 | - | - | Mathos.Arithmetic.Numbers |
IImaginary | 0 | 0 | 0 | 0 | - | - | Mathos.Arithmetic.Numbers |
Extension | 13 | 0 | 0 | 1 | 0 | 1 | RubyInt |
RightTriangle | 11 | 2 | 4 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
Converter | 0 | 10 | 0 | 2 | 0 | 1 | Mathos.Converter |
EquationSolver | 0 | 4 | 0 | 0 | 0 | 1 | Mathos |
ArithmeticProgression | 8 | 0 | 2 | 2 | 0 | 1 | Mathos.PreCalculus.Sequences |
GeometricProgression | 9 | 0 | 2 | 2 | 0 | 1 | Mathos.PreCalculus.Sequences |
Fibonacci | 7 | 4 | 2 | 2 | 0 | 1 | Mathos.PreCalculus.Sequences |
Coordinate | 10 | 3 | 2 | 2 | - | - | Mathos.Geometry.CoordinateGeometry .TwoDimensional |
Get+<>c__DisplayClass7 | 2 | 0 | 0 | 1 | 0 | 1 | Mathos.Arithmetic.Numbers |
SyntaxExtension | 0 | 27 | 0 | 0 | 0 | 1 | Mathos.Syntax |
Triangle | 22 | 3 | 8 | 6 | 0 | 1 | Mathos.Geometry.Shapes |
Finance+<>c__DisplayClass2 | 3 | 0 | 0 | 2 | 0 | 1 | Mathos.Finance |
InvalidTriangleException | 4 | 0 | 0 | 0 | 0 | 2 | Mathos.Exceptions |
DifferentialCalculus | 0 | 4 | 0 | 0 | 0 | 1 | Mathos.Calculus |
UncertainNumber | 15 | 18 | 1 | 3 | 0 | 1 | Mathos.Statistics |
BCurve | 5 | 0 | 0 | 4 | 0 | 1 | B_Geometry |
LinearAlgebra | 1 | 1 | 0 | 0 | 0 | 1 | B_Geometry |
BinomialDistribution | 0 | 8 | 0 | 0 | 0 | 1 | Mathos.Statistics |
HypergeometricDistribution | 0 | 4 | 0 | 0 | 0 | 1 | Mathos.Statistics |
PoissonDistribution | 0 | 8 | 0 | 0 | 0 | 1 | Mathos.Statistics |
InvalidCoordinateFormat | 4 | 0 | 0 | 0 | 0 | 2 | Mathos.Exceptions |
Get+<Factors>d__9 | 9 | 0 | 0 | 10 | 0 | 1 | Mathos.Arithmetic.Numbers |
Get+<CustomList>d__0 | 8 | 0 | 0 | 10 | 0 | 1 | Mathos.Arithmetic.Numbers |
Statistics+Literals | 1 | 1 | 0 | 7 | 0 | 1 | MathosTest |
ComplexArithmeticTest+<>c__DisplayClass2 | 3 | 0 | 0 | 1 | 0 | 1 | MathosTest.Mathos_Main.Arithmetic |
Program | 1 | 3 | 0 | 1 | 0 | 1 | B_Geometry.New |
LinearModels+<>c__DisplayClass1 | 2 | 0 | 0 | 2 | 0 | 1 | Mathos.Statistics |
Calculate | 1 | 4 | 0 | 0 | 0 | 1 | Mathos.Geometry.CoordinateGeometry .TwoDimensional |
FrmTable | 3 | 0 | 0 | 3 | 0 | 1 | Interactive_Mathematics |
DiceSimulatorTest+<>c__DisplayClass1 | 2 | 0 | 0 | 1 | 0 | 1 | MathosTest |
Program+<>c__DisplayClass5 | 4 | 0 | 0 | 1 | 0 | 1 | B_Geometry.New |
Temperature | - | - | - | - | - | - | Mathos.Converter |
GammaRelated | 0 | 5 | 0 | 7 | 0 | 1 | Mathos.SpecialFunctions |
Resources | 1 | 4 | 3 | 2 | 0 | 1 | MathosTest.Properties |
Cube | 10 | 2 | 3 | 1 | 0 | 1 | Mathos.Geometry.Shapes |
RightCircularCone | 14 | 2 | 5 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
SquarePyramid | 12 | 2 | 4 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
RightCircularCylinder | 14 | 2 | 5 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
RectangularPrism | 14 | 2 | 5 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
Trapezoid | 18 | 2 | 7 | 5 | 0 | 1 | Mathos.Geometry.Shapes |
Parallelogram | 11 | 2 | 4 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
Sphere | 9 | 2 | 3 | 1 | 0 | 1 | Mathos.Geometry.Shapes |
MainWindow | 7 | 12 | 0 | 19 | 0 | 1 | Interactive_Mathematics |
DenominatorNullException | 4 | 0 | 0 | 0 | 0 | 2 | Mathos.Exceptions |
InvalidFractionFormatException | 4 | 0 | 0 | 0 | 0 | 2 | Mathos.Exceptions |
Matrix+<>c__DisplayClass2 | 2 | 0 | 0 | 1 | 0 | 1 | Mathos |
StatisticalProcedures+<>c__DisplayClass1 | 2 | 0 | 0 | 1 | 0 | 1 | Mathos.Statistics |
IntegralApproximation+<>c__DisplayClass1 | 2 | 0 | 0 | 2 | 0 | 1 | Laboratory.Module |
_Default | 2 | 12 | 0 | 15 | 0 | 4 | ProjectWebsite |
TemperatureConversion | 1 | 1 | 0 | 0 | 0 | 1 | Mathos.Converter |
UncertainNumber+UncertaintyType | - | - | - | - | - | - | Mathos.Statistics |
UncertainNumber+<>c__DisplayClass1 | 2 | 0 | 0 | 1 | 0 | 1 | Mathos.Statistics |
UncertainNumber+<>c__DisplayClass6 | 2 | 0 | 0 | 1 | 0 | 1 | Mathos.Statistics |
Extension+<>c__DisplayClass1 | 2 | 0 | 0 | 2 | 0 | 1 | RubyInt |
Pressure | - | - | - | - | - | - | Mathos.Converter |
Angle | - | - | - | - | - | - | Mathos.Converter |
Power | - | - | - | - | - | - | Mathos.Converter |
Mass | - | - | - | - | - | - | Mathos.Converter |
Length | - | - | - | - | - | - | Mathos.Converter |
Speed | - | - | - | - | - | - | Mathos.Converter |
Volume | - | - | - | - | - | - | Mathos.Converter |
Area | - | - | - | - | - | - | Mathos.Converter |
_Default+<>c__DisplayClass1f | 8 | 0 | 0 | 13 | 0 | 1 | ProjectWebsite |
GeomUtils | 1 | 4 | 0 | 0 | 0 | 1 | B_Geometry |
MainWindow+<dataGrid1_MouseDoubleClick >o__SiteContainer1b | 0 | 0 | 0 | 5 | 0 | 1 | Interactive_Mathematics |
MainWindow+<>c__DisplayClass19 | 2 | 0 | 0 | 2 | 0 | 1 | Interactive_Mathematics |
ResultsWindow | 3 | 0 | 0 | 2 | 0 | 1 | RubyInt |
DataViewWindow | 4 | 0 | 0 | 3 | 0 | 1 | RubyInt |
MainWindow+<>c__DisplayClass6 | 2 | 0 | 0 | 2 | 0 | 1 | RubyInt |
MainWindow+<DoError>d__8 | 2 | 0 | 0 | 7 | - | - | RubyInt |
MainWindow+<About_Executed>d__e | 2 | 0 | 0 | 7 | - | - | RubyInt |
MyCompletionData | 11 | 0 | 6 | 3 | 0 | 1 | RubyInt |
HelpWindow | 9 | 0 | 1 | 4 | 0 | 1 | RubyInt |
FinancePresentValue | 4 | 0 | 0 | 7 | 0 | 4 | Laboratory.Module.Finance |
FinanceNetPresentValue | 4 | 0 | 0 | 7 | 0 | 4 | Laboratory.Module.Finance |
FinanceFutureValueOfAnAnnuity | 4 | 0 | 0 | 7 | 0 | 4 | Laboratory.Module.Finance |
FinanceFutureValue | 4 | 0 | 0 | 7 | 0 | 4 | Laboratory.Module.Finance |
Torus | 8 | 0 | 4 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
DiscreteMathematics | 9 | 1 | 0 | 1 | 0 | 1 | MathosTest |
FinanceAnnuityPaymentFutureValue | 4 | 0 | 0 | 7 | 0 | 4 | Laboratory.Module.Finance |
ChangePassword | 2 | 0 | 0 | 1 | 0 | 4 | Laboratory.Account |
ChangePasswordSuccess | 2 | 0 | 0 | 0 | 0 | 4 | Laboratory.Account |
Login | 2 | 0 | 0 | 2 | 0 | 4 | Laboratory.Account |
NumberList | 2 | 0 | 0 | 1 | 0 | 1 | Mathos.Statistics |
Register | 3 | 0 | 0 | 2 | 0 | 4 | Laboratory.Account |
Default | 2 | 0 | 0 | 1 | 0 | 4 | Laboratory |
Global | 6 | 0 | 0 | 0 | 0 | 2 | Laboratory |
Modules | 2 | 0 | 0 | 1 | 0 | 4 | Laboratory |
Converter | 5 | 0 | 0 | 9 | 0 | 4 | Laboratory.Module |
LinearRegression | 3 | 0 | 0 | 9 | 0 | 4 | Laboratory.Module.DataAnalysis |
WebForm1 | 4 | 0 | 0 | 4 | 0 | 4 | Laboratory.Module.DataAnalysis |
EquationSolver | 4 | 0 | 0 | 17 | 0 | 4 | Laboratory.Module |
Elliptic | 0 | 9 | 0 | 0 | 0 | 1 | Mathos.SpecialFunctions |
Bessel | 0 | 9 | 0 | 0 | 0 | 1 | Mathos.SpecialFunctions |
Factorial | 3 | 0 | 0 | 5 | 0 | 4 | Laboratory.Module |
FinanceAnnuityPaymentPresentValue | 4 | 0 | 0 | 7 | 0 | 4 | Laboratory.Module.Finance |
Ring | 13 | 0 | 7 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
SiteMaster | 2 | 0 | 0 | 3 | 0 | 1 | Laboratory |
FinancePresentValueOfAnAnnuity | 4 | 0 | 0 | 7 | 0 | 4 | Laboratory.Module.Finance |
Settings | 1 | 2 | 1 | 1 | 0 | 3 | Interactive_Mathematics.Properties |
Resources | 1 | 3 | 2 | 2 | 0 | 1 | Interactive_Mathematics.Properties |
App | 2 | 1 | 0 | 0 | 0 | 1 | Interactive_Mathematics |
Settings | 1 | 2 | 1 | 1 | 0 | 3 | RubyInt.Properties |
Resources | 1 | 3 | 2 | 2 | 0 | 1 | RubyInt.Properties |
UnitTest1 | 3 | 0 | 0 | 0 | 0 | 1 | MathosTest.SpecialFunctions |
DiceSimulatorTest | 3 | 0 | 0 | 0 | 0 | 1 | MathosTest |
App | 2 | 1 | 0 | 1 | 0 | 1 | RubyInt |
Statistics | 21 | 0 | 0 | 0 | 0 | 1 | MathosTest |
TestOfFractions | 21 | 0 | 0 | 0 | 0 | 1 | MathosTest |
VectorsAndMatrices | 17 | 0 | 0 | 0 | 0 | 1 | MathosTest |
Uncertainty | 7 | 9 | 0 | 8 | 0 | 1 | MathosTest.Uncertainty |
ConverterTest | 13 | 0 | 0 | 0 | 0 | 1 | MathosTest |
Shapes | 14 | 0 | 0 | 0 | 0 | 1 | MathosTest |
PythagoreanTest | 5 | 0 | 0 | 0 | 0 | 1 | MathosTest |
SyntaxTest | 3 | 0 | 0 | 0 | 0 | 1 | MathosTest.Mathos_Main |
LinearModelsTest | 3 | 0 | 0 | 0 | 0 | 1 | MathosTest |
StatisticalDistributions | 21 | 0 | 0 | 0 | 0 | 1 | MathosTest.Mathos_Main |
FinanceTest | 9 | 0 | 0 | 0 | 0 | 1 | MathosTest |
EquationSolverTest | 4 | 0 | 0 | 0 | 0 | 1 | MathosTest |
coordinateStruct | 5 | 0 | 0 | 0 | 0 | 1 | MathosTest |
GammaTests | 8 | 0 | 0 | 1 | 0 | 1 | MathosTest.Mathos_Main.SpecialFunctions |
ElementaryTests | 7 | 0 | 0 | 1 | 0 | 1 | MathosTest.Mathos_Main.SpecialFunctions |
PreCalculus | 4 | 0 | 0 | 0 | 0 | 1 | MathosTest |
FiniteCalculusTest | 9 | 0 | 0 | 0 | 0 | 1 | MathosTest.Mathos_Main.Calculus |
FinanceRemainingBalanceOfAnnuity | 4 | 0 | 0 | 8 | 0 | 4 | Laboratory.Module.Finance |
MConverter | 2 | 0 | 0 | 1 | 0 | 4 | Laboratory.Module |
NumberChecker | 3 | 0 | 0 | 6 | 0 | 4 | Laboratory.Module |
AngleConversionM | 1 | 5 | 0 | 0 | 0 | 1 | Mathos.Converter |
Triangle | 4 | 0 | 0 | 9 | 0 | 4 | Laboratory.Module |
Uncertainty | 6 | 1 | 0 | 8 | 0 | 4 | Laboratory.Module |
Form1 | 13 | 1 | 0 | 8 | 0 | 7 | B_Geometry |
GeomBox | 1 | 0 | 0 | 6 | 0 | 1 | B_Geometry |
GeometryVisUtils | 1 | 0 | 0 | 0 | 0 | 1 | B_Geometry |
PhysicalConstants | 0 | 0 | 0 | 1 | 0 | 1 | Mathos.Arithmetic |
Ellipse | 12 | 0 | 6 | 2 | 0 | 1 | Mathos.Geometry.Shapes |
IComplex | 0 | 0 | 0 | 0 | - | - | Mathos.Arithmetic.Numbers |
Resources | 1 | 3 | 2 | 2 | 0 | 1 | B_Geometry.Properties |
Settings | 1 | 2 | 1 | 1 | 0 | 3 | B_Geometry.Properties |
ComplexArithmeticTest | 6 | 0 | 0 | 1 | 0 | 1 | MathosTest.Mathos_Main.Arithmetic |
MathematicalConstants | 0 | 0 | 0 | 21 | 0 | 1 | Mathos.Arithmetic |
TestofcomplexNumbers | 17 | 0 | 0 | 1 | 0 | 1 | MathosTest |
DoubleArthimeticTest | 9 | 1 | 0 | 0 | 0 | 1 | MathosTest.Mathos_Main.Arithmetic |
IntegerArthimeticTest | 2 | 0 | 0 | 0 | 0 | 1 | MathosTest.Mathos_Main.Arithmetic |
SingleArthimeticTest | 2 | 0 | 0 | 1 | 0 | 1 | MathosTest.Mathos_Main.Arithmetic |
DecimalArithmetic | 2 | 0 | 0 | 0 | 0 | 1 | MathosTest.Mathos_Main.Arithmetic |
CalculusTest | 10 | 11 | 0 | 11 | 0 | 1 | MathosTest.Calculus |
Program | 0 | 0 | 0 | 0 | 0 | 1 | B_Geometry |
About | 2 | 0 | 0 | 0 | 0 | 4 | Laboratory |
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 |
---|---|---|---|---|
INaturalNumber | - | - | 0 | Mathos.Arithmetic.Numbers |
IShape2D | - | - | 0 | Mathos.Geometry.Shapes |
IInteger | - | - | 0 | Mathos.Arithmetic.Numbers |
IShape3D | - | - | 0 | Mathos.Geometry.Shapes |
Pythagorean | 0 | 0 | 2 | Mathos.Geometry |
Check | 0 | 0 | 6 | Mathos.Arithmetic.Numbers |
Get | 0 | 0 | 19 | Mathos.Arithmetic.Numbers |
Finance | 0 | 0 | 17 | Mathos.Finance |
Vector | 0.64 | 0.67 | 10 | Mathos |
DoubleArithmetic | 0 | 0 | 5 | Mathos.Arithmetic |
IRationalNumber | - | - | 0 | Mathos.Arithmetic.Numbers |
TolerantUtilities | 0.33 | 0.5 | 1 | B_Geometry |
Fraction | 0.69 | 0.71 | 41 | Mathos.Arithmetic.Fractions |
Base | - | - | 0 | Mathos.Converter |
IIRationalNumber | - | - | 0 | Mathos.Arithmetic.Numbers |
IntegralCalculus+IntegrationAlgorithm | - | - | 0 | Mathos.Calculus |
StatisticalProcedures | 0 | 0 | 54 | Mathos.Statistics |
ComplexNumber | 0.5 | 0.51 | 21 | Mathos.Arithmetic.ComplexNumbers |
ComplexArithmetic | 0 | 0 | 16 | Mathos.Arithmetic |
Vector | 0.56 | 0.6 | 7 | B_Geometry |
Matrix | 0.43 | 0.44 | 28 | Mathos |
Convert | 0 | 0 | 3 | Mathos.Arithmetic.Numbers |
PhysicalConstants+SI | 0 | 0 | 0 | Mathos.Arithmetic |
ConversionInfo | 0 | 0 | 1 | Mathos.Converter |
Circle | 0.14 | 0.15 | 4 | Mathos.Geometry.Shapes |
Square | 0.08 | 0.09 | 5 | Mathos.Geometry.Shapes |
DiceSimulator | 0.39 | 0.46 | 12 | Mathos.Statistics |
LinearModels+LinearRegressionResults | 0.38 | 0.5 | 9 | Mathos.Statistics |
MainWindow | 0.85 | 0.9 | 121 | RubyInt |
IntegerArithmetic | 0 | 0 | 6 | Mathos.Arithmetic |
Elementary | 0 | 0 | 12 | Mathos.Calculus |
IntegralCalculus | 0 | 0 | 2 | Mathos.Calculus |
FiniteCalculus | 0 | 0 | 12 | Mathos.Calculus |
MathematicalConstants+Single | 0 | 0 | 0 | Mathos.Arithmetic |
SingleArithmetic | 0 | 0 | 6 | Mathos.Arithmetic |
Antiderivatives | 0 | 0 | 5 | Mathos.SpecialFunctions |
LinearModels | 0 | 0 | 20 | Mathos.Statistics |
ConversionBase | 0 | 0 | 2 | Mathos.Converter |
Rectangle | 0.21 | 0.23 | 5 | Mathos.Geometry.Shapes |
BGeomMatrix | 0.52 | 0.56 | 11 | B_Geometry |
DecimalArithmetic | 0 | 0 | 9 | Mathos.Arithmetic |
BasisFunction | 0.27 | 0.31 | 8 | B_Geometry |
ComplexOperation | 0 | 0 | 17 | Mathos.Arithmetic.ComplexNumbers |
BenchmarkUtil | 0 | 0 | 8 | Mathos.Testing |
IntegralApproximation | 0.94 | 1.04 | 37 | Laboratory.Module |
SingleArithmetic+FloatIntUnion | 0 | 0 | 0 | Mathos.Arithmetic |
IRealNumber | - | - | 0 | Mathos.Arithmetic.Numbers |
IImaginary | - | - | 0 | Mathos.Arithmetic.Numbers |
Extension | 0.62 | 0.67 | 43 | RubyInt |
RightTriangle | 0.27 | 0.29 | 5 | Mathos.Geometry.Shapes |
Converter | 0 | 0 | 33 | Mathos.Converter |
EquationSolver | 0 | 0 | 17 | Mathos |
ArithmeticProgression | 0.38 | 0.43 | 1 | Mathos.PreCalculus.Sequences |
GeometricProgression | 0.33 | 0.38 | 4 | Mathos.PreCalculus.Sequences |
Fibonacci | 0.68 | 0.75 | 6 | Mathos.PreCalculus.Sequences |
Coordinate | 0.54 | 0.58 | 14 | Mathos.Geometry.CoordinateGeometry .TwoDimensional |
Get+<>c__DisplayClass7 | 0 | 0 | 2 | Mathos.Arithmetic.Numbers |
SyntaxExtension | 0 | 0 | 9 | Mathos.Syntax |
Triangle | 0.6 | 0.62 | 14 | Mathos.Geometry.Shapes |
Finance+<>c__DisplayClass2 | 0 | 0 | 6 | Mathos.Finance |
InvalidTriangleException | 0 | 0 | 3 | Mathos.Exceptions |
DifferentialCalculus | 0 | 0 | 8 | Mathos.Calculus |
UncertainNumber | 0.28 | 0.29 | 63 | Mathos.Statistics |
BCurve | 0.15 | 0.19 | 14 | B_Geometry |
LinearAlgebra | 0 | 0 | 16 | B_Geometry |
BinomialDistribution | 0 | 0 | 10 | Mathos.Statistics |
HypergeometricDistribution | 0 | 0 | 10 | Mathos.Statistics |
PoissonDistribution | 0 | 0 | 8 | Mathos.Statistics |
InvalidCoordinateFormat | 0 | 0 | 3 | Mathos.Exceptions |
Get+<Factors>d__9 | 0 | 0 | 16 | Mathos.Arithmetic.Numbers |
Get+<CustomList>d__0 | 0 | 0 | 5 | Mathos.Arithmetic.Numbers |
Statistics+Literals | 0 | 0 | 5 | MathosTest |
ComplexArithmeticTest+<>c__DisplayClass2 | 0 | 0 | 3 | MathosTest.Mathos_Main.Arithmetic |
Program | 0 | 0 | 21 | B_Geometry.New |
LinearModels+<>c__DisplayClass1 | 0 | 0 | 3 | Mathos.Statistics |
Calculate | 0 | 0 | 18 | Mathos.Geometry.CoordinateGeometry .TwoDimensional |
FrmTable | 0.44 | 0.67 | 6 | Interactive_Mathematics |
DiceSimulatorTest+<>c__DisplayClass1 | 0 | 0 | 2 | MathosTest |
Program+<>c__DisplayClass5 | 0 | 0 | 15 | B_Geometry.New |
Temperature | - | - | 0 | Mathos.Converter |
GammaRelated | 0 | 0 | 5 | Mathos.SpecialFunctions |
Resources | 0 | 0 | 6 | MathosTest.Properties |
Cube | 0 | 0 | 9 | Mathos.Geometry.Shapes |
RightCircularCone | 0.25 | 0.27 | 16 | Mathos.Geometry.Shapes |
SquarePyramid | 0.21 | 0.23 | 14 | Mathos.Geometry.Shapes |
RightCircularCylinder | 0.25 | 0.27 | 15 | Mathos.Geometry.Shapes |
RectangularPrism | 0.25 | 0.27 | 14 | Mathos.Geometry.Shapes |
Trapezoid | 0.62 | 0.65 | 4 | Mathos.Geometry.Shapes |
Parallelogram | 0.23 | 0.25 | 4 | Mathos.Geometry.Shapes |
Sphere | 0.09 | 0.1 | 5 | Mathos.Geometry.Shapes |
MainWindow | 0.57 | 0.67 | 83 | Interactive_Mathematics |
DenominatorNullException | 0 | 0 | 3 | Mathos.Exceptions |
InvalidFractionFormatException | 0 | 0 | 3 | Mathos.Exceptions |
Matrix+<>c__DisplayClass2 | 0 | 0 | 4 | Mathos |
StatisticalProcedures+<>c__DisplayClass1 | 0 | 0 | 3 | Mathos.Statistics |
IntegralApproximation+<>c__DisplayClass1 | 0 | 0 | 2 | Laboratory.Module |
_Default | 0.67 | 1.33 | 75 | ProjectWebsite |
TemperatureConversion | 0 | 0 | 3 | Mathos.Converter |
UncertainNumber+UncertaintyType | - | - | 0 | Mathos.Statistics |
UncertainNumber+<>c__DisplayClass1 | 0 | 0 | 2 | Mathos.Statistics |
UncertainNumber+<>c__DisplayClass6 | 0 | 0 | 2 | Mathos.Statistics |
Extension+<>c__DisplayClass1 | 0 | 0 | 2 | RubyInt |
Pressure | - | - | 0 | Mathos.Converter |
Angle | - | - | 0 | Mathos.Converter |
Power | - | - | 0 | Mathos.Converter |
Mass | - | - | 0 | Mathos.Converter |
Length | - | - | 0 | Mathos.Converter |
Speed | - | - | 0 | Mathos.Converter |
Volume | - | - | 0 | Mathos.Converter |
Area | - | - | 0 | Mathos.Converter |
_Default+<>c__DisplayClass1f | 0 | 0 | 35 | ProjectWebsite |
GeomUtils | 0 | 0 | 18 | B_Geometry |
MainWindow+<dataGrid1_MouseDoubleClick >o__SiteContainer1b | 0 | 0 | 0 | Interactive_Mathematics |
MainWindow+<>c__DisplayClass19 | 0 | 0 | 22 | Interactive_Mathematics |
ResultsWindow | 0.5 | 0.75 | 4 | RubyInt |
DataViewWindow | 0.5 | 0.67 | 26 | RubyInt |
MainWindow+<>c__DisplayClass6 | 0 | 0 | 7 | RubyInt |
MainWindow+<DoError>d__8 | 0 | 0 | 7 | RubyInt |
MainWindow+<About_Executed>d__e | 0 | 0 | 6 | RubyInt |
MyCompletionData | 0 | 0 | 3 | RubyInt |
HelpWindow | 0.67 | 0.75 | 36 | RubyInt |
FinancePresentValue | 0.79 | 1.05 | 12 | Laboratory.Module.Finance |
FinanceNetPresentValue | 0.79 | 1.05 | 15 | Laboratory.Module.Finance |
FinanceFutureValueOfAnAnnuity | 0.79 | 1.05 | 12 | Laboratory.Module.Finance |
FinanceFutureValue | 0.79 | 1.05 | 12 | Laboratory.Module.Finance |
Torus | 0.38 | 0.43 | 2 | Mathos.Geometry.Shapes |
DiscreteMathematics | 0 | 0 | 32 | MathosTest |
FinanceAnnuityPaymentFutureValue | 0.79 | 1.05 | 12 | Laboratory.Module.Finance |
ChangePassword | 1 | 2 | 1 | Laboratory.Account |
ChangePasswordSuccess | 0 | 0 | 1 | Laboratory.Account |
Login | 0.75 | 1.5 | 7 | Laboratory.Account |
NumberList | 0 | 0 | 3 | Mathos.Statistics |
Register | 0.67 | 1 | 11 | Laboratory.Account |
Default | 1 | 2 | 1 | Laboratory |
Global | 0 | 0 | 1 | Laboratory |
Modules | 1 | 2 | 1 | Laboratory |
Converter | 0.78 | 0.97 | 28 | Laboratory.Module |
LinearRegression | 0.7 | 1.06 | 17 | Laboratory.Module.DataAnalysis |
WebForm1 | 0.75 | 1 | 13 | Laboratory.Module.DataAnalysis |
EquationSolver | 0.78 | 1.04 | 19 | Laboratory.Module |
Elliptic | 0 | 0 | 1 | Mathos.SpecialFunctions |
Bessel | 0 | 0 | 1 | Mathos.SpecialFunctions |
Factorial | 0.73 | 1.1 | 14 | Laboratory.Module |
FinanceAnnuityPaymentPresentValue | 0.79 | 1.05 | 12 | Laboratory.Module.Finance |
Ring | 0.46 | 0.5 | 1 | Mathos.Geometry.Shapes |
SiteMaster | 1 | 2 | 1 | Laboratory |
FinancePresentValueOfAnAnnuity | 0.79 | 1.05 | 12 | Laboratory.Module.Finance |
Settings | 0 | 0 | 1 | Interactive_Mathematics.Properties |
Resources | 0 | 0 | 4 | Interactive_Mathematics.Properties |
App | 0 | 0 | 5 | Interactive_Mathematics |
Settings | 0 | 0 | 1 | RubyInt.Properties |
Resources | 0 | 0 | 4 | RubyInt.Properties |
UnitTest1 | 0 | 0 | 3 | MathosTest.SpecialFunctions |
DiceSimulatorTest | 0 | 0 | 16 | MathosTest |
App | 0.67 | 1 | 6 | RubyInt |
Statistics | 0 | 0 | 35 | MathosTest |
TestOfFractions | 0 | 0 | 28 | MathosTest |
VectorsAndMatrices | 0 | 0 | 31 | MathosTest |
Uncertainty | 0 | 0 | 21 | MathosTest.Uncertainty |
ConverterTest | 0 | 0 | 11 | MathosTest |
Shapes | 0 | 0 | 69 | MathosTest |
PythagoreanTest | 0 | 0 | 3 | MathosTest |
SyntaxTest | 0 | 0 | 17 | MathosTest.Mathos_Main |
LinearModelsTest | 0 | 0 | 6 | MathosTest |
StatisticalDistributions | 0 | 0 | 23 | MathosTest.Mathos_Main |
FinanceTest | 0 | 0 | 13 | MathosTest |
EquationSolverTest | 0 | 0 | 10 | MathosTest |
coordinateStruct | 0 | 0 | 16 | MathosTest |
GammaTests | 0 | 0 | 12 | MathosTest.Mathos_Main.SpecialFunctions |
ElementaryTests | 0 | 0 | 8 | MathosTest.Mathos_Main.SpecialFunctions |
PreCalculus | 0 | 0 | 10 | MathosTest |
FiniteCalculusTest | 0 | 0 | 9 | MathosTest.Mathos_Main.Calculus |
FinanceRemainingBalanceOfAnnuity | 0.78 | 1.04 | 12 | Laboratory.Module.Finance |
MConverter | 1 | 2 | 4 | Laboratory.Module |
NumberChecker | 0.78 | 1.17 | 17 | Laboratory.Module |
AngleConversionM | 0 | 0 | 9 | Mathos.Converter |
Triangle | 0.78 | 1.04 | 20 | Laboratory.Module |
Uncertainty | 0.77 | 0.96 | 37 | Laboratory.Module |
Form1 | 0.82 | 0.88 | 85 | B_Geometry |
GeomBox | 0 | 0 | 1 | B_Geometry |
GeometryVisUtils | 0 | 0 | 1 | B_Geometry |
PhysicalConstants | 0 | 0 | 0 | Mathos.Arithmetic |
Ellipse | 0.67 | 0.73 | 3 | Mathos.Geometry.Shapes |
IComplex | - | - | 0 | Mathos.Arithmetic.Numbers |
Resources | 0 | 0 | 4 | B_Geometry.Properties |
Settings | 0 | 0 | 1 | B_Geometry.Properties |
ComplexArithmeticTest | 0.17 | 0.2 | 17 | MathosTest.Mathos_Main.Arithmetic |
MathematicalConstants | 0 | 0 | 0 | Mathos.Arithmetic |
TestofcomplexNumbers | 0 | 0 | 32 | MathosTest |
DoubleArthimeticTest | 0 | 0 | 17 | MathosTest.Mathos_Main.Arithmetic |
IntegerArthimeticTest | 0 | 0 | 2 | MathosTest.Mathos_Main.Arithmetic |
SingleArthimeticTest | 0 | 0 | 3 | MathosTest.Mathos_Main.Arithmetic |
DecimalArithmetic | 0 | 0 | 4 | MathosTest.Mathos_Main.Arithmetic |
CalculusTest | 0 | 0 | 14 | MathosTest.Calculus |
Program | 0 | 0 | 0 | B_Geometry |
About | 0 | 0 | 1 | Laboratory |
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 |
---|---|---|---|---|---|---|---|---|
Laboratory | 0 | 24 | 5 | 43 | 100 | - | 0 | 4 |
Laboratory.Account | 7 | 54 | 4 | 36 | 83 | - | 0 | 6 |
Laboratory.Module | 278 | 1589 | 9 | 509 | 64 | - | 0 | 20 |
Laboratory.Module.DataAnalysis | 41 | 238 | 2 | 91 | 68 | - | 0 | 7 |
Laboratory.Module.Finance | 104 | 568 | 8 | 399 | 79 | - | 0 | 6 |
B_Geometry | 637 | 3322 | 11 | 245 | 27 | - | 0 | 9 |
B_Geometry.New | 22 | 127 | 2 | 3 | 12 | - | 0 | 5 |
B_Geometry.Properties | 9 | 54 | 2 | 14 | 60 | - | 0 | 9 |
MathosTest | 695 | 7758 | 16 | 112 | 13 | - | 0 | 23 |
MathosTest.Calculus | 27 | 383 | 1 | 24 | 47 | - | 0 | 3 |
MathosTest.SpecialFunctions | 2 | 22 | 1 | 0 | 0 | - | 0 | 2 |
MathosTest.Uncertainty | 52 | 428 | 1 | 3 | 5 | - | 0 | 5 |
MathosTest.Properties | 8 | 49 | 1 | 21 | 72 | - | 1 | 8 |
MathosTest.Mathos_Main | 32 | 357 | 2 | 9 | 21 | - | 0 | 8 |
MathosTest.Mathos_Main.Arithmetic | 150 | 990 | 6 | 20 | 11 | - | 0 | 6 |
MathosTest.Mathos_Main.Calculus | 38 | 283 | 1 | 3 | 7 | - | 0 | 3 |
MathosTest.Mathos_Main.SpecialFunctions | 38 | 317 | 2 | 14 | 26 | - | 0 | 8 |
RubyInt | 216 | 2022 | 11 | 44 | 16 | - | 0 | 46 |
RubyInt.Properties | 9 | 54 | 2 | 14 | 60 | - | 0 | 9 |
ProjectWebsite | 171 | 1904 | 2 | 71 | 29 | - | 0 | 12 |
Interactive_Mathematics | 125 | 1429 | 5 | 24 | 16 | - | 0 | 23 |
Interactive_Mathematics.Properties | 9 | 54 | 2 | 14 | 60 | - | 0 | 9 |
Mathos | 347 | 2608 | 4 | 299 | 46 | - | 4 | 9 |
Mathos.Testing | 15 | 64 | 1 | 9 | 37 | - | 3 | 2 |
Mathos.Calculus | 178 | 1344 | 5 | 184 | 50 | - | 9 | 6 |
Mathos.Converter | 92 | 1152 | 15 | 355 | 79 | - | 3 | 6 |
Mathos.SpecialFunctions | 48 | 292 | 4 | 185 | 79 | - | 2 | 4 |
Mathos.Statistics | 363 | 2900 | 14 | 512 | 58 | - | 6 | 13 |
Mathos.Finance | 29 | 327 | 2 | 74 | 71 | - | 2 | 4 |
Mathos.Exceptions | 16 | 116 | 4 | 81 | 83 | - | 3 | 2 |
Mathos.Syntax | 27 | 217 | 1 | 153 | 85 | - | 2 | 3 |
Mathos.Arithmetic | 247 | 1801 | 10 | 527 | 68 | - | 5 | 3 |
Mathos.Arithmetic.ComplexNumbers | 139 | 993 | 2 | 94 | 40 | - | 3 | 4 |
Mathos.Arithmetic.Numbers | 113 | 1049 | 13 | 176 | 60 | - | 11 | 8 |
Mathos.Arithmetic.Fractions | 166 | 1500 | 1 | 254 | 60 | - | 4 | 5 |
Mathos.Geometry | 6 | 59 | 1 | 17 | 73 | - | 2 | 1 |
Mathos.Geometry.Shapes | 471 | 5268 | 18 | 761 | 61 | - | 2 | 3 |
Mathos.Geometry.CoordinateGeometry .TwoDimensional | 46 | 458 | 2 | 86 | 65 | - | 1 | 3 |
Mathos.PreCalculus.Sequences | 67 | 478 | 3 | 85 | 55 | - | 1 | 1 |
Code Quality | 391 |
|
Critical Rule warning: Methods too complex - critical |
warnif count > 0 from m in JustMyCode.Methods where
m.ILCyclomaticComplexity > 40 &&
m.ILNestingDepth > 5
orderby m.ILCyclomaticComplexity descending,
m.ILNestingDepth descending
select new { m, m.ILCyclomaticComplexity, m.ILNestingDepth }
// Methods with ILCyclomaticComplexity > 40 and ILNestingDepth > 4
// are really too complex and should be split
// in smaller methods, or even types.
// See the definition of the ILCyclomaticComplexity metric here
// http://www.ndepend.com/Metrics.aspx#ILCC
// See the definition of the ILNestingDepth metric here
// http://www.NDepend.com/Metrics.aspx#ILNestingDepth
1 methods matched
method | IL Cyclomatic Complexity (ILCC) | IL Nesting Depth | Full Name |
---|---|---|---|
.ctor(Double,Double,Double,Double,Double ,Double) | 75 | 6 | Mathos.Geometry.Shapes.Triangle..ctor (Double,Double,Double,Double,Double ,Double) |
Statistics
Stat | IL Cyclomatic Complexity (ILCC) | IL Nesting Depth |
---|---|---|
Sum: | 75 | 6 |
Average: | 75 | 6 |
Minimum: | 75 | 6 |
Maximum: | 75 | 6 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Quick summary of methods to refactor |
warnif count > 0 from m in JustMyCode.Methods where
// Code Metrics' definitions
m.NbLinesOfCode > 30 || // http://www.ndepend.com/Metrics.aspx#NbLinesOfCode
// We've commented # IL Instructions, because with LINQ syntax, a few lines of code can compile to hundreds of IL instructions.
// m.NbILInstructions > 200 || // http://www.ndepend.com/Metrics.aspx#NbILInstructions
m.CyclomaticComplexity > 20 || // http://www.ndepend.com/Metrics.aspx#CC
m.ILCyclomaticComplexity > 50 || // http://www.ndepend.com/Metrics.aspx#ILCC
m.ILNestingDepth > 5 || // http://www.ndepend.com/Metrics.aspx#ILNestingDepth
m.NbParameters > 5 || // http://www.ndepend.com/Metrics.aspx#NbParameters
m.NbVariables > 8 || // http://www.ndepend.com/Metrics.aspx#NbVariables
m.NbOverloads > 6 // http://www.ndepend.com/Metrics.aspx#NbOverloads
select new { m, m.NbLinesOfCode, m.NbILInstructions, m.CyclomaticComplexity,
m.ILCyclomaticComplexity, m.ILNestingDepth,
m.NbParameters, m.NbVariables, m.NbOverloads }
35 methods matched
methods | # lines of code (LOC) | # IL instructions | Cyclomatic Complexity (CC) | IL Cyclomatic Complexity (ILCC) | IL Nesting Depth | # Parameters | # Variables | # Overloads | Full Name |
---|---|---|---|---|---|---|---|---|---|
CalculateButton_Click(Object,EventArgs) | 42 | 294 | 14 | 16 | 1 | 2 | 3 | 1 | Laboratory.Module.Converter .CalculateButton_Click(Object,EventArgs) |
Calculate() | 36 | 164 | 5 | 5 | 1 | 0 | 11 | 1 | Laboratory.Module.IntegralApproximation .Calculate() |
Evaluate(Int32,Int32,Double) | 20 | 159 | 6 | 10 | 2 | 3 | 9 | 1 | B_Geometry.BasisFunction.Evaluate(Int32 ,Int32,Double) |
button1_Click(Object,EventArgs) | 50 | 304 | 2 | 3 | 1 | 2 | 12 | 1 | B_Geometry.Form1.button1_Click(Object ,EventArgs) |
DrawCube() | 32 | 145 | 1 | 1 | 0 | 0 | 0 | 1 | B_Geometry.Form1.DrawCube() |
.ctor(Double,Double,Double,Double,Double ,Double) | 13 | 42 | 1 | 1 | 0 | 6 | 0 | 1 | B_Geometry.GeomBox..ctor(Double,Double ,Double,Double,Double,Double) |
CentripetalMethod_calculateInterpolation Parameters(Vector[],Double[]&) | 15 | 70 | 2 | 3 | 1 | 2 | 9 | 1 | B_Geometry.GeomUtils .CentripetalMethod_calculateInterpolatio nParameters(Vector[],Double[]&) |
CentripetalMethod_createSplineByInterpol ation(Int32,Vector[],BCurve&) | 38 | 196 | 9 | 15 | 3 | 3 | 15 | 1 | B_Geometry.GeomUtils .CentripetalMethod_createSplineByInterpo lation(Int32,Vector[],BCurve&) |
GaussianElimination(BGeomMatrix,Vector ,Double[]&) | 45 | 242 | 8 | 14 | 2 | 3 | 12 | 1 | B_Geometry.LinearAlgebra .GaussianElimination(BGeomMatrix,Vector ,Double[]&) |
TestMethod1() | 12 | 156 | 1 | 1 | 0 | 0 | 10 | 1 | MathosTest.VectorsAndMatrices .TestMethod1() |
Equality2equalMatrices() | 22 | 310 | 3 | 2 | 2 | 0 | 11 | 1 | MathosTest.VectorsAndMatrices .Equality2equalMatrices() |
Determinant() | 16 | 284 | 3 | 2 | 2 | 0 | 9 | 1 | MathosTest.VectorsAndMatrices .Determinant() |
TestRootsOf() | 23 | 209 | 4 | 7 | 1 | 0 | 9 | 1 | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest.TestRootsOf() |
ComparePowIntAndMathSqrtInAccuracy() | 15 | 107 | 2 | 3 | 1 | 0 | 12 | 1 | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest .ComparePowIntAndMathSqrtInAccuracy() |
Page_Load(Object,EventArgs) | 52 | 443 | 3 | 15 | 2 | 2 | 7 | 1 | ProjectWebsite._Default.Page_Load(Object ,EventArgs) |
SystemOfTwoEquations(Double,Double ,Double,Double,Double,Double) | 3 | 50 | 1 | 1 | 0 | 6 | 2 | 1 | Mathos.EquationSolver .SystemOfTwoEquations(Double,Double ,Double,Double,Double,Double) |
RREF() | 42 | 246 | 12 | 20 | 4 | 0 | 12 | 1 | Mathos.Matrix.RREF() |
LinearRegression(List<Decimal>,List <Decimal>) | 24 | 152 | 4 | 6 | 1 | 2 | 10 | 1 | Mathos.Statistics.LinearModels .LinearRegression(List<Decimal>,List <Decimal>) |
.ctor(Int64) | 2 | 9 | 1 | 1 | 0 | 1 | 0 | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Int64) |
.ctor(Decimal) | 2 | 9 | 1 | 1 | 0 | 1 | 0 | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Decimal) |
.ctor(Double) | 2 | 8 | 1 | 1 | 0 | 1 | 0 | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Double) |
.ctor(Int32,Int32) | 2 | 10 | 1 | 1 | 0 | 2 | 0 | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Int32,Int32) |
.ctor(Decimal,Decimal) | 1 | 10 | 1 | 1 | 0 | 2 | 0 | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Decimal,Decimal) |
.ctor(Double,Double) | 2 | 8 | 1 | 1 | 0 | 2 | 0 | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Double,Double) |
.ctor(Fraction,Fraction) | 1 | 10 | 1 | 1 | 0 | 2 | 0 | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Fraction,Fraction) |
.ctor(String) | 23 | 158 | 8 | 11 | 2 | 1 | 8 | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(String) |
.ctor(Complex) | 1 | 10 | 1 | 1 | 0 | 1 | 0 | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Complex) |
op_Implicit(String) | 1 | 7 | 1 | 1 | 0 | 1 | 0 | 7 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(String) |
op_Implicit(Int16) | 1 | 8 | 1 | 1 | 0 | 1 | 0 | 7 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Int16) |
op_Implicit(Int32) | 1 | 8 | 1 | 1 | 0 | 1 | 0 | 7 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Int32) |
op_Implicit(Int64) | 1 | 7 | 1 | 1 | 0 | 1 | 0 | 7 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Int64) |
op_Implicit(Double) | 1 | 7 | 1 | 1 | 0 | 1 | 0 | 7 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Double) |
op_Implicit(Decimal) | 1 | 9 | 1 | 1 | 0 | 1 | 0 | 7 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Decimal) |
op_Implicit(Complex) | 1 | 7 | 1 | 1 | 0 | 1 | 0 | 7 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Complex) |
.ctor(Double,Double,Double,Double,Double ,Double) | 39 | 929 | 74 | 75 | 6 | 6 | 1 | 4 | Mathos.Geometry.Shapes.Triangle..ctor (Double,Double,Double,Double,Double ,Double) |
Statistics
Stat | # lines of code (LOC) | # IL instructions | Cyclomatic Complexity (CC) | IL Cyclomatic Complexity (ILCC) | IL Nesting Depth | # Parameters | # Variables | # Overloads |
---|---|---|---|---|---|---|---|---|
Sum: | 582 | 4 787 | 178 | 226 | 32 | 57 | 162 | 152 |
Average: | 16.63 | 136.77 | 5.09 | 6.46 | 0.91 | 1.63 | 4.63 | 4.34 |
Minimum: | 1 | 7 | 1 | 1 | 0 | 0 | 0 | 1 |
Maximum: | 52 | 929 | 74 | 75 | 6 | 6 | 15 | 9 |
Standard deviation: | 16.85 | 179.58 | 12.27 | 12.93 | 1.34 | 1.61 | 5.19 | 3.57 |
Variance: | 284 | 32 247 | 150.59 | 167.22 | 1.79 | 2.58 | 26.98 | 12.74 |
Rule warning: Methods too big |
warnif count > 0 from m in JustMyCode.Methods where
m.NbLinesOfCode > 30
// We've commented # IL Instructions, because with LINQ syntax, a few lines of code can compile to hundreds of IL instructions.
// || m.NbILInstructions > 200
orderby m.NbLinesOfCode descending,
m.NbILInstructions descending
select new { m, m.NbLinesOfCode, m.NbILInstructions }
// Methods where NbLinesOfCode > 30 or NbILInstructions > 200
// are extremely complex and should be split in smaller methods.
// See the definition of the NbLinesOfCode metric here
// http://www.ndepend.com/Metrics.aspx#NbLinesOfCode
9 methods matched
methods | # lines of code (LOC) | # IL instructions | Full Name |
---|---|---|---|
Page_Load(Object,EventArgs) | 52 | 443 | ProjectWebsite._Default.Page_Load(Object ,EventArgs) |
button1_Click(Object,EventArgs) | 50 | 304 | B_Geometry.Form1.button1_Click(Object ,EventArgs) |
GaussianElimination(BGeomMatrix,Vector ,Double[]&) | 45 | 242 | B_Geometry.LinearAlgebra .GaussianElimination(BGeomMatrix,Vector ,Double[]&) |
CalculateButton_Click(Object,EventArgs) | 42 | 294 | Laboratory.Module.Converter .CalculateButton_Click(Object,EventArgs) |
RREF() | 42 | 246 | Mathos.Matrix.RREF() |
.ctor(Double,Double,Double,Double,Double ,Double) | 39 | 929 | Mathos.Geometry.Shapes.Triangle..ctor (Double,Double,Double,Double,Double ,Double) |
CentripetalMethod_createSplineByInterpol ation(Int32,Vector[],BCurve&) | 38 | 196 | B_Geometry.GeomUtils .CentripetalMethod_createSplineByInterpo lation(Int32,Vector[],BCurve&) |
Calculate() | 36 | 164 | Laboratory.Module.IntegralApproximation .Calculate() |
DrawCube() | 32 | 145 | B_Geometry.Form1.DrawCube() |
Statistics
Stat | # lines of code (LOC) | # IL instructions |
---|---|---|
Sum: | 376 | 2 963 |
Average: | 41.78 | 329.22 |
Minimum: | 32 | 145 |
Maximum: | 52 | 929 |
Standard deviation: | 6.09 | 228.05 |
Variance: | 37.06 | 52 008 |
Rule warning: Methods too complex |
warnif count > 0 from m in JustMyCode.Methods where
m.CyclomaticComplexity > 20 ||
m.ILCyclomaticComplexity > 40 ||
m.ILNestingDepth > 5
orderby m.CyclomaticComplexity descending,
m.ILCyclomaticComplexity descending,
m.ILNestingDepth descending
select new { m, m.CyclomaticComplexity,
m.ILCyclomaticComplexity,
m.ILNestingDepth }
// Methods where CyclomaticComplexity > 20
// or ILCyclomaticComplexity > 40
// or ILNestingDepth > 4
// are hard to understand and maintain
// and should be split in smaller methods.
// See the definition of the complexity metrics here:
// http://www.ndepend.com/Metrics.aspx#CC
// http://www.ndepend.com/Metrics.aspx#ILCC
// http://www.NDepend.com/Metrics.aspx#ILNestingDepth
1 methods matched
method | Cyclomatic Complexity (CC) | IL Cyclomatic Complexity (ILCC) | IL Nesting Depth | Full Name |
---|---|---|---|---|
.ctor(Double,Double,Double,Double,Double ,Double) | 74 | 75 | 6 | Mathos.Geometry.Shapes.Triangle..ctor (Double,Double,Double,Double,Double ,Double) |
Statistics
Stat | Cyclomatic Complexity (CC) | IL Cyclomatic Complexity (ILCC) | IL Nesting Depth |
---|---|---|---|
Sum: | 74 | 75 | 6 |
Average: | 74 | 75 | 6 |
Minimum: | 74 | 75 | 6 |
Maximum: | 74 | 75 | 6 |
Standard deviation: | 0 | 0 | 0 |
Variance: | 0 | 0 | 0 |
Rule warning: Methods potentially poorly commented |
warnif count > 0 from m in JustMyCode.Methods where
m.PercentageComment < 20 &&
m.NbLinesOfCode > 20
orderby m.PercentageComment ascending
select new { m, m.PercentageComment, m.NbLinesOfCode, m.NbLinesOfComment }
// Methods where %Comment < 20 and that have
// at least 20 lines of code might need to be more commented.
// See the definition of the Comments metric here
// http://www.ndepend.com/Metrics.aspx#PercentageComment
// http://www.ndepend.com/Metrics.aspx#NbLinesOfComment
21 methods matched
methods | Percentage Comment | # lines of code (LOC) | # lines of comment | Full Name |
---|---|---|---|---|
SetValues(Int32) | 0 | 30 | 0 | Laboratory.Module.Converter.SetValues (Int32) |
CalculateButton_Click(Object,EventArgs) | 0 | 25 | 0 | Laboratory.Module.NumberChecker .CalculateButton_Click(Object,EventArgs) |
DrawCube() | 0 | 32 | 0 | B_Geometry.Form1.DrawCube() |
Equality2equalMatrices() | 0 | 22 | 0 | MathosTest.VectorsAndMatrices .Equality2equalMatrices() |
TestRootsOf() | 0 | 23 | 0 | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest.TestRootsOf() |
.ctor(Matrix,Int32,Int32) | 0 | 21 | 0 | Mathos.Matrix..ctor(Matrix,Int32,Int32) |
Mode(List<Decimal>) | 0 | 21 | 0 | Mathos.Statistics.StatisticalProcedures .Mode(List<Decimal>) |
LinearRegression(List<Decimal>,List <Decimal>) | 0 | 24 | 0 | Mathos.Statistics.LinearModels .LinearRegression(List<Decimal>,List <Decimal>) |
.ctor(String) | 0 | 23 | 0 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(String) |
CalculateButton_Click(Object,EventArgs) | 2 | 42 | 1 | Laboratory.Module.Converter .CalculateButton_Click(Object,EventArgs) |
Integrate(Func<Double,Double>,Double ,Double ,IntegralCalculus+IntegrationAlgorithm ,Double) | 3 | 28 | 1 | Mathos.Calculus.IntegralCalculus .Integrate(Func<Double,Double>,Double ,Double ,IntegralCalculus+IntegrationAlgorithm ,Double) |
ToCondensedSternBrocotSystem(String) | 4 | 23 | 1 | Mathos.Arithmetic.Fractions.Fraction .ToCondensedSternBrocotSystem(String) |
button1_Click(Object,EventArgs) | 5 | 50 | 3 | B_Geometry.Form1.button1_Click(Object ,EventArgs) |
.ctor() | 9 | 28 | 3 | Interactive_Mathematics.MainWindow..ctor () |
Calculate() | 10 | 36 | 4 | Laboratory.Module.IntegralApproximation .Calculate() |
RREF() | 10 | 42 | 5 | Mathos.Matrix.RREF() |
.ctor(List<Int32>,List<Double>) | 12 | 28 | 4 | B_Geometry.BasisFunction..ctor(List <Int32>,List<Double>) |
.ctor() | 12 | 28 | 4 | RubyInt.MainWindow..ctor() |
<Page_Load>b__b(Decimal[]) | 12 | 22 | 3 | ProjectWebsite._Default+< >c__DisplayClass1f.<Page_Load>b__b (Decimal[]) |
<Page_Load>b__c(Decimal[]) | 17 | 28 | 6 | ProjectWebsite._Default+< >c__DisplayClass1f.<Page_Load>b__c (Decimal[]) |
<Page_Load>b__a(Decimal[]) | 19 | 21 | 5 | ProjectWebsite._Default+< >c__DisplayClass1f.<Page_Load>b__a (Decimal[]) |
Statistics
Stat | Percentage Comment | # lines of code (LOC) | # lines of comment |
---|---|---|---|
Sum: | 115 | 597 | 40 |
Average: | 5.48 | 28.43 | 1.9 |
Minimum: | 0 | 21 | 0 |
Maximum: | 19 | 50 | 6 |
Standard deviation: | 6.12 | 7.79 | 2.04 |
Variance: | 37.49 | 60.72 | 4.18 |
Rule warning: Methods with too many parameters |
warnif count > 0 from m in JustMyCode.Methods where
m.NbParameters > 5
orderby m.NbParameters descending
select new { m, m.NbParameters }
// Methods where NbParameters > 5 might be painful to call
// and might degrade performance. You should prefer using
// additional properties/fields to the declaring type to
// handle numerous states. Another alternative is to provide
// a class or structure dedicated to handle arguments passing
// (for example see the class System.Diagnostics.ProcessStartInfo
// and the method System.Diagnostics.Process.Start(ProcessStartInfo))
// See the definition of the NbParameters metric here
// http://www.ndepend.com/Metrics.aspx#NbParameters
3 methods matched
methods | # Parameters | Full Name |
---|---|---|
.ctor(Double,Double,Double,Double,Double ,Double) | 6 | B_Geometry.GeomBox..ctor(Double,Double ,Double,Double,Double,Double) |
SystemOfTwoEquations(Double,Double ,Double,Double,Double,Double) | 6 | Mathos.EquationSolver .SystemOfTwoEquations(Double,Double ,Double,Double,Double,Double) |
.ctor(Double,Double,Double,Double,Double ,Double) | 6 | Mathos.Geometry.Shapes.Triangle..ctor (Double,Double,Double,Double,Double ,Double) |
Statistics
Stat | # Parameters |
---|---|
Sum: | 18 |
Average: | 6 |
Minimum: | 6 |
Maximum: | 6 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Methods with too many overloads |
warnif count > 0 from m in JustMyCode.Methods where
m.NbOverloads > 6 &&
!m.IsOperator // Don't report operator overload
orderby m.NbOverloads descending
select new { m, m.NbOverloads }
// Methods where NbOverloads > 6 might
// be a problem to maintain and provoke higher coupling
// than necessary.
// This might also reveal a potential misused of the
// C# and VB.NET language that since C#3 and VB9 support
// object initialization. This feature helps reducing the number
// of constructors of a class.
// See the definition of the NbOverloads metric here
// http://www.ndepend.com/Metrics.aspx#NbOverloads
9 methods matched
methods | # Overloads | Full Name |
---|---|---|
.ctor(Int64) | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Int64) |
.ctor(Decimal) | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Decimal) |
.ctor(Double) | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Double) |
.ctor(Int32,Int32) | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Int32,Int32) |
.ctor(Decimal,Decimal) | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Decimal,Decimal) |
.ctor(Double,Double) | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Double,Double) |
.ctor(Fraction,Fraction) | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Fraction,Fraction) |
.ctor(String) | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(String) |
.ctor(Complex) | 9 | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Complex) |
Statistics
Stat | # Overloads |
---|---|
Sum: | 81 |
Average: | 9 |
Minimum: | 9 |
Maximum: | 9 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Types with too many methods |
warnif count > 0 from t in JustMyCode.Types
// Optimization: Fast discard of non-relevant types
where t.Methods.Count() > 20
// Don't match these methods
let methods = t.Methods.Where(
m => !(m.IsConstructor || m.IsClassConstructor ||
m.IsGeneratedByCompiler ||
m.IsPropertyGetter || m.IsPropertySetter ||
m.IsEventAdder || m.IsEventRemover))
where methods.Count() > 20
orderby methods.Count() descending
select new { t,
nbMethods = methods.Count(),
instanceMethods = methods.Where(m => !m.IsStatic),
staticMethods = methods.Where(m => m.IsStatic)}
// Types where number of methods is greater than 20
// might be hard to understand and maintain
// but there might be cases where it is relevant
// to have a high number of methods.
// For example, the System.Windows.Forms.DataGridView
// standard class has more than 1000 methods.
6 types matched
types | nbMethods | instanceMethods | staticMethods | Full Name |
---|---|---|---|---|
Matrix | 32 | 14 methods | 18 methods | Mathos.Matrix |
UncertainNumber | 29 | 12 methods | 17 methods | Mathos.Statistics.UncertainNumber |
Fraction | 29 | 10 methods | 19 methods | Mathos.Arithmetic.Fractions.Fraction |
SyntaxExtension | 27 | 0 method | 27 methods | Mathos.Syntax.SyntaxExtension |
StatisticalProcedures | 23 | 0 method | 23 methods | Mathos.Statistics.StatisticalProcedures |
SingleArithmetic | 21 | 0 method | 21 methods | Mathos.Arithmetic.SingleArithmetic |
Statistics
Stat | nbMethods | instanceMethods | staticMethods |
---|---|---|---|
Sum: | 161 | 0 | 0 |
Average: | 26.83 | 0 | 0 |
Minimum: | 21 | 0 | 0 |
Maximum: | 32 | 0 | 0 |
Standard deviation: | 3.76 | 0 | 0 |
Variance: | 14.14 | 0 | 0 |
Rule warning: Types with too many fields |
warnif count > 0 from t in JustMyCode.Types where
t.Fields.Count() > 20 &&
!t.IsEnumeration
orderby t.Fields.Count() descending
select new { t, t.InstanceFields, t.StaticFields, t.SizeOfInst }
// Types where Fields.Count() > 20 and not IsEnumeration
// might be hard to understand and maintain
// but there might be cases where it is relevant
// to have a high number of fields.
// For example, the System.Windows.Forms.Control
// standard class has more than 200 fields.
1 types matched
type | InstanceFields | StaticFields | Size of instance | Full Name |
---|---|---|---|---|
MathematicalConstants | 0 field | 21 fields | N/A | Mathos.Arithmetic.MathematicalConstants |
Statistics
Stat | InstanceFields | StaticFields | Size of instance |
---|---|---|---|
Sum: | 0 | 0 | 0 |
Average: | 0 | 0 | 0 |
Minimum: | 0 | 0 | 0 |
Maximum: | 0 | 0 | 0 |
Standard deviation: | 0 | 0 | 0 |
Variance: | 0 | 0 | 0 |
Rule warning: Types with poor cohesion |
warnif count > 0 from t in JustMyCode.Types where
(t.LCOM > 0.8 || t.LCOMHS > 0.95) &&
t.NbFields > 10 &&
t.NbMethods >10
orderby t.LCOM descending, t.LCOMHS descending
select new { t, t.LCOM, t.LCOMHS,
t.NbMethods, t.NbFields }
// Types where LCOM > 0.8 and NbFields > 10
// and NbMethods >10 might be problematic.
// However, it is very hard to avoid such
// non-cohesive types. The LCOMHS metric
// is often considered as more efficient to
// detect non-cohesive types.
// See the definition of the LCOM metric here
// http://www.ndepend.com/Metrics.aspx#LCOM
2 types matched
types | Lack of Cohesion Of Methods (LCOM) | LCOM Henderson-Sellers (LCOMHS) | # Methods | # Fields | Full Name |
---|---|---|---|---|---|
MainWindow | 0.85 | 0.9 | 21 | 19 | RubyInt.MainWindow |
_Default | 0.67 | 1.33 | 14 | 15 | ProjectWebsite._Default |
Statistics
Stat | Lack of Cohesion Of Methods (LCOM) | LCOM Henderson-Sellers (LCOMHS) | # Methods | # Fields |
---|---|---|---|---|
Sum: | 1.52 | 2.24 | 35 | 34 |
Average: | 0.76 | 1.12 | 17.5 | 17 |
Minimum: | 0.67 | 0.9 | 14 | 15 |
Maximum: | 0.85 | 1.33 | 21 | 19 |
Standard deviation: | 0.094 | 0.21 | 3.5 | 2 |
Variance: | 0.0088 | 0.046 | 12.25 | 4 |
Object Oriented Design | 670 |
|
Rule warning: Class with no descendant should be sealed if possible |
warnif count > 0 from t in JustMyCode.Types where
t.IsClass &&
t.NbChildren ==0 &&
!t.IsSealed &&
!t.IsStatic
// && !t.IsPublic <-- You might want to add this condition
// if you are developing a framework
// with classes that are intended to be
// sub-classed by your clients.
orderby t.NbLinesOfCode descending
select new { t, t.NbLinesOfCode }
115 types matched
types | # lines of code (LOC) | Full Name |
---|---|---|
Matrix | 249 | Mathos.Matrix |
Form1 | 170 | B_Geometry.Form1 |
VectorsAndMatrices | 166 | MathosTest.VectorsAndMatrices |
MainWindow | 122 | RubyInt.MainWindow |
UncertainNumber | 112 | Mathos.Statistics.UncertainNumber |
MainWindow | 99 | Interactive_Mathematics.MainWindow |
BasisFunction | 98 | B_Geometry.BasisFunction |
Shapes | 98 | MathosTest.Shapes |
BGeomMatrix | 96 | B_Geometry.BGeomMatrix |
TestofcomplexNumbers | 96 | MathosTest.TestofcomplexNumbers |
Triangle | 93 | Mathos.Geometry.Shapes.Triangle |
DoubleArthimeticTest | 90 | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest |
IntegralApproximation | 88 | Laboratory.Module.IntegralApproximation |
_Default | 87 | ProjectWebsite._Default |
GeomUtils | 85 | B_Geometry.GeomUtils |
Vector | 84 | Mathos.Vector |
Vector | 83 | B_Geometry.Vector |
Converter | 75 | Laboratory.Module.Converter |
TestOfFractions | 75 | MathosTest.TestOfFractions |
Get | 70 | Mathos.Arithmetic.Numbers.Get |
Statistics | 57 | MathosTest.Statistics |
Uncertainty | 52 | MathosTest.Uncertainty.Uncertainty |
ComplexArithmeticTest | 50 | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest |
ConverterTest | 48 | MathosTest.ConverterTest |
LinearAlgebra | 45 | B_Geometry.LinearAlgebra |
BCurve | 41 | B_Geometry.BCurve |
Fibonacci | 41 | Mathos.PreCalculus.Sequences.Fibonacci |
DiceSimulator | 40 | Mathos.Statistics.DiceSimulator |
Trapezoid | 39 | Mathos.Geometry.Shapes.Trapezoid |
DiscreteMathematics | 38 | MathosTest.DiscreteMathematics |
FiniteCalculusTest | 38 | MathosTest.Mathos_Main.Calculus .FiniteCalculusTest |
EquationSolver | 35 | Laboratory.Module.EquationSolver |
Extension | 33 | RubyInt.Extension |
RightCircularCone | 31 | Mathos.Geometry.Shapes.RightCircularCone |
RightCircularCylinder | 31 | Mathos.Geometry.Shapes .RightCircularCylinder |
RectangularPrism | 31 | Mathos.Geometry.Shapes.RectangularPrism |
AngleConversionM | 30 | Mathos.Converter.AngleConversionM |
SquarePyramid | 29 | Mathos.Geometry.Shapes.SquarePyramid |
Uncertainty | 28 | Laboratory.Module.Uncertainty |
coordinateStruct | 28 | MathosTest.coordinateStruct |
CalculusTest | 27 | MathosTest.Calculus.CalculusTest |
Rectangle | 27 | Mathos.Geometry.Shapes.Rectangle |
Cube | 26 | Mathos.Geometry.Shapes.Cube |
Circle | 26 | Mathos.Geometry.Shapes.Circle |
RightTriangle | 26 | Mathos.Geometry.Shapes.RightTriangle |
Parallelogram | 26 | Mathos.Geometry.Shapes.Parallelogram |
NumberChecker | 25 | Laboratory.Module.NumberChecker |
WebForm1 | 24 | Laboratory.Module.DataAnalysis.WebForm1 |
ElementaryTests | 24 | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests |
HelpWindow | 24 | RubyInt.HelpWindow |
Square | 24 | Mathos.Geometry.Shapes.Square |
PythagoreanTest | 23 | MathosTest.PythagoreanTest |
Sphere | 23 | Mathos.Geometry.Shapes.Sphere |
StatisticalDistributions | 20 | MathosTest.Mathos_Main .StatisticalDistributions |
FinanceNetPresentValue | 18 | Laboratory.Module.Finance .FinanceNetPresentValue |
LinearRegression | 17 | Laboratory.Module.DataAnalysis .LinearRegression |
FinanceTest | 17 | MathosTest.FinanceTest |
Check | 17 | Mathos.Arithmetic.Numbers.Check |
Triangle | 16 | Laboratory.Module.Triangle |
DataViewWindow | 16 | RubyInt.DataViewWindow |
Calculate | 16 | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Calculate |
BenchmarkUtil | 15 | Mathos.Testing.BenchmarkUtil |
Ring | 15 | Mathos.Geometry.Shapes.Ring |
GeometricProgression | 15 | Mathos.PreCalculus.Sequences .GeometricProgression |
FinanceRemainingBalanceOfAnnuity | 14 | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity |
Program | 14 | B_Geometry.New.Program |
GammaTests | 14 | MathosTest.Mathos_Main.SpecialFunctions .GammaTests |
Ellipse | 14 | Mathos.Geometry.Shapes.Ellipse |
GeomBox | 13 | B_Geometry.GeomBox |
TemperatureConversion | 13 | Mathos.Converter.TemperatureConversion |
LinearModels+LinearRegressionResults | 13 | Mathos.Statistics .LinearModels+LinearRegressionResults |
FinanceAnnuityPaymentFutureValue | 12 | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue |
FinanceAnnuityPaymentPresentValue | 12 | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue |
FinanceFutureValue | 12 | Laboratory.Module.Finance .FinanceFutureValue |
FinanceFutureValueOfAnAnnuity | 12 | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity |
FinancePresentValue | 12 | Laboratory.Module.Finance .FinancePresentValue |
FinancePresentValueOfAnAnnuity | 12 | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity |
DiceSimulatorTest | 12 | MathosTest.DiceSimulatorTest |
SyntaxTest | 12 | MathosTest.Mathos_Main.SyntaxTest |
ArithmeticProgression | 11 | Mathos.PreCalculus.Sequences .ArithmeticProgression |
EquationSolverTest | 10 | MathosTest.EquationSolverTest |
LinearModelsTest | 10 | MathosTest.LinearModelsTest |
Torus | 10 | Mathos.Geometry.Shapes.Torus |
Factorial | 9 | Laboratory.Module.Factorial |
PreCalculus | 9 | MathosTest.PreCalculus |
Statistics+Literals | 7 | MathosTest.Statistics+Literals |
MyCompletionData | 7 | RubyInt.MyCompletionData |
Register | 6 | Laboratory.Account.Register |
TolerantUtilities | 6 | B_Geometry.TolerantUtilities |
Convert | 6 | Mathos.Arithmetic.Numbers.Convert |
App | 5 | RubyInt.App |
FrmTable | 5 | Interactive_Mathematics.FrmTable |
SingleArthimeticTest | 4 | MathosTest.Mathos_Main.Arithmetic .SingleArthimeticTest |
DenominatorNullException | 4 | Mathos.Exceptions .DenominatorNullException |
InvalidCoordinateFormat | 4 | Mathos.Exceptions .InvalidCoordinateFormat |
InvalidFractionFormatException | 4 | Mathos.Exceptions .InvalidFractionFormatException |
InvalidTriangleException | 4 | Mathos.Exceptions .InvalidTriangleException |
ResultsWindow | 3 | RubyInt.ResultsWindow |
ConversionInfo | 3 | Mathos.Converter.ConversionInfo |
ConversionBase | 3 | Mathos.Converter.ConversionBase |
Statistics
Stat | # lines of code (LOC) |
---|---|
Sum: | 3 740 |
Average: | 32.52 |
Minimum: | 0 |
Maximum: | 249 |
Standard deviation: | 40.25 |
Variance: | 1 620 |
Rule warning: A stateless class or structure might be turned into a static type |
// This rule indicates stateless types that might
// eventually be turned into static classes.
warnif count > 0 from t in JustMyCode.Types where
!t.IsStatic &&
!t.IsGeneric &&
t.InstanceFields.Count() == 0 &&
// Don't match:
// --> types that implement some interfaces.
t.NbInterfacesImplemented == 0 &&
// --> or classes that have sub-classes children.
t.NbChildren == 0 &&
// --> or classes that have a base class
((t.IsClass && t.DepthOfDeriveFrom("System.Object".AllowNoMatch()) == 1) ||
t.IsStructure)
select t
37 types matched
types | Full Name |
---|---|
GeometryVisUtils | B_Geometry.GeometryVisUtils |
GeomUtils | B_Geometry.GeomUtils |
LinearAlgebra | B_Geometry.LinearAlgebra |
Program | B_Geometry.New.Program |
TestofcomplexNumbers | MathosTest.TestofcomplexNumbers |
PreCalculus | MathosTest.PreCalculus |
DiceSimulatorTest | MathosTest.DiceSimulatorTest |
DiscreteMathematics | MathosTest.DiscreteMathematics |
coordinateStruct | MathosTest.coordinateStruct |
EquationSolverTest | MathosTest.EquationSolverTest |
FinanceTest | MathosTest.FinanceTest |
LinearModelsTest | MathosTest.LinearModelsTest |
PythagoreanTest | MathosTest.PythagoreanTest |
Shapes | MathosTest.Shapes |
ConverterTest | MathosTest.ConverterTest |
VectorsAndMatrices | MathosTest.VectorsAndMatrices |
TestOfFractions | MathosTest.TestOfFractions |
Statistics | MathosTest.Statistics |
Statistics+Literals | MathosTest.Statistics+Literals |
CalculusTest | MathosTest.Calculus.CalculusTest |
UnitTest1 | MathosTest.SpecialFunctions.UnitTest1 |
Uncertainty | MathosTest.Uncertainty.Uncertainty |
StatisticalDistributions | MathosTest.Mathos_Main .StatisticalDistributions |
SyntaxTest | MathosTest.Mathos_Main.SyntaxTest |
DoubleArthimeticTest | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest |
IntegerArthimeticTest | MathosTest.Mathos_Main.Arithmetic .IntegerArthimeticTest |
DecimalArithmetic | MathosTest.Mathos_Main.Arithmetic .DecimalArithmetic |
FiniteCalculusTest | MathosTest.Mathos_Main.Calculus .FiniteCalculusTest |
ElementaryTests | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests |
GammaTests | MathosTest.Mathos_Main.SpecialFunctions .GammaTests |
BenchmarkUtil | Mathos.Testing.BenchmarkUtil |
AngleConversionM | Mathos.Converter.AngleConversionM |
TemperatureConversion | Mathos.Converter.TemperatureConversion |
Check | Mathos.Arithmetic.Numbers.Check |
Get | Mathos.Arithmetic.Numbers.Get |
Convert | Mathos.Arithmetic.Numbers.Convert |
Calculate | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Calculate |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Non-static classes should be instantiated or turned to static |
// Notice that classes only instantiated through reflection, like plug-in root classes
// are matched by this rules.
warnif count > 0
from t in JustMyCode.Types
where t.IsClass &&
//!t.IsPublic && // if you are developing a framework,
// you might not want to match public classes
!t.IsStatic &&
!t.IsAttributeClass && // Attributes class are never seen as instantiated
!t.DeriveFrom("System.MarshalByRefObject".AllowNoMatch()) // Types instantiated through remoting infrastructure
// find the first constructor of t called
let ctorCalled = t.Constructors.FirstOrDefault(ctor => ctor.NbMethodsCallingMe > 0)
// match t if none of its constructors is called.
where ctorCalled == null
select new { t, t.Visibility }
73 types matched
types | Visibility | Full Name |
---|---|---|
About | Public | Laboratory.About |
Default | Public | Laboratory.Default |
Global | Public | Laboratory.Global |
Modules | Public | Laboratory.Modules |
SiteMaster | Public | Laboratory.SiteMaster |
ChangePassword | Public | Laboratory.Account.ChangePassword |
ChangePasswordSuccess | Public | Laboratory.Account.ChangePasswordSuccess |
Login | Public | Laboratory.Account.Login |
Register | Public | Laboratory.Account.Register |
Converter | Public | Laboratory.Module.Converter |
EquationSolver | Public | Laboratory.Module.EquationSolver |
Factorial | Public | Laboratory.Module.Factorial |
IntegralApproximation | Public | Laboratory.Module.IntegralApproximation |
MConverter | Public | Laboratory.Module.MConverter |
NumberChecker | Public | Laboratory.Module.NumberChecker |
Triangle | Public | Laboratory.Module.Triangle |
Uncertainty | Public | Laboratory.Module.Uncertainty |
LinearRegression | Public | Laboratory.Module.DataAnalysis .LinearRegression |
WebForm1 | Public | Laboratory.Module.DataAnalysis.WebForm1 |
FinanceAnnuityPaymentFutureValue | Public | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue |
FinanceAnnuityPaymentPresentValue | Public | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue |
FinanceFutureValue | Public | Laboratory.Module.Finance .FinanceFutureValue |
FinanceFutureValueOfAnAnnuity | Public | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity |
FinanceNetPresentValue | Public | Laboratory.Module.Finance .FinanceNetPresentValue |
FinancePresentValue | Public | Laboratory.Module.Finance .FinancePresentValue |
FinancePresentValueOfAnAnnuity | Public | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity |
FinanceRemainingBalanceOfAnnuity | Public | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity |
Form1 | Public | B_Geometry.Form1 |
GeomBox | Public | B_Geometry.GeomBox |
GeometryVisUtils | Public | B_Geometry.GeometryVisUtils |
GeomUtils | Internal | B_Geometry.GeomUtils |
LinearAlgebra | Public | B_Geometry.LinearAlgebra |
Program | Public | B_Geometry.New.Program |
TestofcomplexNumbers | Public | MathosTest.TestofcomplexNumbers |
PreCalculus | Public | MathosTest.PreCalculus |
DiceSimulatorTest | Public | MathosTest.DiceSimulatorTest |
DiscreteMathematics | Public | MathosTest.DiscreteMathematics |
coordinateStruct | Public | MathosTest.coordinateStruct |
EquationSolverTest | Public | MathosTest.EquationSolverTest |
FinanceTest | Public | MathosTest.FinanceTest |
LinearModelsTest | Public | MathosTest.LinearModelsTest |
PythagoreanTest | Public | MathosTest.PythagoreanTest |
Shapes | Public | MathosTest.Shapes |
ConverterTest | Public | MathosTest.ConverterTest |
VectorsAndMatrices | Public | MathosTest.VectorsAndMatrices |
TestOfFractions | Public | MathosTest.TestOfFractions |
Statistics | Public | MathosTest.Statistics |
Statistics+Literals | Private | MathosTest.Statistics+Literals |
CalculusTest | Public | MathosTest.Calculus.CalculusTest |
UnitTest1 | Public | MathosTest.SpecialFunctions.UnitTest1 |
Uncertainty | Public | MathosTest.Uncertainty.Uncertainty |
StatisticalDistributions | Public | MathosTest.Mathos_Main .StatisticalDistributions |
SyntaxTest | Public | MathosTest.Mathos_Main.SyntaxTest |
ComplexArithmeticTest | Public | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest |
DoubleArthimeticTest | Public | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest |
IntegerArthimeticTest | Public | MathosTest.Mathos_Main.Arithmetic .IntegerArthimeticTest |
SingleArthimeticTest | Public | MathosTest.Mathos_Main.Arithmetic .SingleArthimeticTest |
DecimalArithmetic | Public | MathosTest.Mathos_Main.Arithmetic .DecimalArithmetic |
FiniteCalculusTest | Public | MathosTest.Mathos_Main.Calculus .FiniteCalculusTest |
ElementaryTests | Public | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests |
GammaTests | Public | MathosTest.Mathos_Main.SpecialFunctions .GammaTests |
MainWindow | Public | RubyInt.MainWindow |
_Default | Public | ProjectWebsite._Default |
MainWindow | Public | Interactive_Mathematics.MainWindow |
BenchmarkUtil | Public | Mathos.Testing.BenchmarkUtil |
AngleConversionM | Public | Mathos.Converter.AngleConversionM |
TemperatureConversion | Public | Mathos.Converter.TemperatureConversion |
NumberList | Public | Mathos.Statistics.NumberList |
Check | Public | Mathos.Arithmetic.Numbers.Check |
Get | Public | Mathos.Arithmetic.Numbers.Get |
Convert | Public | Mathos.Arithmetic.Numbers.Convert |
Calculate | Public | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Calculate |
Fibonacci | Public | Mathos.PreCalculus.Sequences.Fibonacci |
Statistics
Stat | Visibility |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Methods should be declared static if possible |
warnif count > 0
// When an instance method can be safely declared as static you should declare it as static.
// Since it doesn't use any instance data and method of its type and base-types,
// you should consider if such a method could be moved to a static utility class
// or if it is strongly related enough to its current declaring type to stay in it.
//
// Turning an instance method into a static method is a micro performance optimization
// since a static method is a bit cheaper to invoke than an instance method.
from t in JustMyCode.Types.Where(t =>
!t.IsStatic && !t.IsInterface &&
!t.IsEnumeration && !t.IsDelegate &&
!t.IsGeneratedByCompiler)
let methodsThatCanBeMadeStatic =
from m in t.InstanceMethods
// An instance method can be turned to static if it is not virtual,
// not using the this reference and also, not using
// any of its class or base classes instance fields or instance methods.
where !m.IsAbstract && !m.IsVirtual &&
!m.AccessThis && !m.IsExplicitInterfaceImpl &&
// Optimization: Using FirstOrDefault() avoid to check all members,
// as soon as one member is found
// we know the method m cannot be made static.
m.MembersUsed.FirstOrDefault(
mUsed => !mUsed.IsStatic &&
(mUsed.ParentType == t ||
t.DeriveFrom(mUsed.ParentType))
) == null
select m
from m in methodsThatCanBeMadeStatic
let staticFieldsUsed = m.ParentType.StaticFields.UsedBy(m).Where(f => !f.IsGeneratedByCompiler)
select new { m, staticFieldsUsed }
229 methods matched
methods | staticFieldsUsed | Full Name |
---|---|---|
Page_Load(Object,EventArgs) | 0 field | Laboratory.About.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Default.Page_Load(Object ,EventArgs) |
Application_Start(Object,EventArgs) | 0 field | Laboratory.Global.Application_Start (Object,EventArgs) |
Application_End(Object,EventArgs) | 0 field | Laboratory.Global.Application_End(Object ,EventArgs) |
Application_Error(Object,EventArgs) | 0 field | Laboratory.Global.Application_Error (Object,EventArgs) |
Session_Start(Object,EventArgs) | 0 field | Laboratory.Global.Session_Start(Object ,EventArgs) |
Session_End(Object,EventArgs) | 0 field | Laboratory.Global.Session_End(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Modules.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.SiteMaster.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Account.ChangePassword .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Account.ChangePasswordSuccess .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.EquationSolver .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Factorial.Page_Load (Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.IntegralApproximation .Page_Load(Object,EventArgs) |
EvaluateExpression(String,Double) | 0 field | Laboratory.Module.IntegralApproximation .EvaluateExpression(String,Double) |
IntegrateUsingRectangleMethod(String ,Decimal,Decimal,Decimal) | 0 field | Laboratory.Module.IntegralApproximation .IntegrateUsingRectangleMethod(String ,Decimal,Decimal,Decimal) |
IntegrateUsingTrapezoidalRule(String ,Decimal,Decimal,Decimal) | 0 field | Laboratory.Module.IntegralApproximation .IntegrateUsingTrapezoidalRule(String ,Decimal,Decimal,Decimal) |
IntegrateUsingSimpsonsRule(String ,Decimal,Decimal,Decimal) | 0 field | Laboratory.Module.IntegralApproximation .IntegrateUsingSimpsonsRule(String ,Decimal,Decimal,Decimal) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.NumberChecker .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Triangle.Page_Load (Object,EventArgs) |
ToDoubleC(String) | 0 field | Laboratory.Module.Triangle.ToDoubleC (String) |
pow(Decimal,Decimal) | 0 field | Laboratory.Module.Uncertainty.pow (Decimal,Decimal) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.DataAnalysis .LinearRegression.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.DataAnalysis.WebForm1 .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceFutureValue.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity.Page_Load (Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceNetPresentValue.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinancePresentValue.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity .Page_Load(Object,EventArgs) |
glControl1_MouseUp(Object,MouseEventArgs ) | 1 field | B_Geometry.Form1.glControl1_MouseUp (Object,MouseEventArgs) |
glControl1_MouseDown(Object ,MouseEventArgs) | 2 fields | B_Geometry.Form1.glControl1_MouseDown (Object,MouseEventArgs) |
button1_Click(Object,EventArgs) | 1 field | B_Geometry.Form1.button1_Click(Object ,EventArgs) |
DrawCurve(Double) | 1 field | B_Geometry.Form1.DrawCurve(Double) |
DrawCube() | 0 field | B_Geometry.Form1.DrawCube() |
AreApproximatelyEqual(Double,Double) | 0 field | MathosTest.TestofcomplexNumbers .AreApproximatelyEqual(Double,Double) |
IsApproximatelyZero(Double) | 0 field | MathosTest.TestofcomplexNumbers .IsApproximatelyZero(Double) |
ComplexNumberConstructorsWithNonZeroValu edParameters() | 0 field | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithNonZeroVal uedParameters() |
ComplexNumberConstructorsWithZeroValuedP arameters() | 0 field | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithZeroValued Parameters() |
TestEqualityOfComplexNos() | 0 field | MathosTest.TestofcomplexNumbers .TestEqualityOfComplexNos() |
TestAdditionOfComplexNos() | 0 field | MathosTest.TestofcomplexNumbers .TestAdditionOfComplexNos() |
TestSubtractionOfComplexNos() | 0 field | MathosTest.TestofcomplexNumbers .TestSubtractionOfComplexNos() |
TestMultiplicationOfComplexNos() | 0 field | MathosTest.TestofcomplexNumbers .TestMultiplicationOfComplexNos() |
TestComplexFractionFromString() | 0 field | MathosTest.TestofcomplexNumbers .TestComplexFractionFromString() |
CalculateSum() | 0 field | MathosTest.PreCalculus.CalculateSum() |
ArithmeticProgression() | 0 field | MathosTest.PreCalculus .ArithmeticProgression() |
GeometricProgression() | 0 field | MathosTest.PreCalculus .GeometricProgression() |
DiceDiff() | 0 field | MathosTest.DiceSimulatorTest.DiceDiff() |
Find() | 0 field | MathosTest.DiscreteMathematics.Find() |
FindLargePrimes() | 0 field | MathosTest.DiscreteMathematics .FindLargePrimes() |
Factorial() | 0 field | MathosTest.DiscreteMathematics.Factorial () |
Remainder() | 0 field | MathosTest.DiscreteMathematics.Remainder () |
FactorialBigIntegerTest() | 0 field | MathosTest.DiscreteMathematics .FactorialBigIntegerTest() |
OtherStuff() | 0 field | MathosTest.DiscreteMathematics .OtherStuff() |
IsDivisibleBy() | 0 field | MathosTest.DiscreteMathematics .IsDivisibleBy() |
GetFactors() | 0 field | MathosTest.DiscreteMathematics .GetFactors() |
CoordinateBasic() | 0 field | MathosTest.coordinateStruct .CoordinateBasic() |
TestingExtensionMethods() | 0 field | MathosTest.coordinateStruct .TestingExtensionMethods() |
TestVisualRepresentation() | 0 field | MathosTest.coordinateStruct .TestVisualRepresentation() |
QuadraticEquationExTest() | 0 field | MathosTest.EquationSolverTest .QuadraticEquationExTest() |
QuadraticEquationTest() | 0 field | MathosTest.EquationSolverTest .QuadraticEquationTest() |
SystemOfTwoEquationsTest() | 0 field | MathosTest.EquationSolverTest .SystemOfTwoEquationsTest() |
FutureValue() | 0 field | MathosTest.FinanceTest.FutureValue() |
PresentValue() | 0 field | MathosTest.FinanceTest.PresentValue() |
NetPresentValue() | 0 field | MathosTest.FinanceTest.NetPresentValue() |
PresentValueOfAnnuity() | 0 field | MathosTest.FinanceTest .PresentValueOfAnnuity() |
FutureValueOfAnnuity() | 0 field | MathosTest.FinanceTest .FutureValueOfAnnuity() |
AnnuityPaymentPresentValue() | 0 field | MathosTest.FinanceTest .AnnuityPaymentPresentValue() |
AnnuityPaymentFutureValue() | 0 field | MathosTest.FinanceTest .AnnuityPaymentFutureValue() |
RemainingBalanceOfAnnuity() | 0 field | MathosTest.FinanceTest .RemainingBalanceOfAnnuity() |
PredictionTest() | 0 field | MathosTest.LinearModelsTest .PredictionTest() |
TestDiff() | 0 field | MathosTest.LinearModelsTest.TestDiff() |
FindHypotenuse() | 0 field | MathosTest.PythagoreanTest .FindHypotenuse() |
FindHypotenuseValidateInputs() | 0 field | MathosTest.PythagoreanTest .FindHypotenuseValidateInputs() |
FindNonHypotenuse() | 0 field | MathosTest.PythagoreanTest .FindNonHypotenuse() |
FindNonHypotenuseValidateInputs() | 0 field | MathosTest.PythagoreanTest .FindNonHypotenuseValidateInputs() |
CircleTest() | 0 field | MathosTest.Shapes.CircleTest() |
CubeTest() | 0 field | MathosTest.Shapes.CubeTest() |
ParallelogramTest() | 0 field | MathosTest.Shapes.ParallelogramTest() |
RectangleTest() | 0 field | MathosTest.Shapes.RectangleTest() |
RectangularPrismTest() | 0 field | MathosTest.Shapes.RectangularPrismTest() |
RightCircularConeTest() | 0 field | MathosTest.Shapes.RightCircularConeTest( ) |
RightCircularCylinderTest() | 0 field | MathosTest.Shapes .RightCircularCylinderTest() |
SphereTest() | 0 field | MathosTest.Shapes.SphereTest() |
SquareTest() | 0 field | MathosTest.Shapes.SquareTest() |
SquarePyramidTest() | 0 field | MathosTest.Shapes.SquarePyramidTest() |
TrapezoidTest() | 0 field | MathosTest.Shapes.TrapezoidTest() |
RightTriangleTest() | 0 field | MathosTest.Shapes.RightTriangleTest() |
TriangleTest() | 0 field | MathosTest.Shapes.TriangleTest() |
LengthConversion() | 0 field | MathosTest.ConverterTest .LengthConversion() |
SpeedConversion() | 0 field | MathosTest.ConverterTest.SpeedConversion () |
MassConversion() | 0 field | MathosTest.ConverterTest.MassConversion( ) |
VolumeConversion() | 0 field | MathosTest.ConverterTest .VolumeConversion() |
AreaConversion() | 0 field | MathosTest.ConverterTest.AreaConversion( ) |
PressureConversion() | 0 field | MathosTest.ConverterTest .PressureConversion() |
PowerConversion() | 0 field | MathosTest.ConverterTest.PowerConversion () |
BaseConversions() | 0 field | MathosTest.ConverterTest.BaseConversions () |
UnitConverterTest() | 0 field | MathosTest.ConverterTest .UnitConverterTest() |
Statistics
Stat | staticFieldsUsed |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Constructor should not call a virtual methods |
// Returns constructor of a non-sealed type calling virtual methods.
// In such a situation, if a derived class overrides the method,
// then the override method will be called before the derived constructor.
// This makes the class fragile to derive from.
//
// Violations reported can be solved by re-designing object initialisation
// or by marking the parent class as sealed, if possible.
warnif count > 0
from t in Application.Types where
t.IsClass &&
!t.IsGeneratedByCompiler &&
!t.IsSealed
from ctor in t.Constructors
let virtualMethodsCalled = from mCalled in ctor.MethodsCalled
where mCalled.IsVirtual &&
(mCalled.ParentType == t ||
t.DeriveFrom(mCalled.ParentType))
select mCalled
where virtualMethodsCalled.Count() > 0
select new { ctor ,
virtualMethodsCalled,
// If there is no derived type, it might be
// an opportunity to mark t as sealed.
t.DerivedTypes }
6 methods matched
methods | virtualMethodsCalled | DerivedTypes | Full Name |
---|---|---|---|
.ctor() | 1 method | 0 type | RubyInt.HelpWindow..ctor() |
.ctor() | 1 method | 0 type | RubyInt.ResultsWindow..ctor() |
.ctor(MainWindow) | 1 method | 0 type | RubyInt.DataViewWindow..ctor(MainWindow) |
.ctor() | 1 method | 0 type | RubyInt.MainWindow..ctor() |
.ctor() | 1 method | 0 type | Interactive_Mathematics.FrmTable..ctor() |
.ctor() | 1 method | 0 type | Interactive_Mathematics.MainWindow..ctor () |
Statistics
Stat | virtualMethodsCalled | DerivedTypes |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Don't assign static fields from instance methods |
// Assigning static fields from instance methods leads to
// poorly maintainable and non thread-safe code.
// It is advised to assign static fields inline or from class constructor.
warnif count > 0
from f in Application.Fields where
f.IsStatic &&
!f.IsLiteral &&
!f.IsInitOnly &&
!f.IsGeneratedByCompiler &&
// Contract API define such a insideContractEvaluation static field
f.Name != "insideContractEvaluation"
let assignedBy = f.MethodsAssigningMe.Where(m => !m.IsStatic)
where assignedBy .Count() > 0
select new { f, assignedBy }
2 fields matched
fields | assignedBy | Full Name |
---|---|---|
session_curve | 1 method | B_Geometry.Form1.session_curve |
mouse_clicked | 2 methods | B_Geometry.Form1.mouse_clicked |
Statistics
Stat | assignedBy |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Avoid empty interfaces |
warnif count > 0 from t in JustMyCode.Types where
t.IsInterface &&
t.NbMethods == 0
select new { t, t.TypesThatImplementMe }
// Interfaces define members that provide a behavior
// or usage contract. The functionality described by
// the interface can be adopted by any type,
// regardless of where the type appears in the
// inheritance hierarchy. A type implements an
// interface by providing implementations for the
// interface's members. An empty interface does not
// define any members, and as such, does not define
// a contract that can be implemented.
// If your design includes empty interfaces that
// types are expected to implement, you are probably
// using an interface as a marker, or a way of
// identifying a group of types. If this identification
// will occur at runtime, the correct way to accomplish
// this is to use a custom attribute. Use the presence
// or absence of the attribute, or the attribute's
// properties, to identify the target types. If the
// identification must occurs at compile time, then using
// an empty interface is acceptable.
7 types matched
types | TypesThatImplementMe | Full Name |
---|---|---|
INaturalNumber | 5 types | Mathos.Arithmetic.Numbers.INaturalNumber |
IInteger | 4 types | Mathos.Arithmetic.Numbers.IInteger |
IRationalNumber | 3 types | Mathos.Arithmetic.Numbers .IRationalNumber |
IIRationalNumber | 2 types | Mathos.Arithmetic.Numbers .IIRationalNumber |
IRealNumber | 1 type | Mathos.Arithmetic.Numbers.IRealNumber |
IImaginary | 1 type | Mathos.Arithmetic.Numbers.IImaginary |
IComplex | 0 type | Mathos.Arithmetic.Numbers.IComplex |
Statistics
Stat | TypesThatImplementMe |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Design | 770 |
|
Rule warning: Types with disposable instance fields must be disposable |
warnif count > 0
// Several IDisposable type can be found if several .NET Fx are referenced.
let iDisposables = ThirdParty.Types.WithFullName("System.IDisposable")
where iDisposables.Any() // in case the code base doesn't use at all System.IDisposable
from t in Application.Types.Except(Application.Types.ThatImplementAny(iDisposables))
where !t.IsGeneratedByCompiler
let instanceFieldsDisposable =
t.InstanceFields.Where(f => f.FieldType != null &&
f.FieldType.InterfacesImplemented.Intersect(iDisposables).Any())
where instanceFieldsDisposable.Any()
select new { t, instanceFieldsDisposable }
1 types matched
type | instanceFieldsDisposable | Full Name |
---|---|---|
Form1 | 1 field | B_Geometry.Form1 |
Statistics
Stat | instanceFieldsDisposable |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Classes that are candidate to be turned into structures |
//
// CAUTION: Before applying this rule, make sure to understand
// the implication of transforming a class into a structure.
// http://msdn.microsoft.com/en-us/library/aa664471(v=vs.71).aspx
//
// Int32, Double or Boolean are structures and not classes.
// Structure are particularly suited to implement lightweight values.
// Hence a class is candidate to be turned into a structure
// when its instances are lightweight values.
//
warnif count > 0 from t in JustMyCode.Types where
t.IsClass &&
!t.IsGeneratedByCompiler &&
!t.IsStatic &&
t.SizeOfInst > 0 &&
t.SizeOfInst <= 16 && // Structure instance must not be too big,
// else it degrades performance.
t.NbChildren == 0 && // Must not have children
// Must not implement interfaces to avoid boxing mismatch
// when structures implements interfaces.
t.InterfacesImplemented.Count() == 0 &&
// Must have no base class
t.DepthOfDeriveFrom("System.Object".AllowNoMatch()) == 1
select new { t, t.SizeOfInst, t.InstanceFields } // Must derive directly from System.Object
// && t.IsSealed <-- You might want to add this condition
// to restraint the set.
// && t.IsImmutable <-- Structures should be immutable type.
// && t.!IsPublic <-- You might want to add this condition if
// you are developping a framework with classes
// that are intended to be sub-classed by
// your clients.
16 types matched
types | Size of instance | InstanceFields | Full Name |
---|---|---|---|
BCurve | 16 | 4 fields | B_Geometry.BCurve |
BGeomMatrix | 12 | 3 fields | B_Geometry.BGeomMatrix |
TolerantUtilities | 8 | 1 field | B_Geometry.TolerantUtilities |
Vector | 9 | 3 fields | B_Geometry.Vector |
ComplexArithmeticTest | 8 | 1 field | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest |
SingleArthimeticTest | 4 | 1 field | MathosTest.Mathos_Main.Arithmetic .SingleArthimeticTest |
Extension | 4 | 1 field | RubyInt.Extension |
Vector | 4 | 1 field | Mathos.Vector |
Matrix | 4 | 1 field | Mathos.Matrix |
ConversionInfo | 12 | 2 fields | Mathos.Converter.ConversionInfo |
ConversionBase | 5 | 2 fields | Mathos.Converter.ConversionBase |
DiceSimulator | 16 | 4 fields | Mathos.Statistics.DiceSimulator |
NumberList | 4 | 1 field | Mathos.Statistics.NumberList |
ArithmeticProgression | 16 | 2 fields | Mathos.PreCalculus.Sequences .ArithmeticProgression |
GeometricProgression | 16 | 2 fields | Mathos.PreCalculus.Sequences .GeometricProgression |
Fibonacci | 8 | 2 fields | Mathos.PreCalculus.Sequences.Fibonacci |
Statistics
Stat | Size of instance | InstanceFields |
---|---|---|
Sum: | 146 | 0 |
Average: | 9.12 | 0 |
Minimum: | 4 | 0 |
Maximum: | 16 | 0 |
Standard deviation: | 4.73 | 0 |
Variance: | 22.36 | 0 |
Rule warning: Avoid namespaces with few types |
warnif count > 0 from n in JustMyCode.Namespaces
let types = n.ChildTypes.Where(t => !t.IsGeneratedByCompiler)
where
types.Count() < 5
orderby types.Count() ascending
select new { n, types }
// Make sure that there is a logical organization
// to each of your namespaces, and that there is a
// valid reason for putting types in a sparsely
// populated namespace. Namespaces should contain
// types that are used together in most scenarios.
// When their applications are mutually exclusive,
// types should be located in separate namespaces
26 namespaces matched
namespaces | types | Full Name |
---|---|---|
B_Geometry.New | 1 type | B_Geometry.New |
MathosTest.Calculus | 1 type | MathosTest.Calculus |
MathosTest.SpecialFunctions | 1 type | MathosTest.SpecialFunctions |
MathosTest.Uncertainty | 1 type | MathosTest.Uncertainty |
MathosTest.Properties | 1 type | MathosTest.Properties |
MathosTest.Mathos_Main.Calculus | 1 type | MathosTest.Mathos_Main.Calculus |
ProjectWebsite | 1 type | ProjectWebsite |
Mathos.Testing | 1 type | Mathos.Testing |
Mathos.Finance | 1 type | Mathos.Finance |
Mathos.Syntax | 1 type | Mathos.Syntax |
Mathos.Arithmetic.Fractions | 1 type | Mathos.Arithmetic.Fractions |
Mathos.Geometry | 1 type | Mathos.Geometry |
Laboratory.Module.DataAnalysis | 2 types | Laboratory.Module.DataAnalysis |
B_Geometry.Properties | 2 types | B_Geometry.Properties |
MathosTest.Mathos_Main | 2 types | MathosTest.Mathos_Main |
MathosTest.Mathos_Main.SpecialFunctions | 2 types | MathosTest.Mathos_Main.SpecialFunctions |
RubyInt.Properties | 2 types | RubyInt.Properties |
Interactive_Mathematics.Properties | 2 types | Interactive_Mathematics.Properties |
Mathos.Arithmetic.ComplexNumbers | 2 types | Mathos.Arithmetic.ComplexNumbers |
Mathos.Geometry.CoordinateGeometry .TwoDimensional | 2 types | Mathos.Geometry.CoordinateGeometry .TwoDimensional |
Interactive_Mathematics | 3 types | Interactive_Mathematics |
Mathos | 3 types | Mathos |
Mathos.PreCalculus.Sequences | 3 types | Mathos.PreCalculus.Sequences |
Laboratory.Account | 4 types | Laboratory.Account |
Mathos.SpecialFunctions | 4 types | Mathos.SpecialFunctions |
Mathos.Exceptions | 4 types | Mathos.Exceptions |
Statistics
Stat | types |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Nested types should not be visible |
warnif count > 0 from t in JustMyCode.Types where
t.IsNested &&
!t.IsGeneratedByCompiler &&
!t.IsPrivate
select new { t, t.NbLinesOfCode, t.Visibility }
// A nested type is a type declared within the
// scope of another type. Nested types are useful
// for encapsulating private implementation details
// of the containing type. Used for this purpose,
// nested types should not be externally visible.
// Do not use externally visible nested types for
// logical grouping or to avoid name collisions;
// instead, use namespaces.
5 types matched
types | # lines of code (LOC) | Visibility | Full Name |
---|---|---|---|
IntegralCalculus+IntegrationAlgorithm | N/A | Public | Mathos.Calculus .IntegralCalculus+IntegrationAlgorithm |
LinearModels+LinearRegressionResults | 13 | Public | Mathos.Statistics .LinearModels+LinearRegressionResults |
UncertainNumber+UncertaintyType | N/A | Public | Mathos.Statistics .UncertainNumber+UncertaintyType |
MathematicalConstants+Single | 0 | Public | Mathos.Arithmetic .MathematicalConstants+Single |
PhysicalConstants+SI | 0 | Public | Mathos.Arithmetic.PhysicalConstants+SI |
Statistics
Stat | # lines of code (LOC) | Visibility |
---|---|---|
Sum: | 13 | 0 |
Average: | 4.33 | 0 |
Minimum: | 0 | 0 |
Maximum: | 13 | 0 |
Standard deviation: | 6.13 | 0 |
Variance: | 37.56 | 0 |
Rule warning: Instances size shouldn't be too big |
warnif count > 0 from t in JustMyCode.Types where
t.SizeOfInst > 64
orderby t.SizeOfInst descending
select new { t, t.SizeOfInst, t.InstanceFields }
// Types where SizeOfInst > 64 might degrade performance
// (depending on the number of instances created at runtime)
// and might be hard to maintain. However it is not a rule
// since sometime there is no alternative (the size of
// instances of the System.Net.NetworkInformation.SystemIcmpV6Statistics
// standard class is 2064 bytes).
// Notice that a class with a large SizeOfInst value
// doesn't necessarily have a lot of instance fields.
// It might derive from a class with a large SizeOfInst value.
// See the definition of the SizeOfInst metric here
// http://www.ndepend.com/Metrics.aspx#SizeOfInst
37 types matched
types | Size of instance | InstanceFields | Full Name |
---|---|---|---|
MainWindow | 491 | 7 fields | Interactive_Mathematics.MainWindow |
HelpWindow | 479 | 4 fields | RubyInt.HelpWindow |
DataViewWindow | 475 | 3 fields | RubyInt.DataViewWindow |
FrmTable | 475 | 3 fields | Interactive_Mathematics.FrmTable |
ResultsWindow | 471 | 2 fields | RubyInt.ResultsWindow |
EquationSolver | 426 | 17 fields | Laboratory.Module.EquationSolver |
IntegralApproximation | 426 | 17 fields | Laboratory.Module.IntegralApproximation |
Converter | 394 | 9 fields | Laboratory.Module.Converter |
Triangle | 394 | 9 fields | Laboratory.Module.Triangle |
LinearRegression | 394 | 9 fields | Laboratory.Module.DataAnalysis .LinearRegression |
FinanceRemainingBalanceOfAnnuity | 390 | 8 fields | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity |
Uncertainty | 386 | 7 fields | Laboratory.Module.Uncertainty |
FinanceAnnuityPaymentFutureValue | 386 | 7 fields | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue |
FinanceAnnuityPaymentPresentValue | 386 | 7 fields | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue |
FinanceFutureValue | 386 | 7 fields | Laboratory.Module.Finance .FinanceFutureValue |
FinanceFutureValueOfAnAnnuity | 386 | 7 fields | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity |
FinanceNetPresentValue | 386 | 7 fields | Laboratory.Module.Finance .FinanceNetPresentValue |
FinancePresentValue | 386 | 7 fields | Laboratory.Module.Finance .FinancePresentValue |
FinancePresentValueOfAnAnnuity | 386 | 7 fields | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity |
NumberChecker | 382 | 6 fields | Laboratory.Module.NumberChecker |
Factorial | 378 | 5 fields | Laboratory.Module.Factorial |
WebForm1 | 374 | 4 fields | Laboratory.Module.DataAnalysis.WebForm1 |
_Default | 370 | 3 fields | ProjectWebsite._Default |
Login | 366 | 2 fields | Laboratory.Account.Login |
Register | 366 | 2 fields | Laboratory.Account.Register |
Default | 362 | 1 field | Laboratory.Default |
Modules | 362 | 1 field | Laboratory.Modules |
ChangePassword | 362 | 1 field | Laboratory.Account.ChangePassword |
MConverter | 362 | 1 field | Laboratory.Module.MConverter |
About | 358 | 0 field | Laboratory.About |
ChangePasswordSuccess | 358 | 0 field | Laboratory.Account.ChangePasswordSuccess |
Form1 | 319 | 4 fields | B_Geometry.Form1 |
App | 112 | 1 field | RubyInt.App |
MainWindow | 112 | 19 fields | RubyInt.MainWindow |
App | 111 | 0 field | Interactive_Mathematics.App |
Global | 109 | 0 field | Laboratory.Global |
_Default+<>c__DisplayClass1f | 70 | 13 fields | ProjectWebsite._Default+< >c__DisplayClass1f |
Statistics
Stat | Size of instance | InstanceFields |
---|---|---|
Sum: | 13 136 | 0 |
Average: | 355.03 | 0 |
Minimum: | 70 | 0 |
Maximum: | 491 | 0 |
Standard deviation: | 106.88 | 0 |
Variance: | 11 423 | 0 |
Rule warning: Don't use obsolete types, methods or fields |
warnif count > 0
let obsoleteTypes = Types.Where(t => t.IsObsolete)
let obsoleteMethods = Methods.Where(m => m.IsObsolete).ToHashSet()
let obsoleteFields = Fields.Where(f => f.IsObsolete)
from m in JustMyCode.Methods.UsingAny(obsoleteTypes).Union(
JustMyCode.Methods.UsingAny(obsoleteMethods)).Union(
JustMyCode.Methods.UsingAny(obsoleteFields))
let obsoleteTypesUsed = obsoleteTypes.UsedBy(m)
// Optimization: MethodsCalled + Intersect() is faster than using obsoleteMethods.UsedBy()
let obsoleteMethodsUsed = m.MethodsCalled.Intersect(obsoleteMethods)
let obsoleteFieldsUsed = obsoleteFields.UsedBy(m)
select new { m, obsoleteTypesUsed, obsoleteMethodsUsed, obsoleteFieldsUsed }
62 methods matched
methods | obsoleteTypesUsed | obsoleteMethodsUsed | obsoleteFieldsUsed | Full Name |
---|---|---|---|---|
SolveQuadraticEquation_Click(Object ,EventArgs) | 1 type | 1 method | 0 field | Laboratory.Module.EquationSolver .SolveQuadraticEquation_Click(Object ,EventArgs) |
AreApproximatelyEqual(ComplexNumber ,ComplexNumber) | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .AreApproximatelyEqual(ComplexNumber ,ComplexNumber) |
ComplexNumberConstructorsWithNonZeroValu edParameters() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithNonZeroVal uedParameters() |
ComplexNumberConstructorsWithZeroValuedP arameters() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithZeroValued Parameters() |
TestEqualityOfComplexNos() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .TestEqualityOfComplexNos() |
TestAdditionOfComplexNos() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .TestAdditionOfComplexNos() |
TestSubtractionOfComplexNos() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .TestSubtractionOfComplexNos() |
TestMultiplicationOfComplexNos() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .TestMultiplicationOfComplexNos() |
TestComplexNosToString() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .TestComplexNosToString() |
TestComplexFractionFromString() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .TestComplexFractionFromString() |
TestComplexNumberOperationSqrt() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .TestComplexNumberOperationSqrt() |
TestPolar() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers .TestPolar() |
TestLog() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers.TestLog( ) |
TestExp() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers.TestExp( ) |
TestPow() | 1 type | 0 method | 0 field | MathosTest.TestofcomplexNumbers.TestPow( ) |
QuadraticEquationTest() | 1 type | 1 method | 0 field | MathosTest.EquationSolverTest .QuadraticEquationTest() |
QuadraticEquation(Double,Double,Double) | 1 type | 0 method | 0 field | Mathos.EquationSolver.QuadraticEquation (Double,Double,Double) |
QuadraticEquation(ComplexNumber ,ComplexNumber,ComplexNumber) | 1 type | 0 method | 0 field | Mathos.EquationSolver.QuadraticEquation (ComplexNumber,ComplexNumber ,ComplexNumber) |
get_realPart() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.get_realPart() |
set_realPart(Double) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.set_realPart(Double) |
get_imaginaryPart() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.get_imaginaryPart() |
set_imaginaryPart(Double) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.set_imaginaryPart(Double) |
get_Modulus() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.get_Modulus() |
get_Argument() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.get_Argument() |
get_IsReal() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.get_IsReal() |
get_IsPureImaginary() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.get_IsPureImaginary() |
get_Conjugate() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.get_Conjugate() |
.ctor(Int64) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Int64) |
.ctor(Decimal) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Decimal) |
.ctor(Double) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Double) |
.ctor(Int32,Int32) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Int32,Int32) |
.ctor(Decimal,Decimal) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Decimal,Decimal) |
.ctor(Double,Double) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Double,Double) |
.ctor(Fraction,Fraction) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Fraction,Fraction) |
.ctor(String) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(String) |
.ctor(Complex) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber..ctor(Complex) |
op_Implicit(String) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(String) |
op_Implicit(Int16) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Int16) |
op_Implicit(Int32) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Int32) |
op_Implicit(Int64) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Int64) |
op_Implicit(Double) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Double) |
op_Implicit(Decimal) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Decimal) |
op_Implicit(Complex) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Implicit(Complex) |
ToString() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.ToString() |
Equals(Object) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.Equals(Object) |
op_Equality(ComplexNumber,ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Equality(ComplexNumber ,ComplexNumber) |
op_Inequality(ComplexNumber ,ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Inequality (ComplexNumber,ComplexNumber) |
op_Addition(ComplexNumber,ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Addition(ComplexNumber ,ComplexNumber) |
op_Subtraction(ComplexNumber ,ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Subtraction (ComplexNumber,ComplexNumber) |
op_Multiply(ComplexNumber,ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Multiply(ComplexNumber ,ComplexNumber) |
op_Division(ComplexNumber,ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.op_Division(ComplexNumber ,ComplexNumber) |
FromPolar(Double,Double) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.FromPolar(Double,Double) |
get_I() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.get_I() |
get_One() | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexNumber.get_One() |
AbsSquared(ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexOperation.AbsSquared (ComplexNumber) |
LogOfAbs(ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexOperation.LogOfAbs(ComplexNumber ) |
Sqrt(Double) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexOperation.Sqrt(Double) |
Sqrt(ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexOperation.Sqrt(ComplexNumber) |
Log(ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexOperation.Log(ComplexNumber) |
Exp(ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexOperation.Exp(ComplexNumber) |
Pow(ComplexNumber,ComplexNumber) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexOperation.Pow(ComplexNumber ,ComplexNumber) |
Roots(ComplexNumber,Int32) | 1 type | 0 method | 0 field | Mathos.Arithmetic.ComplexNumbers .ComplexOperation.Roots(ComplexNumber ,Int32) |
Statistics
Stat | obsoleteTypesUsed | obsoleteMethodsUsed | obsoleteFieldsUsed |
---|---|---|---|
Sum: | 0 | 0 | 0 |
Average: | 0 | 0 | 0 |
Minimum: | 0 | 0 | 0 |
Maximum: | 0 | 0 | 0 |
Standard deviation: | 0 | 0 | 0 |
Variance: | 0 | 0 | 0 |
Rule warning: Don't forget to implement methods that throw NotImplementedException |
warnif count > 0
from m in Application.Methods
where m.CreateA("System.NotImplementedException".AllowNoMatch())
select m
21 methods matched
methods | Full Name |
---|---|
Log(Complex) | Mathos.Calculus.Elementary.Log(Complex) |
Exp(Complex) | Mathos.Calculus.Elementary.Exp(Complex) |
Erfi(Complex) | Mathos.SpecialFunctions.Antiderivatives .Erfi(Complex) |
Airy(Double) | Mathos.SpecialFunctions.Bessel.Airy (Double) |
BesselJ(Double,Double) | Mathos.SpecialFunctions.Bessel.BesselJ (Double,Double) |
BesselJ(Double,Int32) | Mathos.SpecialFunctions.Bessel.BesselJ (Double,Int32) |
BesselY(Double,Double) | Mathos.SpecialFunctions.Bessel.BesselY (Double,Double) |
BesselY(Double,Int32) | Mathos.SpecialFunctions.Bessel.BesselY (Double,Int32) |
BesselI(Double,Double) | Mathos.SpecialFunctions.Bessel.BesselI (Double,Double) |
BesselK(Double,Double) | Mathos.SpecialFunctions.Bessel.BesselK (Double,Double) |
Hankel1(Double,Double) | Mathos.SpecialFunctions.Bessel.Hankel1 (Double,Double) |
Hankel2(Double,Double) | Mathos.SpecialFunctions.Bessel.Hankel2 (Double,Double) |
EllipticF(Double,Double) | Mathos.SpecialFunctions.Elliptic .EllipticF(Double,Double) |
EllipticE(Double,Double) | Mathos.SpecialFunctions.Elliptic .EllipticE(Double,Double) |
EllipticPi(Double,Double) | Mathos.SpecialFunctions.Elliptic .EllipticPi(Double,Double) |
EllipticK(Double) | Mathos.SpecialFunctions.Elliptic .EllipticK(Double) |
EllipticE(Double) | Mathos.SpecialFunctions.Elliptic .EllipticE(Double) |
EllipticPi(Int32,Double) | Mathos.SpecialFunctions.Elliptic .EllipticPi(Int32,Double) |
Sn(Double,Double) | Mathos.SpecialFunctions.Elliptic.Sn (Double,Double) |
Cn(Double,Double) | Mathos.SpecialFunctions.Elliptic.Cn (Double,Double) |
Dn(Double,Double) | Mathos.SpecialFunctions.Elliptic.Dn (Double,Double) |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Architecture and Layering | 720 |
|
Rule warning: Avoid namespaces dependency cycles |
warnif count > 0
// This query lists all application namespace dependency cycles.
// Each row shows a different cycle, prefixed with a namespace entangled in the cycle.
//
// To browse a cycle on the dependency graph or the dependency matrix, right click
// a cycle cell and export the matched namespaces to the dependency graph or matrix!
//
// In the matrix, dependency cycles are represented with red squares and black cells.
// To easily browse dependency cycles, the Matrix comes with an option:
// --> Display Direct and Indirect Dependencies
//
// Read our white books relative to partitioning code,
// to know more about namespaces dependency cycles, and why avoiding them
// is a simple but efficient solution to architecture for your code base.
// http://www.ndepend.com/WhiteBooks.aspx
// Optimization: restraint application assemblies set
// If some namespaces are mutually dependent
// - They must be declared in the same assembly
// - The parent assembly must ContainsNamespaceDependencyCycle
from assembly in Application.Assemblies
.Where(a => a.ContainsNamespaceDependencyCycle != null &&
a.ContainsNamespaceDependencyCycle.Value)
// Optimization: restraint namespaces set
// A namespace involved in a cycle necessarily have a null Level.
let namespacesSuspect = assembly.ChildNamespaces.Where(n => n.Level == null)
// hashset is used to avoid iterating again on namespaces already caught in a cycle.
let hashset = new HashSet<INamespace>()
from suspect in namespacesSuspect
// By commenting in this line, the query matches all namespaces involved in a cycle.
where !hashset.Contains(suspect)
// Define 2 code metrics
// - Namespaces depth of is using indirectly the suspect namespace.
// - Namespaces depth of is used by the suspect namespace indirectly.
// Note: for direct usage the depth is equal to 1.
let namespacesUserDepth = namespacesSuspect.DepthOfIsUsing(suspect)
let namespacesUsedDepth = namespacesSuspect.DepthOfIsUsedBy(suspect)
// Select namespaces that are both using and used by namespaceSuspect
let usersAndUsed = from n in namespacesSuspect where
namespacesUserDepth[n] > 0 &&
namespacesUsedDepth[n] > 0
select n
where usersAndUsed.Count() > 0
// Here we've found namespace(s) both using and used by the suspect namespace.
// A cycle involving the suspect namespace is found!
let cycle = usersAndUsed.Append(suspect)
// Fill hashset with namespaces in the cycle.
// .ToArray() is needed to force the iterating process.
let unused1 = (from n in cycle let unused2 = hashset.Add(n) select n).ToArray()
select new { suspect, cycle }
1 namespaces matched
namespace | cycle | Full Name |
---|---|---|
Mathos | 4 namespaces | Mathos |
Statistics
Stat | cycle |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Assemblies with poor cohesion (RelationalCohesion) |
warnif count > 0 from a in Application.Assemblies where
a.NbTypes > 20 && // Relational Cohesion metrics is relevant only if there are several types
(a.RelationalCohesion < 1.5 ||
a.RelationalCohesion > 4.0)
select new { a, a.NbTypes, a.RelationalCohesion }
// As classes inside an assembly should be strongly related,
// the cohesion should be high. On the other hand, a value
// which is too high may indicate over-coupling. A good range
// for RelationalCohesion is 1.5 to 4.0.
// See the definition of the RelationalCohesion metric here
// http://www.ndepend.com/Metrics.aspx#RelationalCohesion
3 assemblies matched
assemblies | # Types | Relational cohesion | Full Name |
---|---|---|---|
Laboratory | 28 | 0.11 | Laboratory |
MathosTest | 31 | 0.16 | MathosTest |
Mathos | 100 | 1.11 | Mathos |
Statistics
Stat | # Types | Relational cohesion |
---|---|---|
Sum: | 159 | 1.38 |
Average: | 53 | 0.46 |
Minimum: | 28 | 0.11 |
Maximum: | 100 | 1.11 |
Standard deviation: | 33.26 | 0.46 |
Variance: | 1 106 | 0.21 |
Dead Code | 202 |
|
Critical Rule warning: Potentially dead Methods |
warnif count > 0
// Filter procedure for methods that should'nt be considered as dead
let canMethodBeConsideredAsDeadProc = new Func<IMethod, bool>(
m => !m.IsPubliclyVisible && // Public methods might be used by client applications of your assemblies.
!m.IsEntryPoint && // Main() method is not used by-design.
!m.IsExplicitInterfaceImpl && // The IL code never explicitely calls explicit interface methods implementation.
!m.IsClassConstructor && // The IL code never explicitely calls class constructors.
!m.IsFinalizer && // The IL code never explicitely calls finalizers.
!m.IsVirtual && // Only check for non virtual method that are not seen as used in IL.
!(m.IsConstructor && // Don't take account of protected ctor that might be call by a derived ctors.
m.IsProtected) &&
!m.IsEventAdder && // The IL code never explicitely calls events adder/remover.
!m.IsEventRemover &&
!m.IsGeneratedByCompiler &&
!m.ParentType.IsDelegate &&
// Methods tagged with these two attributes are called by the serialization infrastructure.
!m.HasAttribute("System.Runtime.Serialization.OnSerializingAttribute".AllowNoMatch()) &&
!m.HasAttribute("System.Runtime.Serialization.OnDeserializedAttribute".AllowNoMatch()) &&
// If you don't want to link NDepend.API.dll, you can use your own IsNotDeadCodeAttribute and adapt this rule.
!m.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()))
// Get methods unused
let methodsUnused =
from m in JustMyCode.Methods where
m.NbMethodsCallingMe == 0 &&
canMethodBeConsideredAsDeadProc(m)
select m
// Dead methods = methods used only by unused methods (recursive)
let deadMethodsMetric = methodsUnused.FillIterative(
methods => // Unique loop, just to let a chance to build the hashset.
from o in (new object()).ToEnumerable()
// Use a hashet to make Intersect calls much faster!
let hashset = methods.ToHashSet()
from m in codeBase.Application.Methods.UsedByAny(methods).Except(methods)
where canMethodBeConsideredAsDeadProc(m) &&
// Select methods called only by methods already considered as dead
hashset.Intersect(m.MethodsCallingMe).Count() == m.NbMethodsCallingMe
select m)
from m in JustMyCode.Methods.Intersect(deadMethodsMetric.DefinitionDomain)
select new { m, m.MethodsCallingMe, depth = deadMethodsMetric[m] }
14 methods matched
methods | MethodsCallingMe | depth | Full Name |
---|---|---|---|
Application_Start(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Application_Start (Object,EventArgs) |
Application_End(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Application_End(Object ,EventArgs) |
Application_Error(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Application_Error (Object,EventArgs) |
Session_Start(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Session_Start(Object ,EventArgs) |
Session_End(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Session_End(Object ,EventArgs) |
IntegrateUsingRectangleMethod(String ,Decimal,Decimal,Decimal) | 0 method | 0 | Laboratory.Module.IntegralApproximation .IntegrateUsingRectangleMethod(String ,Decimal,Decimal,Decimal) |
IntegrateUsingTrapezoidalRule(String ,Decimal,Decimal,Decimal) | 0 method | 0 | Laboratory.Module.IntegralApproximation .IntegrateUsingTrapezoidalRule(String ,Decimal,Decimal,Decimal) |
IntegrateUsingSimpsonsRule(String ,Decimal,Decimal,Decimal) | 0 method | 0 | Laboratory.Module.IntegralApproximation .IntegrateUsingSimpsonsRule(String ,Decimal,Decimal,Decimal) |
.ctor() | 0 method | 0 | B_Geometry.GeomUtils..ctor() |
.ctor() | 0 method | 0 | MathosTest.Statistics+Literals..ctor() |
AreApproximatelyEqual(Complex,Complex) | 0 method | 0 | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests.AreApproximatelyEqual (Complex,Complex) |
IsApproximatelyZero(Double) | 0 method | 0 | MathosTest.Mathos_Main.SpecialFunctions .GammaTests.IsApproximatelyZero(Double) |
Button_MouseEnter(Object,MouseEventArgs) | 0 method | 0 | RubyInt.HelpWindow.Button_MouseEnter (Object,MouseEventArgs) |
IsTriangle(Double,Double,Double) | 0 method | 0 | Mathos.Geometry.Shapes.Triangle .IsTriangle(Double,Double,Double) |
Statistics
Stat | MethodsCallingMe | depth |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Critical Rule warning: Potentially dead Fields |
warnif count > 0
from f in JustMyCode.Fields where
f.NbMethodsUsingMe == 0 &&
!f.IsPublic && // Although not recommended, public fields might be used by client applications of your assemblies.
!f.IsLiteral && // The IL code never explicitely uses literal fields.
!f.IsEnumValue && // The IL code never explicitely uses enumeration value.
f.Name != "value__" && // Field named 'value__' are relative to enumerations and the IL code never explicitely uses them.
!f.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()) &&
!f.IsGeneratedByCompiler
// If you don't want to link NDepend.API.dll, you can use your own IsNotDeadCodeAttribute and adapt this rule.
select f
38 fields matched
fields | Full Name |
---|---|
HyperLink1 | Laboratory.Default.HyperLink1 |
Table1 | Laboratory.Modules.Table1 |
HeadContent | Laboratory.SiteMaster.HeadContent |
NavigationMenu | Laboratory.SiteMaster.NavigationMenu |
MainContent | Laboratory.SiteMaster.MainContent |
ChangeUserPassword | Laboratory.Account.ChangePassword .ChangeUserPassword |
LoginUser | Laboratory.Account.Login.LoginUser |
RegisterUserWizardStep | Laboratory.Account.Register .RegisterUserWizardStep |
Panel1 | Laboratory.Module.Converter.Panel1 |
CalculateButton | Laboratory.Module.Converter .CalculateButton |
ErrorLabel | Laboratory.Module.Converter.ErrorLabel |
SolveSystemOfTwoEquation | Laboratory.Module.EquationSolver .SolveSystemOfTwoEquation |
SolveQuadraticEquation | Laboratory.Module.EquationSolver .SolveQuadraticEquation |
CalculateButton | Laboratory.Module.Factorial .CalculateButton |
Label1 | Laboratory.Module.IntegralApproximation .Label1 |
Label2 | Laboratory.Module.IntegralApproximation .Label2 |
CalculateButton | Laboratory.Module.IntegralApproximation .CalculateButton |
Label3 | Laboratory.Module.IntegralApproximation .Label3 |
Label4 | Laboratory.Module.IntegralApproximation .Label4 |
Label5 | Laboratory.Module.IntegralApproximation .Label5 |
returnvalue | Laboratory.Module.MConverter.returnvalue |
CalculateButton | Laboratory.Module.NumberChecker .CalculateButton |
ErrorLabel | Laboratory.Module.NumberChecker .ErrorLabel |
CalculateButton | Laboratory.Module.Triangle .CalculateButton |
CalculateButton | Laboratory.Module.Uncertainty .CalculateButton |
ErrorLabel | Laboratory.Module.Uncertainty.ErrorLabel |
Button1 | Laboratory.Module.DataAnalysis .LinearRegression.Button1 |
FindNthTerm | Laboratory.Module.DataAnalysis.WebForm1 .FindNthTerm |
Button1 | Laboratory.Module.DataAnalysis.WebForm1 .Button1 |
CalculateButton | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue .CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceFutureValue.CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity .CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceNetPresentValue.CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinancePresentValue.CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity .CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity .CalculateButton |
Calc | ProjectWebsite._Default.Calc |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Visibility | 380 |
|
Rule warning: Methods that could have a lower visibility |
// This rule tells which methods can be declared with a lower visibility.
// (like 'private' is a visibility lower than 'internal' which is lower than 'public').
// Reducing visibility is a good practice because this fosters encapsulation
// and with it maintainability and extensibility.
warnif count > 0 from m in JustMyCode.Methods where
m.Visibility != m.OptimalVisibility &&
!m.HasAttribute("NDepend.Attributes.CannotDecreaseVisibilityAttribute".AllowNoMatch()) &&
!m.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()) &&
// If you don't want to link NDepend.API.dll, you can use your own attributes and adapt this rule.
// Eliminate default constructor from the result.
// Whatever the visibility of the declaring class,
// default constructors are public and introduce noise
// in the current rule.
!( m.IsConstructor && m.IsPublic && m.NbParameters == 0) &&
// Don't decrease the visibility of Main() methods.
!m.IsEntryPoint
select new { m,
m.Visibility ,
CouldBeDeclared = m.OptimalVisibility,
m.MethodsCallingMe }
586 methods matched
methods | Visibility | CouldBeDeclared | MethodsCallingMe | Full Name |
---|---|---|---|---|
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.About.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Default.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Modules.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.SiteMaster.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Account.ChangePassword .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Account.ChangePasswordSuccess .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Account.Login.Page_Load (Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Account.Register.Page_Load (Object,EventArgs) |
RegisterUser_CreatedUser(Object ,EventArgs) | Protected | Private | 0 method | Laboratory.Account.Register .RegisterUser_CreatedUser(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Converter.Page_Load (Object,EventArgs) |
DropDownList1_SelectedIndexChanged (Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Converter .DropDownList1_SelectedIndexChanged (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Converter .CalculateButton_Click(Object,EventArgs) |
SetValues(Int32) | Protected | Private | 2 methods | Laboratory.Module.Converter.SetValues (Int32) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.EquationSolver .Page_Load(Object,EventArgs) |
SolveSystemOfTwoEquation_Click(Object ,EventArgs) | Protected | Private | 0 method | Laboratory.Module.EquationSolver .SolveSystemOfTwoEquation_Click(Object ,EventArgs) |
SolveQuadraticEquation_Click(Object ,EventArgs) | Protected | Private | 0 method | Laboratory.Module.EquationSolver .SolveQuadraticEquation_Click(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Factorial.Page_Load (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Factorial .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.IntegralApproximation .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.IntegralApproximation .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.MConverter.Page_Load (Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.NumberChecker .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.NumberChecker .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Triangle.Page_Load (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Triangle .CalculateButton_Click(Object,EventArgs) |
ToDoubleC(String) | Protected | Private | 1 method | Laboratory.Module.Triangle.ToDoubleC (String) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Uncertainty.Page_Load (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Uncertainty .CalculateButton_Click(Object,EventArgs) |
func(Decimal) | Public | Private | 1 method | Laboratory.Module.Uncertainty.func (Decimal) |
pow(Decimal,Decimal) | Public | Private | 1 method | Laboratory.Module.Uncertainty.pow (Decimal,Decimal) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.Page_Load(Object ,EventArgs) |
Button1_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.Button1_Click(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.DataAnalysis.WebForm1 .Page_Load(Object,EventArgs) |
FindNthTerm_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.DataAnalysis.WebForm1 .FindNthTerm_Click(Object,EventArgs) |
Button1_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.DataAnalysis.WebForm1 .Button1_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceFutureValue.Page_Load(Object ,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceFutureValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity.Page_Load (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceNetPresentValue.Page_Load(Object ,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceNetPresentValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinancePresentValue.Page_Load(Object ,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinancePresentValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity .CalculateButton_Click(Object,EventArgs) |
.ctor(List<Int32>,List<Double>) | Public | Private | 0 method | B_Geometry.BasisFunction..ctor(List <Int32>,List<Double>) |
.ctor(List<Double>) | Public | Internal | 1 method | B_Geometry.BasisFunction..ctor(List <Double>) |
.ctor(Double[]) | Public | Internal | 1 method | B_Geometry.BasisFunction..ctor(Double[]) |
ExpandKnots() | Public | Private | 2 methods | B_Geometry.BasisFunction.ExpandKnots() |
Evaluate(Int32,Int32,Double) | Public | Internal | 2 methods | B_Geometry.BasisFunction.Evaluate(Int32 ,Int32,Double) |
GetNKnots() | Public | Internal | 2 methods | B_Geometry.BasisFunction.GetNKnots() |
.ctor(Int32,List<Vector>,BasisFunction) | Public | Internal | 1 method | B_Geometry.BCurve..ctor(Int32,List <Vector>,BasisFunction) |
.ctor(Int32,Vector[],BasisFunction) | Public | Internal | 1 method | B_Geometry.BCurve..ctor(Int32,Vector[] ,BasisFunction) |
Evaluate(Double) | Public | Internal | 2 methods | B_Geometry.BCurve.Evaluate(Double) |
GetControlPoints() | Public | Private | 0 method | B_Geometry.BCurve.GetControlPoints() |
getElement(Int32,Int32) | Public | Internal | 6 methods | B_Geometry.BGeomMatrix.getElement(Int32 ,Int32) |
setElement(Int32,Int32,Double) | Public | Private | 4 methods | B_Geometry.BGeomMatrix.setElement(Int32 ,Int32,Double) |
.ctor(List<List<Double>>) | Public | Internal | 2 methods | B_Geometry.BGeomMatrix..ctor(List<List <Double>>) |
.ctor(Double[][]) | Public | Internal | 1 method | B_Geometry.BGeomMatrix..ctor(Double[][]) |
.ctor(Int32,Int32,Double[]) | Public | Private | 0 method | B_Geometry.BGeomMatrix..ctor(Int32,Int32 ,Double[]) |
GetRow(Int32) | Public | Internal | 2 methods | B_Geometry.BGeomMatrix.GetRow(Int32) |
GetColumn(Int32) | Public | Private | 0 method | B_Geometry.BGeomMatrix.GetColumn(Int32) |
GetNRows() | Public | Internal | 1 method | B_Geometry.BGeomMatrix.GetNRows() |
GetNColumns() | Public | Internal | 1 method | B_Geometry.BGeomMatrix.GetNColumns() |
FindPivot(Int32&) | Public | Private | 0 method | B_Geometry.BGeomMatrix.FindPivot(Int32&) |
FindPivot(Int32,Int32&,Double&) | Public | Private | 0 method | B_Geometry.BGeomMatrix.FindPivot(Int32 ,Int32&,Double&) |
DivideRowByScalar(Int32,Double) | Public | Private | 0 method | B_Geometry.BGeomMatrix.DivideRowByScalar (Int32,Double) |
RowSubtraction(Int32,Int32,Double) | Public | Private | 0 method | B_Geometry.BGeomMatrix.RowSubtraction (Int32,Int32,Double) |
ReplaceRow(Int32,Vector) | Public | Internal | 2 methods | B_Geometry.BGeomMatrix.ReplaceRow(Int32 ,Vector) |
glControl_Resize(Object,EventArgs) | Public | Private | 2 methods | B_Geometry.Form1.glControl_Resize(Object ,EventArgs) |
.ctor(Double,Double,Double,Double,Double ,Double) | Public | Private | 0 method | B_Geometry.GeomBox..ctor(Double,Double ,Double,Double,Double,Double) |
CentripetalMethod_createSplineByInterpol ation(Int32,Vector[],BCurve&) | Public | Internal | 1 method | B_Geometry.GeomUtils .CentripetalMethod_createSplineByInterpo lation(Int32,Vector[],BCurve&) |
GaussianElimination(BGeomMatrix,Vector ,Double[]&) | Public | Internal | 2 methods | B_Geometry.LinearAlgebra .GaussianElimination(BGeomMatrix,Vector ,Double[]&) |
EqualWithinTol(Double,Double) | Public | Internal | 6 methods | B_Geometry.TolerantUtilities .EqualWithinTol(Double,Double) |
GetTolerance() | Public | Internal | 1 method | B_Geometry.TolerantUtilities .GetTolerance() |
.ctor(Int32) | Public | Internal | 2 methods | B_Geometry.Vector..ctor(Int32) |
.ctor(Double[]) | Public | Internal | 4 methods | B_Geometry.Vector..ctor(Double[]) |
get_Elements() | Public | Internal | 10 methods | B_Geometry.Vector.get_Elements() |
set_Elements(Double[]) | Public | Private | 0 method | B_Geometry.Vector.set_Elements(Double[]) |
.ctor(List<Double>) | Public | Private | 3 methods | B_Geometry.Vector..ctor(List<Double>) |
VectorDimension() | Public | Internal | 10 methods | B_Geometry.Vector.VectorDimension() |
ScalarProduct(Double,Vector) | Public | Internal | 1 method | B_Geometry.Vector.ScalarProduct(Double ,Vector) |
ScalarProduct(Double) | Public | Internal | 2 methods | B_Geometry.Vector.ScalarProduct(Double) |
Subtract(Vector,Vector) | Public | Private | 0 method | B_Geometry.Vector.Subtract(Vector,Vector ) |
Subtract(Vector) | Public | Internal | 1 method | B_Geometry.Vector.Subtract(Vector) |
DotProduct(Vector) | Public | Private | 1 method | B_Geometry.Vector.DotProduct(Vector) |
GetLength() | Public | Internal | 1 method | B_Geometry.Vector.GetLength() |
ComplexNumberConstructorsWithNonZeroValu edParameters() | Public | Private | 0 method | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithNonZeroVal uedParameters() |
ComplexNumberConstructorsWithZeroValuedP arameters() | Public | Private | 0 method | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithZeroValued Parameters() |
TestEqualityOfComplexNos() | Public | Private | 0 method | MathosTest.TestofcomplexNumbers .TestEqualityOfComplexNos() |
TestAdditionOfComplexNos() | Public | Private | 0 method | MathosTest.TestofcomplexNumbers .TestAdditionOfComplexNos() |
TestSubtractionOfComplexNos() | Public | Private | 0 method | MathosTest.TestofcomplexNumbers .TestSubtractionOfComplexNos() |
TestMultiplicationOfComplexNos() | Public | Private | 0 method | MathosTest.TestofcomplexNumbers .TestMultiplicationOfComplexNos() |
TestComplexNosToString() | Public | Private | 0 method | MathosTest.TestofcomplexNumbers .TestComplexNosToString() |
Statistics
Stat | Visibility | CouldBeDeclared | MethodsCallingMe |
---|---|---|---|
Sum: | 0 | 0 | 0 |
Average: | 0 | 0 | 0 |
Minimum: | 0 | 0 | 0 |
Maximum: | 0 | 0 | 0 |
Standard deviation: | 0 | 0 | 0 |
Variance: | 0 | 0 | 0 |
Rule warning: Types that could have a lower visibility |
// This rule tells which types can be declared with a lower visibility.
// (like 'private' is a visibility lower than 'internal' which is lower than 'public').
// Reducing visibility is a good practice because this fosters encapsulation
// and with it maintainability and extensibility.
warnif count > 0 from t in JustMyCode.Types where
t.Visibility != t.OptimalVisibility &&
// If you don't want to link NDepend.API.dll, you can use your own attributes and adapt this rule.
!t.HasAttribute("NDepend.Attributes.CannotDecreaseVisibilityAttribute".AllowNoMatch()) &&
!t.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()) &&
// Static types that define only const fields cannot be seen as used in IL code.
// They don't have to be tagged with CannotDecreaseVisibilityAttribute.
!( t.IsStatic &&
!t.Methods.Any(m => !m.IsClassConstructor) &&
!t.Fields.Any(f => !f.IsLiteral && !(f.IsStatic && f.IsInitOnly))) &&
// A type used by an interface that has the same visibility
// cannot have its visibility decreased, else a compilation error occurs!
!t.TypesUsingMe.Any(tUser =>
tUser.IsInterface &&
tUser.Visibility == t.Visibility)
select new { t, t.Visibility ,
CouldBeDeclared = t.OptimalVisibility,
t.TypesUsingMe }
90 types matched
types | Visibility | CouldBeDeclared | TypesUsingMe | Full Name |
---|---|---|---|---|
About | Public | Internal | 0 type | Laboratory.About |
Default | Public | Internal | 0 type | Laboratory.Default |
Global | Public | Internal | 0 type | Laboratory.Global |
Modules | Public | Internal | 0 type | Laboratory.Modules |
SiteMaster | Public | Internal | 0 type | Laboratory.SiteMaster |
ChangePassword | Public | Internal | 0 type | Laboratory.Account.ChangePassword |
ChangePasswordSuccess | Public | Internal | 0 type | Laboratory.Account.ChangePasswordSuccess |
Login | Public | Internal | 0 type | Laboratory.Account.Login |
Register | Public | Internal | 0 type | Laboratory.Account.Register |
Converter | Public | Internal | 0 type | Laboratory.Module.Converter |
EquationSolver | Public | Internal | 0 type | Laboratory.Module.EquationSolver |
Factorial | Public | Internal | 0 type | Laboratory.Module.Factorial |
IntegralApproximation | Public | Internal | 1 type | Laboratory.Module.IntegralApproximation |
MConverter | Public | Internal | 0 type | Laboratory.Module.MConverter |
NumberChecker | Public | Internal | 0 type | Laboratory.Module.NumberChecker |
Triangle | Public | Internal | 0 type | Laboratory.Module.Triangle |
Uncertainty | Public | Internal | 0 type | Laboratory.Module.Uncertainty |
LinearRegression | Public | Internal | 0 type | Laboratory.Module.DataAnalysis .LinearRegression |
WebForm1 | Public | Internal | 0 type | Laboratory.Module.DataAnalysis.WebForm1 |
FinanceAnnuityPaymentFutureValue | Public | Internal | 0 type | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue |
FinanceAnnuityPaymentPresentValue | Public | Internal | 0 type | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue |
FinanceFutureValue | Public | Internal | 0 type | Laboratory.Module.Finance .FinanceFutureValue |
FinanceFutureValueOfAnAnnuity | Public | Internal | 0 type | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity |
FinanceNetPresentValue | Public | Internal | 0 type | Laboratory.Module.Finance .FinanceNetPresentValue |
FinancePresentValue | Public | Internal | 0 type | Laboratory.Module.Finance .FinancePresentValue |
FinancePresentValueOfAnAnnuity | Public | Internal | 0 type | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity |
FinanceRemainingBalanceOfAnnuity | Public | Internal | 0 type | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity |
BasisFunction | Public | Internal | 3 types | B_Geometry.BasisFunction |
BCurve | Public | Internal | 2 types | B_Geometry.BCurve |
BGeomMatrix | Public | Internal | 3 types | B_Geometry.BGeomMatrix |
Form1 | Public | Internal | 0 type | B_Geometry.Form1 |
GeomBox | Public | Internal | 0 type | B_Geometry.GeomBox |
GeometryVisUtils | Public | Internal | 0 type | B_Geometry.GeometryVisUtils |
LinearAlgebra | Public | Internal | 2 types | B_Geometry.LinearAlgebra |
TolerantUtilities | Public | Internal | 5 types | B_Geometry.TolerantUtilities |
Vector | Public | Internal | 5 types | B_Geometry.Vector |
Program | Public | Internal | 1 type | B_Geometry.New.Program |
TestofcomplexNumbers | Public | Internal | 0 type | MathosTest.TestofcomplexNumbers |
PreCalculus | Public | Internal | 0 type | MathosTest.PreCalculus |
DiceSimulatorTest | Public | Internal | 0 type | MathosTest.DiceSimulatorTest |
DiscreteMathematics | Public | Internal | 0 type | MathosTest.DiscreteMathematics |
coordinateStruct | Public | Internal | 0 type | MathosTest.coordinateStruct |
EquationSolverTest | Public | Internal | 0 type | MathosTest.EquationSolverTest |
FinanceTest | Public | Internal | 0 type | MathosTest.FinanceTest |
LinearModelsTest | Public | Internal | 0 type | MathosTest.LinearModelsTest |
PythagoreanTest | Public | Internal | 0 type | MathosTest.PythagoreanTest |
Shapes | Public | Internal | 0 type | MathosTest.Shapes |
ConverterTest | Public | Internal | 0 type | MathosTest.ConverterTest |
VectorsAndMatrices | Public | Internal | 0 type | MathosTest.VectorsAndMatrices |
TestOfFractions | Public | Internal | 0 type | MathosTest.TestOfFractions |
Statistics | Public | Internal | 0 type | MathosTest.Statistics |
CalculusTest | Public | Internal | 0 type | MathosTest.Calculus.CalculusTest |
UnitTest1 | Public | Internal | 0 type | MathosTest.SpecialFunctions.UnitTest1 |
Uncertainty | Public | Internal | 0 type | MathosTest.Uncertainty.Uncertainty |
StatisticalDistributions | Public | Internal | 0 type | MathosTest.Mathos_Main .StatisticalDistributions |
SyntaxTest | Public | Internal | 0 type | MathosTest.Mathos_Main.SyntaxTest |
ComplexArithmeticTest | Public | Internal | 0 type | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest |
DoubleArthimeticTest | Public | Internal | 0 type | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest |
IntegerArthimeticTest | Public | Internal | 0 type | MathosTest.Mathos_Main.Arithmetic .IntegerArthimeticTest |
SingleArthimeticTest | Public | Internal | 0 type | MathosTest.Mathos_Main.Arithmetic .SingleArthimeticTest |
DecimalArithmetic | Public | Internal | 0 type | MathosTest.Mathos_Main.Arithmetic .DecimalArithmetic |
FiniteCalculusTest | Public | Internal | 0 type | MathosTest.Mathos_Main.Calculus .FiniteCalculusTest |
ElementaryTests | Public | Internal | 0 type | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests |
GammaTests | Public | Internal | 0 type | MathosTest.Mathos_Main.SpecialFunctions .GammaTests |
HelpWindow | Public | Internal | 1 type | RubyInt.HelpWindow |
ResultsWindow | Public | Internal | 1 type | RubyInt.ResultsWindow |
App | Public | Internal | 0 type | RubyInt.App |
DataViewWindow | Public | Internal | 1 type | RubyInt.DataViewWindow |
Extension | Public | Internal | 2 types | RubyInt.Extension |
MainWindow | Public | Internal | 5 types | RubyInt.MainWindow |
MyCompletionData | Public | Internal | 1 type | RubyInt.MyCompletionData |
_Default | Public | Internal | 1 type | ProjectWebsite._Default |
FrmTable | Public | Internal | 2 types | Interactive_Mathematics.FrmTable |
App | Public | Internal | 0 type | Interactive_Mathematics.App |
MainWindow | Public | Internal | 1 type | Interactive_Mathematics.MainWindow |
AngleConversionM | Public | Internal | 0 type | Mathos.Converter.AngleConversionM |
TemperatureConversion | Public | Internal | 1 type | Mathos.Converter.TemperatureConversion |
Bessel | Public | Internal | 0 type | Mathos.SpecialFunctions.Bessel |
Elliptic | Public | Internal | 0 type | Mathos.SpecialFunctions.Elliptic |
NumberList | Public | Internal | 0 type | Mathos.Statistics.NumberList |
DenominatorNullException | Public | Internal | 1 type | Mathos.Exceptions .DenominatorNullException |
InvalidCoordinateFormat | Public | Internal | 1 type | Mathos.Exceptions .InvalidCoordinateFormat |
InvalidFractionFormatException | Public | Internal | 1 type | Mathos.Exceptions .InvalidFractionFormatException |
InvalidTriangleException | Public | Internal | 1 type | Mathos.Exceptions .InvalidTriangleException |
IComplex | Public | Internal | 0 type | Mathos.Arithmetic.Numbers.IComplex |
IShape2D | Public | Internal | 9 types | Mathos.Geometry.Shapes.IShape2D |
Ellipse | Public | Internal | 0 type | Mathos.Geometry.Shapes.Ellipse |
Ring | Public | Internal | 0 type | Mathos.Geometry.Shapes.Ring |
IShape3D | Public | Internal | 7 types | Mathos.Geometry.Shapes.IShape3D |
Torus | Public | Internal | 0 type | Mathos.Geometry.Shapes.Torus |
Statistics
Stat | Visibility | CouldBeDeclared | TypesUsingMe |
---|---|---|---|
Sum: | 0 | 0 | 0 |
Average: | 0 | 0 | 0 |
Minimum: | 0 | 0 | 0 |
Maximum: | 0 | 0 | 0 |
Standard deviation: | 0 | 0 | 0 |
Variance: | 0 | 0 | 0 |
Rule warning: Fields that could have a lower visibility |
// This rule tells which fields can be declared with a lower visibility.
// (like 'private' is a visibility lower than 'internal' which is lower than 'public').
// Reducing visibility is a good practice because this fosters encapsulation
// and with it maintainability and extensibility.
warnif count > 0 from f in JustMyCode.Fields where
f.Visibility != f.OptimalVisibility &&
!f.HasAttribute("NDepend.Attributes.CannotDecreaseVisibilityAttribute".AllowNoMatch()) &&
!f.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch())
// If you don't want to link NDepend.API.dll, you can use your own attributes and adapt this rule.
select new { f,
f.Visibility ,
CouldBeDeclared = f.OptimalVisibility,
f.MethodsUsingMe }
181 fields matched
fields | Visibility | CouldBeDeclared | MethodsUsingMe | Full Name |
---|---|---|---|---|
HyperLink1 | Protected | Private | 0 method | Laboratory.Default.HyperLink1 |
Table1 | Protected | Private | 0 method | Laboratory.Modules.Table1 |
HeadContent | Protected | Private | 0 method | Laboratory.SiteMaster.HeadContent |
NavigationMenu | Protected | Private | 0 method | Laboratory.SiteMaster.NavigationMenu |
MainContent | Protected | Private | 0 method | Laboratory.SiteMaster.MainContent |
ChangeUserPassword | Protected | Private | 0 method | Laboratory.Account.ChangePassword .ChangeUserPassword |
RegisterHyperLink | Protected | Private | 1 method | Laboratory.Account.Login .RegisterHyperLink |
LoginUser | Protected | Private | 0 method | Laboratory.Account.Login.LoginUser |
RegisterUser | Protected | Private | 2 methods | Laboratory.Account.Register.RegisterUser |
RegisterUserWizardStep | Protected | Private | 0 method | Laboratory.Account.Register .RegisterUserWizardStep |
DropDownList1 | Protected | Private | 2 methods | Laboratory.Module.Converter .DropDownList1 |
Panel1 | Protected | Private | 0 method | Laboratory.Module.Converter.Panel1 |
DropDownList2 | Protected | Private | 3 methods | Laboratory.Module.Converter .DropDownList2 |
TextBox1 | Protected | Private | 1 method | Laboratory.Module.Converter.TextBox1 |
DropDownList3 | Protected | Private | 2 methods | Laboratory.Module.Converter .DropDownList3 |
TextBox2 | Protected | Private | 1 method | Laboratory.Module.Converter.TextBox2 |
CalculateButton | Protected | Private | 0 method | Laboratory.Module.Converter .CalculateButton |
ErrorLabel | Protected | Private | 0 method | Laboratory.Module.Converter.ErrorLabel |
ElapsedTimeLabel | Protected | Private | 1 method | Laboratory.Module.Converter .ElapsedTimeLabel |
TextBox1 | Protected | Private | 1 method | Laboratory.Module.EquationSolver .TextBox1 |
TextBox2 | Protected | Private | 1 method | Laboratory.Module.EquationSolver .TextBox2 |
TextBox3 | Protected | Private | 1 method | Laboratory.Module.EquationSolver .TextBox3 |
TextBox4 | Protected | Private | 1 method | Laboratory.Module.EquationSolver .TextBox4 |
TextBox5 | Protected | Private | 1 method | Laboratory.Module.EquationSolver .TextBox5 |
TextBox6 | Protected | Private | 1 method | Laboratory.Module.EquationSolver .TextBox6 |
SolveSystemOfTwoEquation | Protected | Private | 0 method | Laboratory.Module.EquationSolver .SolveSystemOfTwoEquation |
EquationErrorLabel | Protected | Private | 1 method | Laboratory.Module.EquationSolver .EquationErrorLabel |
EquationResultLabel | Protected | Private | 1 method | Laboratory.Module.EquationSolver .EquationResultLabel |
EquationElapsedTimeLabel | Protected | Private | 1 method | Laboratory.Module.EquationSolver .EquationElapsedTimeLabel |
TextBox7 | Protected | Private | 1 method | Laboratory.Module.EquationSolver .TextBox7 |
TextBox8 | Protected | Private | 1 method | Laboratory.Module.EquationSolver .TextBox8 |
TextBox9 | Protected | Private | 1 method | Laboratory.Module.EquationSolver .TextBox9 |
SolveQuadraticEquation | Protected | Private | 0 method | Laboratory.Module.EquationSolver .SolveQuadraticEquation |
QuadraticEquationErrorLabel | Protected | Private | 1 method | Laboratory.Module.EquationSolver .QuadraticEquationErrorLabel |
QuadraticEquationResultLabel | Protected | Private | 1 method | Laboratory.Module.EquationSolver .QuadraticEquationResultLabel |
QuadraticEquationElapsedTimeLabel | Protected | Private | 1 method | Laboratory.Module.EquationSolver .QuadraticEquationElapsedTimeLabel |
NumberText | Protected | Private | 1 method | Laboratory.Module.Factorial.NumberText |
CalculateButton | Protected | Private | 0 method | Laboratory.Module.Factorial .CalculateButton |
ErrorLabel | Protected | Private | 1 method | Laboratory.Module.Factorial.ErrorLabel |
ResultTextbox | Protected | Private | 1 method | Laboratory.Module.Factorial .ResultTextbox |
ElapsedTimeLabel | Protected | Private | 1 method | Laboratory.Module.Factorial .ElapsedTimeLabel |
Label1 | Protected | Private | 0 method | Laboratory.Module.IntegralApproximation .Label1 |
UpperBoundText | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .UpperBoundText |
LowerBoundText | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .LowerBoundText |
ExpressionText | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .ExpressionText |
Label2 | Protected | Private | 0 method | Laboratory.Module.IntegralApproximation .Label2 |
NumberOfIntervalsText | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .NumberOfIntervalsText |
CalculateButton | Protected | Private | 0 method | Laboratory.Module.IntegralApproximation .CalculateButton |
ErrorLabel | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .ErrorLabel |
Label3 | Protected | Private | 0 method | Laboratory.Module.IntegralApproximation .Label3 |
RectangleMethodResultLabel | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .RectangleMethodResultLabel |
RectangleMethodTimeLabel | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .RectangleMethodTimeLabel |
Label4 | Protected | Private | 0 method | Laboratory.Module.IntegralApproximation .Label4 |
TrapezoidalRuleResultLabel | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .TrapezoidalRuleResultLabel |
TrapezoidalRuleTimeLabel | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .TrapezoidalRuleTimeLabel |
Label5 | Protected | Private | 0 method | Laboratory.Module.IntegralApproximation .Label5 |
SimpsonsRuleResultLabel | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .SimpsonsRuleResultLabel |
SimpsonsRuleTimeLabel | Protected | Private | 1 method | Laboratory.Module.IntegralApproximation .SimpsonsRuleTimeLabel |
returnvalue | Protected | Private | 0 method | Laboratory.Module.MConverter.returnvalue |
DropDownList1 | Protected | Private | 1 method | Laboratory.Module.NumberChecker .DropDownList1 |
TextBox1 | Protected | Private | 1 method | Laboratory.Module.NumberChecker.TextBox1 |
CalculateButton | Protected | Private | 0 method | Laboratory.Module.NumberChecker .CalculateButton |
ErrorLabel | Protected | Private | 0 method | Laboratory.Module.NumberChecker .ErrorLabel |
ResultLabel | Protected | Private | 1 method | Laboratory.Module.NumberChecker .ResultLabel |
ElapsedTimeLabel | Protected | Private | 1 method | Laboratory.Module.NumberChecker .ElapsedTimeLabel |
TextBox1 | Protected | Private | 1 method | Laboratory.Module.Triangle.TextBox1 |
TextBox2 | Protected | Private | 1 method | Laboratory.Module.Triangle.TextBox2 |
TextBox3 | Protected | Private | 1 method | Laboratory.Module.Triangle.TextBox3 |
TextBox4 | Protected | Private | 1 method | Laboratory.Module.Triangle.TextBox4 |
TextBox5 | Protected | Private | 1 method | Laboratory.Module.Triangle.TextBox5 |
TextBox6 | Protected | Private | 1 method | Laboratory.Module.Triangle.TextBox6 |
CalculateButton | Protected | Private | 0 method | Laboratory.Module.Triangle .CalculateButton |
ErrorLabel | Protected | Private | 1 method | Laboratory.Module.Triangle.ErrorLabel |
ElapsedTimeLabel | Protected | Private | 1 method | Laboratory.Module.Triangle .ElapsedTimeLabel |
tableInput | Protected | Private | 1 method | Laboratory.Module.Uncertainty.tableInput |
functionInput | Protected | Private | 2 methods | Laboratory.Module.Uncertainty .functionInput |
CalculateButton | Protected | Private | 0 method | Laboratory.Module.Uncertainty .CalculateButton |
ErrorLabel | Protected | Private | 0 method | Laboratory.Module.Uncertainty.ErrorLabel |
TableOutput | Protected | Private | 1 method | Laboratory.Module.Uncertainty .TableOutput |
ElapsedTimeLabel | Protected | Private | 1 method | Laboratory.Module.Uncertainty .ElapsedTimeLabel |
TextBox1 | Protected | Private | 1 method | Laboratory.Module.DataAnalysis .LinearRegression.TextBox1 |
TextBox2 | Protected | Private | 1 method | Laboratory.Module.DataAnalysis .LinearRegression.TextBox2 |
Button1 | Protected | Private | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.Button1 |
Label1 | Protected | Private | 1 method | Laboratory.Module.DataAnalysis .LinearRegression.Label1 |
lblLinearEq | Protected | Private | 1 method | Laboratory.Module.DataAnalysis .LinearRegression.lblLinearEq |
lblRVal | Protected | Private | 1 method | Laboratory.Module.DataAnalysis .LinearRegression.lblRVal |
lblRSqVal | Protected | Private | 1 method | Laboratory.Module.DataAnalysis .LinearRegression.lblRSqVal |
lblRegCoeff | Protected | Private | 1 method | Laboratory.Module.DataAnalysis .LinearRegression.lblRegCoeff |
lblIntr | Protected | Private | 1 method | Laboratory.Module.DataAnalysis .LinearRegression.lblIntr |
TextBox1 | Protected | Private | 2 methods | Laboratory.Module.DataAnalysis.WebForm1 .TextBox1 |
Label1 | Protected | Private | 2 methods | Laboratory.Module.DataAnalysis.WebForm1 .Label1 |
FindNthTerm | Protected | Private | 0 method | Laboratory.Module.DataAnalysis.WebForm1 .FindNthTerm |
Button1 | Protected | Private | 0 method | Laboratory.Module.DataAnalysis.WebForm1 .Button1 |
FutureValueText | Protected | Private | 1 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .FutureValueText |
RateOfReturnText | Protected | Private | 1 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .RateOfReturnText |
NumberOfPeriodsText | Protected | Private | 1 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .NumberOfPeriodsText |
RoundCheck | Protected | Private | 1 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .RoundCheck |
CalculateButton | Protected | Private | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .CalculateButton |
ErrorLabel | Protected | Private | 1 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .ErrorLabel |
ResultLabel | Protected | Private | 1 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .ResultLabel |
Statistics
Stat | Visibility | CouldBeDeclared | MethodsUsingMe |
---|---|---|---|
Sum: | 0 | 0 | 0 |
Average: | 0 | 0 | 0 |
Minimum: | 0 | 0 | 0 |
Maximum: | 0 | 0 | 0 |
Standard deviation: | 0 | 0 | 0 |
Variance: | 0 | 0 | 0 |
Rule warning: Types that could be declared as private, nested in a parent type |
// The conditions for a type to be nested into a parent type
// is that the parent type is the only type using it,
// and that the parent type is declared in the same namespace.
//
// Declaring a type as private into a parent type helps enforcing encapsulation.
// But since nested private types are hardly testable, this rule might
// not be applied for types used directly by tests.
warnif count > 0
from t in Application.Types
where !t.IsGeneratedByCompiler &&
!t.IsNested &&
!t.IsPubliclyVisible &&
// Only one type user...
t.TypesUsingMe.Count() == 1
let couldBeNestedIn = t.TypesUsingMe.Single()
where !couldBeNestedIn.IsGeneratedByCompiler &&
// ...declared in the same namespace
couldBeNestedIn.ParentNamespace == t.ParentNamespace
select new { t, couldBeNestedIn }
1 types matched
type | couldBeNestedIn | Full Name |
---|---|---|
GeomUtils | Form1 | B_Geometry.GeomUtils |
Statistics
Stat | couldBeNestedIn |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Avoid publicly visible constant fields |
// Match constant fields which are visible outside their parent assembly.
// Such field, when used outside its parent assembly,
// has its constant value hard-coded into the client assembly.
// Changing the field's value requires to recompile all assemblies
// that use the field.
// Declare the field as static readonly instead. This way, the value can be
// safely changed, without the need to recompile client assemblies.
warnif count > 0
from f in Application.Fields
where f.IsLiteral && f.IsPubliclyVisible
&& !f.IsEnumValue // This situation also applies to enumeration values
// but to avoid too many false positives, per default
// this rule doesn't match these particular fields.
select f
33 fields matched
fields | Full Name |
---|---|
LogOfEInBaseTwo | Mathos.Arithmetic.MathematicalConstants .LogOfEInBaseTwo |
LogOfEInBaseTen | Mathos.Arithmetic.MathematicalConstants .LogOfEInBaseTen |
LnOfTwo | Mathos.Arithmetic.MathematicalConstants .LnOfTwo |
LnOfTen | Mathos.Arithmetic.MathematicalConstants .LnOfTen |
SqrtOfTwo | Mathos.Arithmetic.MathematicalConstants .SqrtOfTwo |
SqrtOfOneHalf | Mathos.Arithmetic.MathematicalConstants .SqrtOfOneHalf |
SqrtOfThree | Mathos.Arithmetic.MathematicalConstants .SqrtOfThree |
SqrtOfOneThird | Mathos.Arithmetic.MathematicalConstants .SqrtOfOneThird |
PISquared | Mathos.Arithmetic.MathematicalConstants .PISquared |
PIOverTwo | Mathos.Arithmetic.MathematicalConstants .PIOverTwo |
PIOverThree | Mathos.Arithmetic.MathematicalConstants .PIOverThree |
PIOverFour | Mathos.Arithmetic.MathematicalConstants .PIOverFour |
SqrtOfPI | Mathos.Arithmetic.MathematicalConstants .SqrtOfPI |
SqrtOfTwoOverPI | Mathos.Arithmetic.MathematicalConstants .SqrtOfTwoOverPI |
SqrtOfPIOverTwo | Mathos.Arithmetic.MathematicalConstants .SqrtOfPIOverTwo |
TwoOverSqrtOfPI | Mathos.Arithmetic.MathematicalConstants .TwoOverSqrtOfPI |
OneOverPI | Mathos.Arithmetic.MathematicalConstants .OneOverPI |
TwoOverPi | Mathos.Arithmetic.MathematicalConstants .TwoOverPi |
LnOfPi | Mathos.Arithmetic.MathematicalConstants .LnOfPi |
MaxIntSqrt | Mathos.Arithmetic.MathematicalConstants .MaxIntSqrt |
MaxLongSqrt | Mathos.Arithmetic.MathematicalConstants .MaxLongSqrt |
PI | Mathos.Arithmetic .MathematicalConstants+Single.PI |
PISquared | Mathos.Arithmetic .MathematicalConstants+Single.PISquared |
PISqrt | Mathos.Arithmetic .MathematicalConstants+Single.PISqrt |
Avogadro | Mathos.Arithmetic.PhysicalConstants .Avogadro |
C | Mathos.Arithmetic.PhysicalConstants+SI.C |
NewtonConstant | Mathos.Arithmetic.PhysicalConstants+SI .NewtonConstant |
PlankConstant | Mathos.Arithmetic.PhysicalConstants+SI .PlankConstant |
PlankConstantBar | Mathos.Arithmetic.PhysicalConstants+SI .PlankConstantBar |
GravityAccelartion | Mathos.Arithmetic.PhysicalConstants+SI .GravityAccelartion |
ElectronVolt | Mathos.Arithmetic.PhysicalConstants+SI .ElectronVolt |
ElectronMass | Mathos.Arithmetic.PhysicalConstants+SI .ElectronMass |
Boltzman | Mathos.Arithmetic.PhysicalConstants+SI .Boltzman |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Fields should be declared as private |
// Fields should be considered as implementation details
// and as a consequence they should be declared as private.
// When a field is private, the caller cannot get
// inappropriate direct access to the field.
warnif count > 0 from f in Application.Fields where
!f.IsPrivate &&
// These conditions filter cases where fields
// doesn't represent state that should be encapsulated.
!f.IsGeneratedByCompiler &&
!f.IsSpecialName &&
!f.IsInitOnly &&
!f.IsLiteral &&
!f.IsEnumValue
// A non-private field assigned from outside its class,
// usually leads to complicated field state management.
let outsideMethodsAssigningMe =
f.MethodsAssigningMe.Where(m => m.ParentType != f.ParentType)
select new { f,
f.Visibility,
outsideMethodsAssigningMe }
184 fields matched
fields | Visibility | outsideMethodsAssigningMe | Full Name |
---|---|---|---|
HyperLink1 | Protected | 0 method | Laboratory.Default.HyperLink1 |
Table1 | Protected | 0 method | Laboratory.Modules.Table1 |
HeadContent | Protected | 0 method | Laboratory.SiteMaster.HeadContent |
NavigationMenu | Protected | 0 method | Laboratory.SiteMaster.NavigationMenu |
MainContent | Protected | 0 method | Laboratory.SiteMaster.MainContent |
ChangeUserPassword | Protected | 0 method | Laboratory.Account.ChangePassword .ChangeUserPassword |
RegisterHyperLink | Protected | 0 method | Laboratory.Account.Login .RegisterHyperLink |
LoginUser | Protected | 0 method | Laboratory.Account.Login.LoginUser |
RegisterUser | Protected | 0 method | Laboratory.Account.Register.RegisterUser |
RegisterUserWizardStep | Protected | 0 method | Laboratory.Account.Register .RegisterUserWizardStep |
DropDownList1 | Protected | 0 method | Laboratory.Module.Converter .DropDownList1 |
Panel1 | Protected | 0 method | Laboratory.Module.Converter.Panel1 |
DropDownList2 | Protected | 0 method | Laboratory.Module.Converter .DropDownList2 |
TextBox1 | Protected | 0 method | Laboratory.Module.Converter.TextBox1 |
DropDownList3 | Protected | 0 method | Laboratory.Module.Converter .DropDownList3 |
TextBox2 | Protected | 0 method | Laboratory.Module.Converter.TextBox2 |
CalculateButton | Protected | 0 method | Laboratory.Module.Converter .CalculateButton |
ErrorLabel | Protected | 0 method | Laboratory.Module.Converter.ErrorLabel |
ElapsedTimeLabel | Protected | 0 method | Laboratory.Module.Converter .ElapsedTimeLabel |
TextBox1 | Protected | 0 method | Laboratory.Module.EquationSolver .TextBox1 |
TextBox2 | Protected | 0 method | Laboratory.Module.EquationSolver .TextBox2 |
TextBox3 | Protected | 0 method | Laboratory.Module.EquationSolver .TextBox3 |
TextBox4 | Protected | 0 method | Laboratory.Module.EquationSolver .TextBox4 |
TextBox5 | Protected | 0 method | Laboratory.Module.EquationSolver .TextBox5 |
TextBox6 | Protected | 0 method | Laboratory.Module.EquationSolver .TextBox6 |
SolveSystemOfTwoEquation | Protected | 0 method | Laboratory.Module.EquationSolver .SolveSystemOfTwoEquation |
EquationErrorLabel | Protected | 0 method | Laboratory.Module.EquationSolver .EquationErrorLabel |
EquationResultLabel | Protected | 0 method | Laboratory.Module.EquationSolver .EquationResultLabel |
EquationElapsedTimeLabel | Protected | 0 method | Laboratory.Module.EquationSolver .EquationElapsedTimeLabel |
TextBox7 | Protected | 0 method | Laboratory.Module.EquationSolver .TextBox7 |
TextBox8 | Protected | 0 method | Laboratory.Module.EquationSolver .TextBox8 |
TextBox9 | Protected | 0 method | Laboratory.Module.EquationSolver .TextBox9 |
SolveQuadraticEquation | Protected | 0 method | Laboratory.Module.EquationSolver .SolveQuadraticEquation |
QuadraticEquationErrorLabel | Protected | 0 method | Laboratory.Module.EquationSolver .QuadraticEquationErrorLabel |
QuadraticEquationResultLabel | Protected | 0 method | Laboratory.Module.EquationSolver .QuadraticEquationResultLabel |
QuadraticEquationElapsedTimeLabel | Protected | 0 method | Laboratory.Module.EquationSolver .QuadraticEquationElapsedTimeLabel |
NumberText | Protected | 0 method | Laboratory.Module.Factorial.NumberText |
CalculateButton | Protected | 0 method | Laboratory.Module.Factorial .CalculateButton |
ErrorLabel | Protected | 0 method | Laboratory.Module.Factorial.ErrorLabel |
ResultTextbox | Protected | 0 method | Laboratory.Module.Factorial .ResultTextbox |
ElapsedTimeLabel | Protected | 0 method | Laboratory.Module.Factorial .ElapsedTimeLabel |
Label1 | Protected | 0 method | Laboratory.Module.IntegralApproximation .Label1 |
UpperBoundText | Protected | 0 method | Laboratory.Module.IntegralApproximation .UpperBoundText |
LowerBoundText | Protected | 0 method | Laboratory.Module.IntegralApproximation .LowerBoundText |
ExpressionText | Protected | 0 method | Laboratory.Module.IntegralApproximation .ExpressionText |
Label2 | Protected | 0 method | Laboratory.Module.IntegralApproximation .Label2 |
NumberOfIntervalsText | Protected | 0 method | Laboratory.Module.IntegralApproximation .NumberOfIntervalsText |
CalculateButton | Protected | 0 method | Laboratory.Module.IntegralApproximation .CalculateButton |
ErrorLabel | Protected | 0 method | Laboratory.Module.IntegralApproximation .ErrorLabel |
Label3 | Protected | 0 method | Laboratory.Module.IntegralApproximation .Label3 |
RectangleMethodResultLabel | Protected | 0 method | Laboratory.Module.IntegralApproximation .RectangleMethodResultLabel |
RectangleMethodTimeLabel | Protected | 0 method | Laboratory.Module.IntegralApproximation .RectangleMethodTimeLabel |
Label4 | Protected | 0 method | Laboratory.Module.IntegralApproximation .Label4 |
TrapezoidalRuleResultLabel | Protected | 0 method | Laboratory.Module.IntegralApproximation .TrapezoidalRuleResultLabel |
TrapezoidalRuleTimeLabel | Protected | 0 method | Laboratory.Module.IntegralApproximation .TrapezoidalRuleTimeLabel |
Label5 | Protected | 0 method | Laboratory.Module.IntegralApproximation .Label5 |
SimpsonsRuleResultLabel | Protected | 0 method | Laboratory.Module.IntegralApproximation .SimpsonsRuleResultLabel |
SimpsonsRuleTimeLabel | Protected | 0 method | Laboratory.Module.IntegralApproximation .SimpsonsRuleTimeLabel |
returnvalue | Protected | 0 method | Laboratory.Module.MConverter.returnvalue |
DropDownList1 | Protected | 0 method | Laboratory.Module.NumberChecker .DropDownList1 |
TextBox1 | Protected | 0 method | Laboratory.Module.NumberChecker.TextBox1 |
CalculateButton | Protected | 0 method | Laboratory.Module.NumberChecker .CalculateButton |
ErrorLabel | Protected | 0 method | Laboratory.Module.NumberChecker .ErrorLabel |
ResultLabel | Protected | 0 method | Laboratory.Module.NumberChecker .ResultLabel |
ElapsedTimeLabel | Protected | 0 method | Laboratory.Module.NumberChecker .ElapsedTimeLabel |
TextBox1 | Protected | 0 method | Laboratory.Module.Triangle.TextBox1 |
TextBox2 | Protected | 0 method | Laboratory.Module.Triangle.TextBox2 |
TextBox3 | Protected | 0 method | Laboratory.Module.Triangle.TextBox3 |
TextBox4 | Protected | 0 method | Laboratory.Module.Triangle.TextBox4 |
TextBox5 | Protected | 0 method | Laboratory.Module.Triangle.TextBox5 |
TextBox6 | Protected | 0 method | Laboratory.Module.Triangle.TextBox6 |
CalculateButton | Protected | 0 method | Laboratory.Module.Triangle .CalculateButton |
ErrorLabel | Protected | 0 method | Laboratory.Module.Triangle.ErrorLabel |
ElapsedTimeLabel | Protected | 0 method | Laboratory.Module.Triangle .ElapsedTimeLabel |
tableInput | Protected | 0 method | Laboratory.Module.Uncertainty.tableInput |
functionInput | Protected | 0 method | Laboratory.Module.Uncertainty .functionInput |
CalculateButton | Protected | 0 method | Laboratory.Module.Uncertainty .CalculateButton |
ErrorLabel | Protected | 0 method | Laboratory.Module.Uncertainty.ErrorLabel |
TableOutput | Protected | 0 method | Laboratory.Module.Uncertainty .TableOutput |
ElapsedTimeLabel | Protected | 0 method | Laboratory.Module.Uncertainty .ElapsedTimeLabel |
TextBox1 | Protected | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.TextBox1 |
TextBox2 | Protected | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.TextBox2 |
Button1 | Protected | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.Button1 |
Label1 | Protected | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.Label1 |
lblLinearEq | Protected | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.lblLinearEq |
lblRVal | Protected | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.lblRVal |
lblRSqVal | Protected | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.lblRSqVal |
lblRegCoeff | Protected | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.lblRegCoeff |
lblIntr | Protected | 0 method | Laboratory.Module.DataAnalysis .LinearRegression.lblIntr |
TextBox1 | Protected | 0 method | Laboratory.Module.DataAnalysis.WebForm1 .TextBox1 |
Label1 | Protected | 0 method | Laboratory.Module.DataAnalysis.WebForm1 .Label1 |
FindNthTerm | Protected | 0 method | Laboratory.Module.DataAnalysis.WebForm1 .FindNthTerm |
Button1 | Protected | 0 method | Laboratory.Module.DataAnalysis.WebForm1 .Button1 |
FutureValueText | Protected | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .FutureValueText |
RateOfReturnText | Protected | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .RateOfReturnText |
NumberOfPeriodsText | Protected | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .NumberOfPeriodsText |
RoundCheck | Protected | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .RoundCheck |
CalculateButton | Protected | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .CalculateButton |
ErrorLabel | Protected | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .ErrorLabel |
ResultLabel | Protected | 0 method | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .ResultLabel |
Statistics
Stat | Visibility | outsideMethodsAssigningMe |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Avoid public methods not publicly visible |
// Matched methods are declared public but are not publicly visible by assemblies consumers.
// Their visibility level must be decreased.
warnif count > 0
from m in JustMyCode.Methods where
!m.IsPubliclyVisible && m.IsPublic &&
// Eliminate virtual methods
!m.IsVirtual &&
// Eliminate interface and delegate types
!m.ParentType.IsInterface &&
!m.ParentType.IsDelegate &&
// Eliminate default constructors
!(m.IsConstructor && m.NbParameters == 0) &&
// Eliminate operators that must be declared public
!m.IsOperator &&
// Eliminate methods generated by compiler
!m.IsGeneratedByCompiler
select m
1 methods matched
method | Full Name |
---|---|
CentripetalMethod_createSplineByInterpol ation(Int32,Vector[],BCurve&) | B_Geometry.GeomUtils .CentripetalMethod_createSplineByInterpo lation(Int32,Vector[],BCurve&) |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Event handler methods should be declared private |
warnif count > 0
from m in Application.Methods where
!m.IsPrivate &&
// A method is considered as event handler if...
m.NbParameters==2 && // ...it has two parameters..
m.Name.Contains("Object") && // ...of types Object...
m.Name.Contains("EventArgs") && // ...and EventArgs
// Discard special cases
!m.ParentType.IsDelegate &&
!m.IsGeneratedByCompiler
select new { m,m.Visibility }
// This rule implementation relies on the facts that:
// -> A method name contains the type of its parameters.
// -> All EventArgs derived types have the suffix "EventArgs".
49 methods matched
methods | Visibility | Full Name |
---|---|---|
Page_Load(Object,EventArgs) | Protected | Laboratory.About.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Default.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Modules.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.SiteMaster.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Account.ChangePassword .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Account.ChangePasswordSuccess .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Account.Login.Page_Load (Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Account.Register.Page_Load (Object,EventArgs) |
RegisterUser_CreatedUser(Object ,EventArgs) | Protected | Laboratory.Account.Register .RegisterUser_CreatedUser(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Converter.Page_Load (Object,EventArgs) |
DropDownList1_SelectedIndexChanged (Object,EventArgs) | Protected | Laboratory.Module.Converter .DropDownList1_SelectedIndexChanged (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Converter .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.EquationSolver .Page_Load(Object,EventArgs) |
SolveSystemOfTwoEquation_Click(Object ,EventArgs) | Protected | Laboratory.Module.EquationSolver .SolveSystemOfTwoEquation_Click(Object ,EventArgs) |
SolveQuadraticEquation_Click(Object ,EventArgs) | Protected | Laboratory.Module.EquationSolver .SolveQuadraticEquation_Click(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Factorial.Page_Load (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Factorial .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.IntegralApproximation .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.IntegralApproximation .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.MConverter.Page_Load (Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.NumberChecker .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.NumberChecker .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Triangle.Page_Load (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Triangle .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Uncertainty.Page_Load (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Uncertainty .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.DataAnalysis .LinearRegression.Page_Load(Object ,EventArgs) |
Button1_Click(Object,EventArgs) | Protected | Laboratory.Module.DataAnalysis .LinearRegression.Button1_Click(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.DataAnalysis.WebForm1 .Page_Load(Object,EventArgs) |
FindNthTerm_Click(Object,EventArgs) | Protected | Laboratory.Module.DataAnalysis.WebForm1 .FindNthTerm_Click(Object,EventArgs) |
Button1_Click(Object,EventArgs) | Protected | Laboratory.Module.DataAnalysis.WebForm1 .Button1_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceFutureValue.Page_Load(Object ,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceFutureValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity.Page_Load (Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceNetPresentValue.Page_Load(Object ,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceNetPresentValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinancePresentValue.Page_Load(Object ,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinancePresentValue .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity .CalculateButton_Click(Object,EventArgs) |
Page_Load(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity .Page_Load(Object,EventArgs) |
CalculateButton_Click(Object,EventArgs) | Protected | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity .CalculateButton_Click(Object,EventArgs) |
glControl_Resize(Object,EventArgs) | Public | B_Geometry.Form1.glControl_Resize(Object ,EventArgs) |
Page_Load(Object,EventArgs) | Protected | ProjectWebsite._Default.Page_Load(Object ,EventArgs) |
Statistics
Stat | Visibility |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Purity - Immutability - Side-Effects | 551 |
|
Rule warning: Fields should be marked as ReadOnly when possible |
warnif count > 0
from f in JustMyCode.Fields where
f.IsImmutable &&
!f.IsInitOnly &&
!f.IsGeneratedByCompiler &&
!f.IsEventDelegateObject
select new { f, f.SizeOfInst }
// A field that matches the condition IsImmutable
// is a field that is assigned only by constructors
// of its class.
// For an instance field, this means its value
// will remain constant throught the lifetime
// of the object.
// For a static field, this means its value will
// remain constant throught the lifetime of the
// program.
// In both cases, such field can safely be marked
// with the C# readonly keyword
// (ReadOnly in VB.NET).
// The condition IsInitOnly matches fields that
// are marked with the C# readonly keyword
// (ReadOnly in VB.NET).
25 fields matched
fields | Size of instance | Full Name |
---|---|---|
m_expanded_knots | 4 | B_Geometry.BasisFunction .m_expanded_knots |
m_expanded_knots_set | 1 | B_Geometry.BasisFunction .m_expanded_knots_set |
n_knots | 4 | B_Geometry.BasisFunction.n_knots |
m_control_points | 4 | B_Geometry.BCurve.m_control_points |
m_degree | 4 | B_Geometry.BCurve.m_degree |
m_basis | 4 | B_Geometry.BCurve.m_basis |
m_dimension | 4 | B_Geometry.BCurve.m_dimension |
m_rows | 4 | B_Geometry.BGeomMatrix.m_rows |
m_columns | 4 | B_Geometry.BGeomMatrix.m_columns |
m_elements | 4 | B_Geometry.BGeomMatrix.m_elements |
angle | N/A | B_Geometry.Form1.angle |
mouse_position | N/A | B_Geometry.Form1.mouse_position |
components | 4 | B_Geometry.Form1.components |
m_lowX | 8 | B_Geometry.GeomBox.m_lowX |
m_lowY | 8 | B_Geometry.GeomBox.m_lowY |
m_lowZ | 8 | B_Geometry.GeomBox.m_lowZ |
m_highX | 8 | B_Geometry.GeomBox.m_highX |
m_highY | 8 | B_Geometry.GeomBox.m_highY |
m_highZ | 8 | B_Geometry.GeomBox.m_highZ |
m_tolerance | 8 | B_Geometry.TolerantUtilities.m_tolerance |
n_elements | 4 | B_Geometry.Vector.n_elements |
m_is_initialised | 1 | B_Geometry.Vector.m_is_initialised |
epsilon | 8 | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest.epsilon |
epsilon | 4 | MathosTest.Mathos_Main.Arithmetic .SingleArthimeticTest.epsilon |
_vectorContent | 4 | Mathos.Vector._vectorContent |
Statistics
Stat | Size of instance |
---|---|
Sum: | 118 |
Average: | 5.13 |
Minimum: | 1 |
Maximum: | 8 |
Standard deviation: | 2.25 |
Variance: | 5.07 |
Rule warning: Structures should be immutable |
warnif count > 0 from t in Application.Types where
t.IsStructure &&
!t.IsImmutable
let mutableFields = t.Fields.Where(f => !f.IsImmutable)
select new { t, t.NbLinesOfCode, mutableFields }
// It is deemed as a good practice to make
// your structure immutable.
// An object is immutable if its state doesn’t
// change once the object has been created.
// Consequently, a structure is immutable if
// its instances are immutable.
// Immutable types naturally simplify code by
// limiting side-effects.
// See some explanations on immutability and
// how NDepend supports it here:
// http://codebetter.com/blogs/patricksmacchia/archive/2008/01/13/immutable-types-understand-them-and-use-them.aspx
6 types matched
types | # lines of code (LOC) | mutableFields | Full Name |
---|---|---|---|
MainWindow+<DoError>d__8 | 1 | 6 fields | RubyInt.MainWindow+<DoError>d__8 |
MainWindow+<About_Executed>d__e | 1 | 6 fields | RubyInt.MainWindow+<About_Executed>d__e |
SingleArithmetic+FloatIntUnion | 0 | 2 fields | Mathos.Arithmetic .SingleArithmetic+FloatIntUnion |
ComplexNumber | 110 | 2 fields | Mathos.Arithmetic.ComplexNumbers .ComplexNumber |
Fraction | 166 | 2 fields | Mathos.Arithmetic.Fractions.Fraction |
Coordinate | 30 | 2 fields | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Coordinate |
Statistics
Stat | # lines of code (LOC) | mutableFields |
---|---|---|
Sum: | 308 | 0 |
Average: | 51.33 | 0 |
Minimum: | 0 | 0 |
Maximum: | 166 | 0 |
Standard deviation: | 64.22 | 0 |
Variance: | 4 124 | 0 |
Rule warning: Property Getters should be immutable |
warnif count > 0 from m in Application.Methods where
m.IsPropertyGetter &&
( ( !m.IsStatic && m.ChangesObjectState) ||
( m.IsStatic && m.ChangesTypeState) )
let fieldsAssigned = m.FieldsAssigned
select new { m, m.NbLinesOfCode, fieldsAssigned }
// This rule might be violated in the case of object lazy initialized
// when the property getter is accessed the first time.
// But in general, the callers of a property
// doesn't expect to change any state through the call.
4 methods matched
methods | # lines of code (LOC) | fieldsAssigned | Full Name |
---|---|---|---|
get_ResourceManager() | 4 | 1 field | B_Geometry.Properties.Resources .get_ResourceManager() |
get_ResourceManager() | 4 | 1 field | MathosTest.Properties.Resources .get_ResourceManager() |
get_ResourceManager() | 4 | 1 field | RubyInt.Properties.Resources .get_ResourceManager() |
get_ResourceManager() | 4 | 1 field | Interactive_Mathematics.Properties .Resources.get_ResourceManager() |
Statistics
Stat | # lines of code (LOC) | fieldsAssigned |
---|---|---|
Sum: | 16 | 0 |
Average: | 4 | 0 |
Minimum: | 4 | 0 |
Maximum: | 4 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Avoid static fields with a mutable field type |
warnif count > 0
from f in Application.Fields
where f.IsStatic && !f.IsEnumValue && !f.IsGeneratedByCompiler && !f.IsLiteral
let fieldType = f.FieldType
where fieldType != null &&
!fieldType.IsThirdParty &&
!fieldType.IsInterface &&
!fieldType.IsImmutable
select new { f,
mutableFieldType = fieldType ,
isFieldImmutable = f.IsImmutable,
isFieldIsReadOnly = f.IsInitOnly }
// As explained in this blog post
// http://codebetter.com/patricksmacchia/2011/05/04/back-to-basics-usage-of-static-members
// static fields should be used to hold only constant and immutable states.
3 fields matched
fields | mutableFieldType | isFieldImmutable | isFieldIsReadOnly | Full Name |
---|---|---|---|---|
defaultInstance | Settings | True | False | B_Geometry.Properties.Settings .defaultInstance |
defaultInstance | Settings | True | False | RubyInt.Properties.Settings .defaultInstance |
defaultInstance | Settings | True | False | Interactive_Mathematics.Properties .Settings.defaultInstance |
Statistics
Stat | mutableFieldType | isFieldImmutable | isFieldIsReadOnly |
---|---|---|---|
Sum: | 0 | 0 | 0 |
Average: | 0 | 0 | 0 |
Minimum: | 0 | 0 | 0 |
Maximum: | 0 | 0 | 0 |
Standard deviation: | 0 | 0 | 0 |
Variance: | 0 | 0 | 0 |
Rule warning: A field must not be assigned from outside its parent hierarchy types |
warnif count > 0
from f in JustMyCode.Fields.Where(f =>
!f.IsPrivate && !f.IsGeneratedByCompiler &&
!f.IsImmutable && !f.IsEnumValue)
let methodsAssignerOutsideOfMyType = f.MethodsAssigningMe.Where(
m =>!m.IsGeneratedByCompiler &&
m.ParentType != f.ParentType &&
!m.ParentType.DeriveFrom(f.ParentType) )
where methodsAssignerOutsideOfMyType.Count() > 0
select new { f, methodsAssignerOutsideOfMyType }
2 fields matched
fields | methodsAssignerOutsideOfMyType | Full Name |
---|---|---|
f | 1 method | Mathos.Arithmetic .SingleArithmetic+FloatIntUnion.f |
tmp | 1 method | Mathos.Arithmetic .SingleArithmetic+FloatIntUnion.tmp |
Statistics
Stat | methodsAssignerOutsideOfMyType |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Critical Rule warning: Don't assign a field from many methods |
warnif count > 0
from f in JustMyCode.Fields where
!f.IsEnumValue &&
!f.IsImmutable &&
!f.IsInitOnly &&
!f.IsGeneratedByCompiler &&
!f.IsEventDelegateObject &&
(f.IsPrivate || f.IsProtected) // Don't match fields assigned outside their classes.
// The threshold 4 is arbitrary and it should avoid matching too many fields.
// Threshold is even lower for static fields because this reveals situations even more complex.
where f.MethodsAssigningMe.Count() >= (!f.IsStatic ? 4 : 2)
select new { f,
f.MethodsAssigningMe,
f.MethodsReadingMeButNotAssigningMe,
f.MethodsUsingMe,
f.ParentType }
// A field assigned from many methods is a symptom of bug-prone code.
// This situation makes harder to anticipate the field state during runtime.
// The code is then hard to read, hard to debug and hard to maintain.
// Hard-to-solve bugs due to corrupted state are often the consequence of fields anarchically assigned.
//
// The situation is even more complex if the field is static.
// Indeed, this potentially involves global random accesses from different parts of the application.
// This is why this rule provides a lower threshold for static fields.
//
// If the object containing such field is meant to be used from multiple threads,
// there are alarming chances that the code is unmaintainable and bugged.
// When multiple threads are involved, the rule of thumb is to use immutable objects.
//
// If the field type is a reference type (interfaces, classes, strings, delegates)
// corrupted state might result in a NullReferenceException.
// If the field type is a value type (number, boolean, structure)
// corrupted state might result in wrong result not even signaled by an exception sent.
//
// There is no straight advice to refactor the number of methods responsible for assigning a field.
// Solutions often involve rethinking and then rewriting a complex algorithm.
// Such field can sometime become just a variable accessed locally by a method or a closure.
// Sometime, just rethinking the life-time and the role of the parent object allows the field to become immutable
// (i.e assigned only by the constructor).
7 fields matched
fields | MethodsAssigningMe | MethodsReadingMeButNotAssigningMe | MethodsUsingMe | ParentType | Full Name |
---|---|---|---|---|---|
mouse_clicked | 2 methods | 2 methods | 4 methods | Form1 | B_Geometry.Form1.mouse_clicked |
_currentFile | 4 methods | 0 method | 4 methods | MainWindow | RubyInt.MainWindow._currentFile |
_saved | 5 methods | 1 method | 6 methods | MainWindow | RubyInt.MainWindow._saved |
_firstSave | 4 methods | 1 method | 5 methods | MainWindow | RubyInt.MainWindow._firstSave |
_realPart | 4 methods | 14 methods | 18 methods | ComplexNumber | Mathos.Arithmetic.ComplexNumbers .ComplexNumber._realPart |
_imaginaryPart | 4 methods | 14 methods | 18 methods | ComplexNumber | Mathos.Arithmetic.ComplexNumbers .ComplexNumber._imaginaryPart |
_numerator | 4 methods | 8 methods | 12 methods | Fraction | Mathos.Arithmetic.Fractions.Fraction ._numerator |
Statistics
Stat | MethodsAssigningMe | MethodsReadingMeButNotAssigningMe | MethodsUsingMe | ParentType |
---|---|---|---|---|
Sum: | 0 | 0 | 0 | 0 |
Average: | 0 | 0 | 0 | 0 |
Minimum: | 0 | 0 | 0 | 0 |
Maximum: | 0 | 0 | 0 | 0 |
Standard deviation: | 0 | 0 | 0 | 0 |
Variance: | 0 | 0 | 0 | 0 |
Naming Conventions | 962 |
|
Rule warning: Instance fields should be prefixed with a 'm_' |
warnif count > 0 from f in Application.Fields where
!f.NameLike (@"^m_") &&
!f.IsStatic &&
!f.IsLiteral &&
!f.IsGeneratedByCompiler &&
!f.IsSpecialName &&
!f.IsEventDelegateObject
select new { f, f.SizeOfInst }
// This naming convention provokes debate.
// Don't hesitate to customize the regex of
// NameLike to your preference.
267 fields matched
fields | Size of instance | Full Name |
---|---|---|
HyperLink1 | 4 | Laboratory.Default.HyperLink1 |
Table1 | 4 | Laboratory.Modules.Table1 |
HeadContent | 4 | Laboratory.SiteMaster.HeadContent |
NavigationMenu | 4 | Laboratory.SiteMaster.NavigationMenu |
MainContent | 4 | Laboratory.SiteMaster.MainContent |
ChangeUserPassword | 4 | Laboratory.Account.ChangePassword .ChangeUserPassword |
RegisterHyperLink | 4 | Laboratory.Account.Login .RegisterHyperLink |
LoginUser | 4 | Laboratory.Account.Login.LoginUser |
RegisterUser | 4 | Laboratory.Account.Register.RegisterUser |
RegisterUserWizardStep | 4 | Laboratory.Account.Register .RegisterUserWizardStep |
DropDownList1 | 4 | Laboratory.Module.Converter .DropDownList1 |
Panel1 | 4 | Laboratory.Module.Converter.Panel1 |
DropDownList2 | 4 | Laboratory.Module.Converter .DropDownList2 |
TextBox1 | 4 | Laboratory.Module.Converter.TextBox1 |
DropDownList3 | 4 | Laboratory.Module.Converter .DropDownList3 |
TextBox2 | 4 | Laboratory.Module.Converter.TextBox2 |
CalculateButton | 4 | Laboratory.Module.Converter .CalculateButton |
ErrorLabel | 4 | Laboratory.Module.Converter.ErrorLabel |
ElapsedTimeLabel | 4 | Laboratory.Module.Converter .ElapsedTimeLabel |
TextBox1 | 4 | Laboratory.Module.EquationSolver .TextBox1 |
TextBox2 | 4 | Laboratory.Module.EquationSolver .TextBox2 |
TextBox3 | 4 | Laboratory.Module.EquationSolver .TextBox3 |
TextBox4 | 4 | Laboratory.Module.EquationSolver .TextBox4 |
TextBox5 | 4 | Laboratory.Module.EquationSolver .TextBox5 |
TextBox6 | 4 | Laboratory.Module.EquationSolver .TextBox6 |
SolveSystemOfTwoEquation | 4 | Laboratory.Module.EquationSolver .SolveSystemOfTwoEquation |
EquationErrorLabel | 4 | Laboratory.Module.EquationSolver .EquationErrorLabel |
EquationResultLabel | 4 | Laboratory.Module.EquationSolver .EquationResultLabel |
EquationElapsedTimeLabel | 4 | Laboratory.Module.EquationSolver .EquationElapsedTimeLabel |
TextBox7 | 4 | Laboratory.Module.EquationSolver .TextBox7 |
TextBox8 | 4 | Laboratory.Module.EquationSolver .TextBox8 |
TextBox9 | 4 | Laboratory.Module.EquationSolver .TextBox9 |
SolveQuadraticEquation | 4 | Laboratory.Module.EquationSolver .SolveQuadraticEquation |
QuadraticEquationErrorLabel | 4 | Laboratory.Module.EquationSolver .QuadraticEquationErrorLabel |
QuadraticEquationResultLabel | 4 | Laboratory.Module.EquationSolver .QuadraticEquationResultLabel |
QuadraticEquationElapsedTimeLabel | 4 | Laboratory.Module.EquationSolver .QuadraticEquationElapsedTimeLabel |
NumberText | 4 | Laboratory.Module.Factorial.NumberText |
CalculateButton | 4 | Laboratory.Module.Factorial .CalculateButton |
ErrorLabel | 4 | Laboratory.Module.Factorial.ErrorLabel |
ResultTextbox | 4 | Laboratory.Module.Factorial .ResultTextbox |
ElapsedTimeLabel | 4 | Laboratory.Module.Factorial .ElapsedTimeLabel |
Label1 | 4 | Laboratory.Module.IntegralApproximation .Label1 |
UpperBoundText | 4 | Laboratory.Module.IntegralApproximation .UpperBoundText |
LowerBoundText | 4 | Laboratory.Module.IntegralApproximation .LowerBoundText |
ExpressionText | 4 | Laboratory.Module.IntegralApproximation .ExpressionText |
Label2 | 4 | Laboratory.Module.IntegralApproximation .Label2 |
NumberOfIntervalsText | 4 | Laboratory.Module.IntegralApproximation .NumberOfIntervalsText |
CalculateButton | 4 | Laboratory.Module.IntegralApproximation .CalculateButton |
ErrorLabel | 4 | Laboratory.Module.IntegralApproximation .ErrorLabel |
Label3 | 4 | Laboratory.Module.IntegralApproximation .Label3 |
RectangleMethodResultLabel | 4 | Laboratory.Module.IntegralApproximation .RectangleMethodResultLabel |
RectangleMethodTimeLabel | 4 | Laboratory.Module.IntegralApproximation .RectangleMethodTimeLabel |
Label4 | 4 | Laboratory.Module.IntegralApproximation .Label4 |
TrapezoidalRuleResultLabel | 4 | Laboratory.Module.IntegralApproximation .TrapezoidalRuleResultLabel |
TrapezoidalRuleTimeLabel | 4 | Laboratory.Module.IntegralApproximation .TrapezoidalRuleTimeLabel |
Label5 | 4 | Laboratory.Module.IntegralApproximation .Label5 |
SimpsonsRuleResultLabel | 4 | Laboratory.Module.IntegralApproximation .SimpsonsRuleResultLabel |
SimpsonsRuleTimeLabel | 4 | Laboratory.Module.IntegralApproximation .SimpsonsRuleTimeLabel |
returnvalue | 4 | Laboratory.Module.MConverter.returnvalue |
DropDownList1 | 4 | Laboratory.Module.NumberChecker .DropDownList1 |
TextBox1 | 4 | Laboratory.Module.NumberChecker.TextBox1 |
CalculateButton | 4 | Laboratory.Module.NumberChecker .CalculateButton |
ErrorLabel | 4 | Laboratory.Module.NumberChecker .ErrorLabel |
ResultLabel | 4 | Laboratory.Module.NumberChecker .ResultLabel |
ElapsedTimeLabel | 4 | Laboratory.Module.NumberChecker .ElapsedTimeLabel |
TextBox1 | 4 | Laboratory.Module.Triangle.TextBox1 |
TextBox2 | 4 | Laboratory.Module.Triangle.TextBox2 |
TextBox3 | 4 | Laboratory.Module.Triangle.TextBox3 |
TextBox4 | 4 | Laboratory.Module.Triangle.TextBox4 |
TextBox5 | 4 | Laboratory.Module.Triangle.TextBox5 |
TextBox6 | 4 | Laboratory.Module.Triangle.TextBox6 |
CalculateButton | 4 | Laboratory.Module.Triangle .CalculateButton |
ErrorLabel | 4 | Laboratory.Module.Triangle.ErrorLabel |
ElapsedTimeLabel | 4 | Laboratory.Module.Triangle .ElapsedTimeLabel |
parser | 4 | Laboratory.Module.Uncertainty.parser |
tableInput | 4 | Laboratory.Module.Uncertainty.tableInput |
functionInput | 4 | Laboratory.Module.Uncertainty .functionInput |
CalculateButton | 4 | Laboratory.Module.Uncertainty .CalculateButton |
ErrorLabel | 4 | Laboratory.Module.Uncertainty.ErrorLabel |
TableOutput | 4 | Laboratory.Module.Uncertainty .TableOutput |
ElapsedTimeLabel | 4 | Laboratory.Module.Uncertainty .ElapsedTimeLabel |
TextBox1 | 4 | Laboratory.Module.DataAnalysis .LinearRegression.TextBox1 |
TextBox2 | 4 | Laboratory.Module.DataAnalysis .LinearRegression.TextBox2 |
Button1 | 4 | Laboratory.Module.DataAnalysis .LinearRegression.Button1 |
Label1 | 4 | Laboratory.Module.DataAnalysis .LinearRegression.Label1 |
lblLinearEq | 4 | Laboratory.Module.DataAnalysis .LinearRegression.lblLinearEq |
lblRVal | 4 | Laboratory.Module.DataAnalysis .LinearRegression.lblRVal |
lblRSqVal | 4 | Laboratory.Module.DataAnalysis .LinearRegression.lblRSqVal |
lblRegCoeff | 4 | Laboratory.Module.DataAnalysis .LinearRegression.lblRegCoeff |
lblIntr | 4 | Laboratory.Module.DataAnalysis .LinearRegression.lblIntr |
TextBox1 | 4 | Laboratory.Module.DataAnalysis.WebForm1 .TextBox1 |
Label1 | 4 | Laboratory.Module.DataAnalysis.WebForm1 .Label1 |
FindNthTerm | 4 | Laboratory.Module.DataAnalysis.WebForm1 .FindNthTerm |
Button1 | 4 | Laboratory.Module.DataAnalysis.WebForm1 .Button1 |
FutureValueText | 4 | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .FutureValueText |
RateOfReturnText | 4 | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .RateOfReturnText |
NumberOfPeriodsText | 4 | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .NumberOfPeriodsText |
RoundCheck | 4 | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .RoundCheck |
CalculateButton | 4 | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .CalculateButton |
ErrorLabel | 4 | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .ErrorLabel |
Statistics
Stat | Size of instance |
---|---|
Sum: | 1 291 |
Average: | 4.84 |
Minimum: | 1 |
Maximum: | 16 |
Standard deviation: | 2.53 |
Variance: | 6.38 |
Rule warning: Static fields should be prefixed with a 's_' |
warnif count > 0 from f in Application.Fields where
!f.NameLike (@"^s_") &&
f.IsStatic &&
!f.IsLiteral &&
!f.IsGeneratedByCompiler &&
!f.IsSpecialName &&
!f.IsEventDelegateObject
select new { f, f.SizeOfInst }
// This naming convention provokes debate.
// Don't hesitate to customize the regex of
// NameLike to your preference.
29 fields matched
fields | Size of instance | Full Name |
---|---|---|
angle | N/A | B_Geometry.Form1.angle |
session_curve | N/A | B_Geometry.Form1.session_curve |
mouse_clicked | N/A | B_Geometry.Form1.mouse_clicked |
mouse_position | N/A | B_Geometry.Form1.mouse_position |
resourceMan | N/A | B_Geometry.Properties.Resources .resourceMan |
resourceCulture | N/A | B_Geometry.Properties.Resources .resourceCulture |
defaultInstance | N/A | B_Geometry.Properties.Settings .defaultInstance |
testList | N/A | MathosTest.Statistics+Literals.testList |
testList2 | N/A | MathosTest.Statistics+Literals.testList2 |
testListSorted | N/A | MathosTest.Statistics+Literals .testListSorted |
testListModes | N/A | MathosTest.Statistics+Literals .testListModes |
testListProduct | N/A | MathosTest.Statistics+Literals .testListProduct |
testListOdd | N/A | MathosTest.Statistics+Literals .testListOdd |
emptyList | N/A | MathosTest.Statistics+Literals.emptyList |
resourceMan | N/A | MathosTest.Properties.Resources .resourceMan |
resourceCulture | N/A | MathosTest.Properties.Resources .resourceCulture |
resourceMan | N/A | RubyInt.Properties.Resources.resourceMan |
resourceCulture | N/A | RubyInt.Properties.Resources .resourceCulture |
defaultInstance | N/A | RubyInt.Properties.Settings .defaultInstance |
resourceMan | N/A | Interactive_Mathematics.Properties .Resources.resourceMan |
resourceCulture | N/A | Interactive_Mathematics.Properties .Resources.resourceCulture |
defaultInstance | N/A | Interactive_Mathematics.Properties .Settings.defaultInstance |
BaseArray | N/A | Mathos.Converter.Converter.BaseArray |
UnitConversions | N/A | Mathos.Converter.Converter .UnitConversions |
Lanczos15 | N/A | Mathos.SpecialFunctions.GammaRelated .Lanczos15 |
LogTable | N/A | Mathos.SpecialFunctions.GammaRelated .LogTable |
LogPi | N/A | Mathos.SpecialFunctions.GammaRelated .LogPi |
Log2Pi | N/A | Mathos.SpecialFunctions.GammaRelated .Log2Pi |
ListOfCommonPrimeNumbers | N/A | Mathos.Arithmetic.Numbers.Get .ListOfCommonPrimeNumbers |
Statistics
Stat | Size of instance |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Critical Rule warning: Exception class name should be suffixed with 'Exception' |
warnif count > 0 from t in Application.Types where
t.IsExceptionClass &&
// We use SimpleName, because in case of generic Exception type
// SimpleName suppresses the generic suffix (like <T>).
!t.SimpleNameLike (@"Exception$") &&
!t.SimpleNameLike (@"ExceptionBase$") // Allow the second suffix Base
// for base exception classes.
select new { t, t.SimpleName }
// The name of an exception class should end with 'Exception'.
1 types matched
type | SimpleName | Full Name |
---|---|---|
InvalidCoordinateFormat | InvalidCoordinateFormat | Mathos.Exceptions .InvalidCoordinateFormat |
Statistics
Stat | SimpleName |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Types name should begin with an Upper character |
warnif count > 0 from t in JustMyCode.Types where
// The name of a type should begin with an Upper letter.
!t.SimpleNameLike (@"^[A-Z]") &&
// Except if it is generated by compiler or ...
!t.IsSpecialName &&
!t.IsGeneratedByCompiler
select new { t, t.NbLinesOfCode }
2 types matched
types | # lines of code (LOC) | Full Name |
---|---|---|
coordinateStruct | 28 | MathosTest.coordinateStruct |
_Default | 87 | ProjectWebsite._Default |
Statistics
Stat | # lines of code (LOC) |
---|---|
Sum: | 115 |
Average: | 57.5 |
Minimum: | 28 |
Maximum: | 87 |
Standard deviation: | 29.5 |
Variance: | 870.25 |
Rule warning: Methods name should begin with an Upper character |
warnif count > 0 from m in JustMyCode.Methods where
!m.NameLike (@"^[A-Z]") &&
!m.IsSpecialName &&
!m.IsGeneratedByCompiler
select m
// The name of a regular method should
// begin with an Upper letter.
21 methods matched
methods | Full Name |
---|---|
func(Decimal) | Laboratory.Module.Uncertainty.func (Decimal) |
pow(Decimal,Decimal) | Laboratory.Module.Uncertainty.pow (Decimal,Decimal) |
getIndex(Int32,Int32) | B_Geometry.BGeomMatrix.getIndex(Int32 ,Int32) |
getElement(Int32,Int32) | B_Geometry.BGeomMatrix.getElement(Int32 ,Int32) |
setElement(Int32,Int32,Double) | B_Geometry.BGeomMatrix.setElement(Int32 ,Int32,Double) |
glControl1_MouseUp(Object,MouseEventArgs ) | B_Geometry.Form1.glControl1_MouseUp (Object,MouseEventArgs) |
glControl1_MouseMove(Object ,MouseEventArgs) | B_Geometry.Form1.glControl1_MouseMove (Object,MouseEventArgs) |
glControl1_MouseDown(Object ,MouseEventArgs) | B_Geometry.Form1.glControl1_MouseDown (Object,MouseEventArgs) |
button1_Click(Object,EventArgs) | B_Geometry.Form1.button1_Click(Object ,EventArgs) |
glControl1_Load(Object,EventArgs) | B_Geometry.Form1.glControl1_Load(Object ,EventArgs) |
glControl_Resize(Object,EventArgs) | B_Geometry.Form1.glControl_Resize(Object ,EventArgs) |
glControl1_Paint(Object,PaintEventArgs) | B_Geometry.Form1.glControl1_Paint(Object ,PaintEventArgs) |
lstPages_MouseLeftButtonUp(Object ,MouseButtonEventArgs) | RubyInt.HelpWindow .lstPages_MouseLeftButtonUp(Object ,MouseButtonEventArgs) |
browserWin_Navigating(Object ,NavigatingCancelEventArgs) | RubyInt.HelpWindow.browserWin_Navigating (Object,NavigatingCancelEventArgs) |
browserWin_LoadCompleted(Object ,NavigationEventArgs) | RubyInt.HelpWindow .browserWin_LoadCompleted(Object ,NavigationEventArgs) |
textEditor_TextArea_TextEntered(Object ,TextCompositionEventArgs) | RubyInt.MainWindow .textEditor_TextArea_TextEntered(Object ,TextCompositionEventArgs) |
textEditor_TextArea_TextEntering(Object ,TextCompositionEventArgs) | RubyInt.MainWindow .textEditor_TextArea_TextEntering(Object ,TextCompositionEventArgs) |
textBox1_KeyUp(Object,KeyEventArgs) | Interactive_Mathematics.MainWindow .textBox1_KeyUp(Object,KeyEventArgs) |
treeView1_MouseUp(Object ,MouseButtonEventArgs) | Interactive_Mathematics.MainWindow .treeView1_MouseUp(Object ,MouseButtonEventArgs) |
dataGrid1_MouseDoubleClick(Object ,MouseButtonEventArgs) | Interactive_Mathematics.MainWindow .dataGrid1_MouseDoubleClick(Object ,MouseButtonEventArgs) |
listView1_MouseDoubleClick(Object ,MouseButtonEventArgs) | Interactive_Mathematics.MainWindow .listView1_MouseDoubleClick(Object ,MouseButtonEventArgs) |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Avoid methods with name too long |
warnif count > 0 from m in Application.Methods where
!m.IsExplicitInterfaceImpl &&
!m.IsGeneratedByCompiler &&
((!m.IsSpecialName && m.SimpleName.Length > 35) ||
// Property getter/setter are prefixed with "get_" "set_" of length 4.
( m.IsSpecialName && m.SimpleName.Length - 4 > 35))
select new { m, m.SimpleName }
// The regex matches methods with name longer
// than 35 characters.
// Method Name doesn't contain the type and namespace
// prefix, FullName does.
// The regex computes the method name length from
// the beginning until the first open parenthesis
// or first lower than (for generic methods).
// Explicit Interface Implementation methods are
// discarded because their names are prefixed
// with the interface name.
11 methods matched
methods | SimpleName | Full Name |
---|---|---|
CentripetalMethod_calculateInterpolation Parameters(Vector[],Double[]&) | CentripetalMethod_calculateInterpolationParameters | B_Geometry.GeomUtils .CentripetalMethod_calculateInterpolatio nParameters(Vector[],Double[]&) |
CentripetalMethod_createSplineByInterpol ation(Int32,Vector[],BCurve&) | CentripetalMethod_createSplineByInterpolation | B_Geometry.GeomUtils .CentripetalMethod_createSplineByInterpo lation(Int32,Vector[],BCurve&) |
ComplexNumberConstructorsWithNonZeroValu edParameters() | ComplexNumberConstructorsWithNonZeroValuedParameters | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithNonZeroVal uedParameters() |
ComplexNumberConstructorsWithZeroValuedP arameters() | ComplexNumberConstructorsWithZeroValuedParameters | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithZeroValued Parameters() |
AddingFractionsWithDifferentDenominators () | AddingFractionsWithDifferentDenominators | MathosTest.TestOfFractions .AddingFractionsWithDifferentDenominator s() |
AddingFractionsWithCommonDenominator() | AddingFractionsWithCommonDenominator | MathosTest.TestOfFractions .AddingFractionsWithCommonDenominator() |
FirstDerivativeWithSeveralVariables2() | FirstDerivativeWithSeveralVariables2 | MathosTest.Calculus.CalculusTest .FirstDerivativeWithSeveralVariables2() |
BinomialDistributionStandardDeviation() | BinomialDistributionStandardDeviation | MathosTest.Mathos_Main .StatisticalDistributions .BinomialDistributionStandardDeviation() |
PoissonDistributionStandardDeviation() | PoissonDistributionStandardDeviation | MathosTest.Mathos_Main .StatisticalDistributions .PoissonDistributionStandardDeviation() |
HypergeometricDistributionStandardDeviat ion() | HypergeometricDistributionStandardDeviation | MathosTest.Mathos_Main .StatisticalDistributions .HypergeometricDistributionStandardDevia tion() |
TestThatNaiveHypotFailsWhenHypotWorks() | TestThatNaiveHypotFailsWhenHypotWorks | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest .TestThatNaiveHypotFailsWhenHypotWorks() |
Statistics
Stat | SimpleName |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Critical Rule warning: Avoid having different types with same name |
// Such practice typically creates confusion,
// and type naming collision inside a source file.
warnif count > 0
// This rule matches also collisions between
// application and third-party types sharing a same name.
let groups = JustMyCode.Types.Union(ThirdParty.Types)
// Discard nested types, whose name is
// prefixed with the parent type name.
.Where(t => !t.IsNested)
// Group types by name.
.GroupBy(t => t.Name)
from @group in groups
where @group.Count() > 1
// Let's see if types with the same name are declared
// in different namespaces.
// (t.FullName is {namespaceName}.{typeName} )
let groupsFullName = @group.GroupBy(t => t.FullName)
where groupsFullName.Count() > 1
// If several types with same name are declared in different namespaces
// eliminate the case where all types are declared in third-party assemblies.
let types= groupsFullName.SelectMany(g => g)
where types.Any(t => !t.IsThirdParty)
// Uncomment this line, to only gets naming collision involving
// both application and third-party types.
// && types.Any(t => t.IsThirdParty)
orderby types.Count() descending
select new { t = types.First(),
// In the 'types' column, make sure to group matched types
// by parent assemblies and parent namespaces, to get a result
// more readable.
types
}
12 types matched
types | types | Full Name |
---|---|---|
ChangePassword | 2 types | Laboratory.Account.ChangePassword |
Login | 2 types | Laboratory.Account.Login |
Converter | 2 types | Laboratory.Module.Converter |
EquationSolver | 2 types | Laboratory.Module.EquationSolver |
Triangle | 2 types | Laboratory.Module.Triangle |
Uncertainty | 2 types | Laboratory.Module.Uncertainty |
Program | 2 types | B_Geometry.Program |
Vector | 2 types | B_Geometry.Vector |
DecimalArithmetic | 2 types | MathosTest.Mathos_Main.Arithmetic .DecimalArithmetic |
App | 2 types | RubyInt.App |
MainWindow | 2 types | RubyInt.MainWindow |
Convert | 2 types | Mathos.Arithmetic.Numbers.Convert |
Statistics
Stat | types |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Avoid naming types and namespaces with the same identifier |
// Not only this can provoke compiler resolution collision,
// but also, this makes code less maintainable because
// concepts are not concisely identified.
warnif count > 0
let hashsetShortNames = Namespaces.Where(n => n.Name.Length > 0).Select(n => n.SimpleName).ToHashSet()
from t in JustMyCode.Types
where hashsetShortNames.Contains(t.Name)
select new { t, namespaces = Namespaces.Where(n => n.SimpleName == t.Name) }
7 types matched
types | namespaces | Full Name |
---|---|---|
Converter | 1 namespace | Laboratory.Module.Converter |
Uncertainty | 1 namespace | Laboratory.Module.Uncertainty |
Shapes | 1 namespace | MathosTest.Shapes |
Statistics | 1 namespace | MathosTest.Statistics |
Uncertainty | 1 namespace | MathosTest.Uncertainty.Uncertainty |
Converter | 1 namespace | Mathos.Converter.Converter |
Finance | 2 namespaces | Mathos.Finance.Finance |
Statistics
Stat | namespaces |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Source Files Organization | 240 |
|
Rule warning: Avoid defining multiple types in a source file |
warnif count > 0
// Build a lookup indexed by source files, values being a sequence of types defined in the source file.
let lookup = Application.Types.Where(t =>
t.SourceFileDeclAvailable &&
// except nested types and types generated by compilers!
!t.IsGeneratedByCompiler &&
!t.IsNested)
// It could make sense to not apply this rule for enumerations.
// && !t.IsEnumeration)
// We use multi-key, since a type can be declared in multiple source files.
.ToMultiKeyLookup(t => t.SourceDecls.Select(d => d.SourceFile))
from @group in lookup where @group.Count() > 1
let sourceFile = @group.Key
// CQLinq doesn't let indexing result with sourceFile
// so we choose a typeIndex in types,
// preferably the type that has the file name.
let typeWithSourceFileName = @group.FirstOrDefault(t => t.SimpleName == sourceFile.FileNameWithoutExtension)
let typeIndex = typeWithSourceFileName ?? @group.First()
select new { typeIndex,
types = @group as IEnumerable<IType>,
sourceFile.FilePathString }
10 types matched
types | types | FilePathString | Full Name |
---|---|---|---|
PythagoreanTest | 2 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Geometry\Geometry.cs | MathosTest.PythagoreanTest |
Vector | 2 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Matrices.cs | Mathos.Vector |
ConversionInfo | 2 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Converter\ConversionObjects.cs | Mathos.Converter.ConversionInfo |
Angle | 10 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Converter\ConversionTypes.cs | Mathos.Converter.Angle |
NumberList | 3 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Statistics\Statistics.cs | Mathos.Statistics.NumberList |
DenominatorNullException | 4 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\MathosExceptions.cs | Mathos.Exceptions .DenominatorNullException |
ComplexNumber | 2 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\ComplexNumberType.cs | Mathos.Arithmetic.ComplexNumbers .ComplexNumber |
INaturalNumber | 10 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers.INaturalNumber |
Calculate | 2 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Geometry\CoordinateGeometry.cs | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Calculate |
ArithmeticProgression | 3 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\PreCalculus\Sequences.cs | Mathos.PreCalculus.Sequences .ArithmeticProgression |
Statistics
Stat | types | FilePathString |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Namespace name should correspond to file location |
// For a good code organization,
// do mirror the namespaces hierarchy and the source files directories tree.
warnif count > 0
from n in Application.Namespaces
// Replace dots by spaces in namespace name
let dirCorresponding = n.Name.Replace('.', ' ')
// Look at source file decl of JustMyCode type's declared in n
from t in n.ChildTypes
where JustMyCode.Contains(t) && t.SourceFileDeclAvailable
from decl in t.SourceDecls
let sourceFilePath = decl.SourceFile.FilePath.ToString()
// Replace dots and path separators by spaces in source files names
where !sourceFilePath.Replace('.',' ').Replace('\\',' ').Contains(dirCorresponding)
select new { t, dirCorresponding , sourceFilePath }
36 types matched
types | dirCorresponding | sourceFilePath | Full Name |
---|---|---|---|
CalculusTest | MathosTest Calculus | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Calculus\CalculusTest.cs | MathosTest.Calculus.CalculusTest |
UnitTest1 | MathosTest SpecialFunctions | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\SpecialFunctions\Antiderivatives.cs | MathosTest.SpecialFunctions.UnitTest1 |
Uncertainty | MathosTest Uncertainty | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Uncertainty\Uncertainty.cs | MathosTest.Uncertainty.Uncertainty |
StatisticalDistributions | MathosTest Mathos_Main | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Statistics and DiceSim\StatisticalDistributions.cs | MathosTest.Mathos_Main .StatisticalDistributions |
SyntaxTest | MathosTest Mathos_Main | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\syntaxTest.cs | MathosTest.Mathos_Main.SyntaxTest |
ComplexArithmeticTest | MathosTest Mathos_Main Arithmetic | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Arithmetic\ComplexArithmeticTest.cs | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest |
DoubleArthimeticTest | MathosTest Mathos_Main Arithmetic | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Arithmetic\DoubleArthimeticTest.cs | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest |
IntegerArthimeticTest | MathosTest Mathos_Main Arithmetic | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Arithmetic\IntegerArthimeticTest.cs | MathosTest.Mathos_Main.Arithmetic .IntegerArthimeticTest |
SingleArthimeticTest | MathosTest Mathos_Main Arithmetic | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Arithmetic\SingleArthimeticTest.cs | MathosTest.Mathos_Main.Arithmetic .SingleArthimeticTest |
DecimalArithmetic | MathosTest Mathos_Main Arithmetic | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Arithmetic\DecimalArithmetic.cs | MathosTest.Mathos_Main.Arithmetic .DecimalArithmetic |
FiniteCalculusTest | MathosTest Mathos_Main Calculus | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Calculus\FiniteCalculusTest.cs | MathosTest.Mathos_Main.Calculus .FiniteCalculusTest |
ElementaryTests | MathosTest Mathos_Main SpecialFunctions | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\SpecialFunctions\ElementaryTests.cs | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests |
GammaTests | MathosTest Mathos_Main SpecialFunctions | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\SpecialFunctions\GammaTests.cs | MathosTest.Mathos_Main.SpecialFunctions .GammaTests |
FrmTable | Interactive_Mathematics | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Interactive Mathematics\frmTable.xaml.cs | Interactive_Mathematics.FrmTable |
App | Interactive_Mathematics | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Interactive Mathematics\App.xaml.cs | Interactive_Mathematics.App |
MainWindow | Interactive_Mathematics | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Interactive Mathematics\MainWindow.xaml.cs | Interactive_Mathematics.MainWindow |
BenchmarkUtil | Mathos Testing | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\BenchmarkUtil.cs | Mathos.Testing.BenchmarkUtil |
DenominatorNullException | Mathos Exceptions | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\MathosExceptions.cs | Mathos.Exceptions .DenominatorNullException |
InvalidCoordinateFormat | Mathos Exceptions | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\MathosExceptions.cs | Mathos.Exceptions .InvalidCoordinateFormat |
InvalidFractionFormatException | Mathos Exceptions | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\MathosExceptions.cs | Mathos.Exceptions .InvalidFractionFormatException |
InvalidTriangleException | Mathos Exceptions | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\MathosExceptions.cs | Mathos.Exceptions .InvalidTriangleException |
ComplexNumber | Mathos Arithmetic ComplexNumbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\ComplexNumberType.cs | Mathos.Arithmetic.ComplexNumbers .ComplexNumber |
ComplexOperation | Mathos Arithmetic ComplexNumbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\ComplexNumberType.cs | Mathos.Arithmetic.ComplexNumbers .ComplexOperation |
INaturalNumber | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers.INaturalNumber |
IInteger | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers.IInteger |
IRationalNumber | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers .IRationalNumber |
Check | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers.Check |
Get | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers.Get |
Convert | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers.Convert |
IIRationalNumber | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers .IIRationalNumber |
IRealNumber | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers.IRealNumber |
IImaginary | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers.IImaginary |
IComplex | Mathos Arithmetic Numbers | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\NumberOperations.cs | Mathos.Arithmetic.Numbers.IComplex |
Fraction | Mathos Arithmetic Fractions | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Arithmetic\FractionType.cs | Mathos.Arithmetic.Fractions.Fraction |
Calculate | Mathos Geometry CoordinateGeometry TwoDimensional | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Geometry\CoordinateGeometry.cs | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Calculate |
Coordinate | Mathos Geometry CoordinateGeometry TwoDimensional | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Geometry\CoordinateGeometry.cs | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Coordinate |
Statistics
Stat | dirCorresponding | sourceFilePath |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Types with source files stored in the same directory, should be declared in the same namespace |
warnif count > 0
// Group JustMyCode types in a lookup
// where groups are keyed with directories that contain the types' source file(s).
// Note that a type can be contained in several groups
// if it is declared in several source files stored in different directories.
let lookup = JustMyCode.Types.Where(t => t.SourceFileDeclAvailable)
.ToMultiKeyLookup(
t => t.SourceDecls.Select(
decl => decl.SourceFile.FilePath.ParentDirectoryPath).Distinct()
)
from groupOfTypes in lookup
let parentNamespaces = groupOfTypes.ParentNamespaces()
// Select group of types (with source files stored in the same directory) ...
// ... but contained in several namespaces
where parentNamespaces.Count() > 1
// mainNamespaces is the namespace that contains many types
// declared in the directory groupOfTypes .key
let mainNamespace = groupOfTypes
.ToLookup(t => t.ParentNamespace)
.OrderByDescending(g => g.Count()).First().Key
// Select types with source files stored in the same directory,
// but contained in namespaces different than mainNamespace.
let typesOutOfMainNamespace = groupOfTypes
.Where(t => t.ParentNamespace != mainNamespace )
// Filter types declared on several source files that contain generated methods
// because typically such type contains one or several partial definitions generated.
// These partially generated types would be false positive for the present rule.
.Where(t => t.SourceDecls.Count() == 1 ||
t.Methods.Count(m => JustMyCode.Contains(m)) == 0)
where typesOutOfMainNamespace.Count() > 0
select new { mainNamespace,
// Typically a type in typesOutOfMainNamespace ...
// 1) ... is contained in the wrong namespace but its source file(s) is stored in the right directory.
// --> In such situation the type should be contained in mainNamespace.
// 2) ... is contained in the right namespace but its source file(s) is stored in the wrong directory
// --> In such situation the source file of type must be moved to the parent namespace directory.
// 3) ... is declared in multiple source files, stored in different directories.
// --> It would be preferable that all source files are stored in a single directory.
typesOutOfMainNamespace }
8 namespaces matched
namespaces | typesOutOfMainNamespace | Full Name |
---|---|---|
MathosTest.Mathos_Main.Arithmetic | 3 types | MathosTest.Mathos_Main.Arithmetic |
MathosTest | 1 type | MathosTest |
MathosTest | 1 type | MathosTest |
MathosTest.Calculus | 1 type | MathosTest.Calculus |
MathosTest.Mathos_Main.SpecialFunctions | 1 type | MathosTest.Mathos_Main.SpecialFunctions |
Mathos.Exceptions | 5 types | Mathos.Exceptions |
Mathos.Arithmetic | 13 types | Mathos.Arithmetic |
Mathos.Geometry.CoordinateGeometry .TwoDimensional | 1 type | Mathos.Geometry.CoordinateGeometry .TwoDimensional |
Statistics
Stat | typesOutOfMainNamespace |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Types declared in the same namespace, should have their source files stored in the same directory |
warnif count > 0
from @namespace in Application.Namespaces
// Group types of @namespace in a lookup
// where groups are keyed with directories that contain the types' source file(s).
// Note that a type can be contained in several groups
// if it is declared in several source files stored in different directories.
let lookup = @namespace.ChildTypes.Where(t => t.SourceFileDeclAvailable && JustMyCode.Contains(t))
.ToMultiKeyLookup(
t => t.SourceDecls.Select(
decl => decl.SourceFile.FilePath.ParentDirectoryPath).Distinct()
)
// Are types of @namespaces declared in more than one directory?
where lookup.Count > 1
// Infer the main folder, preferably the one that has the same name as the namespace.
let dirs = lookup.Select(types => types.Key)
let mainDirNullable = dirs.Where(d => d.DirectoryName == @namespace.SimpleName).FirstOrDefault()
let mainDir = mainDirNullable ?? dirs.First()
// Types declared out of mainDir, are types in group of types declared in a directory different than mainDir!
let typesDeclaredOutOfMainDir = lookup.Where(types => types.Key != mainDir)
.SelectMany(types => types)
// Filter types declared on several source files that contain generated methods
// because typically such type contains one or several partial definitions generated.
// These partially generated types would be false positive for the present rule.
.Where(t => t.SourceDecls.Count() == 1 ||
t.Methods.Count(m => JustMyCode.Contains(m)) == 0)
where typesDeclaredOutOfMainDir.Count() > 0
select new { @namespace,
// Typically a type in typesDeclaredOutOfMainDir ...
// 1) ... is contained in the wrong namespace but its source file(s) is stored in the right directory.
// --> In such situation the type parent namespace should be the namespace corresponding to the directory.
// 2) ... is contained in the right namespace but its source file(s) is stored in the wrong directory
// --> In such situation the type source file should be moved to mainDir.
// 3) ... is declared in multiple source files, stored in different directories.
// --> It would be preferable that all source files are stored in a single directory.
typesDeclaredOutOfMainDir ,
mainDir = mainDir.ToString() }
3 namespaces matched
namespaces | typesDeclaredOutOfMainDir | mainDir | Full Name |
---|---|---|---|
MathosTest | 11 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Arithmetic | MathosTest |
MathosTest.Mathos_Main | 1 type | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Statistics and DiceSim | MathosTest.Mathos_Main |
Mathos.Statistics | 3 types | c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\Statistics | Mathos.Statistics |
Statistics
Stat | typesDeclaredOutOfMainDir | mainDir |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
.NET Framework Usage | 2670 |
|
System | 850 |
|
Rule warning: Mark assemblies with CLSCompliant |
warnif count > 0 from a in Application.Assemblies where
!a.HasAttribute ("System.CLSCompliantAttribute".AllowNoMatch())
select a
// The Common Language Specification (CLS) defines
// naming restrictions, data types, and rules to which
// assemblies must conform if they are to be used
// across programming languages. Good design dictates
// that all assemblies explicitly indicate CLS
// compliance with CLSCompliantAttribute. If the
// attribute is not present on an assembly, the
// assembly is not compliant.
6 assemblies matched
assemblies | Full Name |
---|---|
Laboratory | Laboratory |
B_Geometry | B_Geometry |
MathosTest | MathosTest |
ProjectWebsite | ProjectWebsite |
Interactive Mathematics | Interactive Mathematics |
Mathos | Mathos |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Remove calls to GC.Collect() |
warnif count > 0
let gcCollectMethods = ThirdParty.Methods.WithFullNameIn(
"System.GC.Collect()",
"System.GC.Collect(Int32)",
"System.GC.Collect(Int32,GCCollectionMode)")
from m in Application.Methods.UsingAny(gcCollectMethods)
select m
// It is preferrable to avoid calling GC.Collect()
// explicitely in order to avoid some performance pitfall.
// More in information on this here:
// http://blogs.msdn.com/ricom/archive/2004/11/29/271829.aspx
5 methods matched
methods | Full Name |
---|---|
<Page_Load>b__a(Decimal[]) | ProjectWebsite._Default+< >c__DisplayClass1f.<Page_Load>b__a (Decimal[]) |
<Page_Load>b__b(Decimal[]) | ProjectWebsite._Default+< >c__DisplayClass1f.<Page_Load>b__b (Decimal[]) |
<Page_Load>b__c(Decimal[]) | ProjectWebsite._Default+< >c__DisplayClass1f.<Page_Load>b__c (Decimal[]) |
<.ctor>b__b(Decimal[]) | Interactive_Mathematics.MainWindow+< >c__DisplayClass19.<.ctor>b__b(Decimal[] ) |
Benchmark(Action,Int32) | Mathos.Testing.BenchmarkUtil.Benchmark (Action,Int32) |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Don't call GC.Collect() without calling GC.WaitForPendingFinalizers() |
warnif count > 0
let gcCollectMethods = ThirdParty.Methods.WithFullNameIn(
"System.GC.Collect()",
"System.GC.Collect(Int32)",
"System.GC.Collect(Int32,GCCollectionMode)")
from m in Application.Methods.UsingAny(gcCollectMethods) where
!m.IsUsing ("System.GC.WaitForPendingFinalizers()".AllowNoMatch())
select new { m, m.NbLinesOfCode }
// It is preferrable to avoid calling GC.Collect()
// explicitely in order to avoid some performance
// pitfall. But if you wish to call GC.Collect(),
// you must do it this way:
// GC.Collect();
// GC.WaitForPendingFinalizers();
// GC.Collect();
// To make sure that finalizer got executed, and
// object with finalizer got cleaned properly.
4 methods matched
methods | # lines of code (LOC) | Full Name |
---|---|---|
<Page_Load>b__a(Decimal[]) | 21 | ProjectWebsite._Default+< >c__DisplayClass1f.<Page_Load>b__a (Decimal[]) |
<Page_Load>b__b(Decimal[]) | 22 | ProjectWebsite._Default+< >c__DisplayClass1f.<Page_Load>b__b (Decimal[]) |
<Page_Load>b__c(Decimal[]) | 28 | ProjectWebsite._Default+< >c__DisplayClass1f.<Page_Load>b__c (Decimal[]) |
<.ctor>b__b(Decimal[]) | 20 | Interactive_Mathematics.MainWindow+< >c__DisplayClass19.<.ctor>b__b(Decimal[] ) |
Statistics
Stat | # lines of code (LOC) |
---|---|
Sum: | 91 |
Average: | 22.75 |
Minimum: | 20 |
Maximum: | 28 |
Standard deviation: | 3.11 |
Variance: | 9.69 |
Rule warning: Enum Storage should be Int32 |
warnif count > 0 from f in Fields where
f.Name == @"value__" &&
!f.FieldTypeIs ("System.Int32".AllowNoMatch()) &&
!f.IsThirdParty
select new { f, f.SizeOfInst, f.FieldType }
// An enumeration is a value type that defines
// a set of related named constants. By default,
// the System.Int32 data type is used to store
// the constant value. Even though you can change
// this underlying type, it is not necessary or
// recommended for most scenarios. Note that there
// is no significant performance gain in using
// a data type smaller than Int32. If you cannot
// use the default data type, you should use one
// of the CLS-compliant integral types, Byte,
// Int16, Int32, or Int64, to ensure that all of
// the enumeration's values are representable in
// CLS-compliant programming languages.
1 fields matched
field | Size of instance | FieldType | Full Name |
---|---|---|---|
value__ | 1 | SByte | Mathos.Converter.Base.value__ |
Statistics
Stat | Size of instance | FieldType |
---|---|---|
Sum: | 1 | 0 |
Average: | 1 | 0 |
Minimum: | 1 | 0 |
Maximum: | 1 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Do not raise too general exception types |
warnif count > 0 from m in Application.Methods where
// Test for non-constructor, else this rule
// would warn on ctor of classes that derive
// from these exception types.
!m.IsConstructor && (
m.CreateA("System.Exception".AllowNoMatch()) ||
m.CreateA("System.ApplicationException".AllowNoMatch()) ||
m.CreateA("System.SystemException".AllowNoMatch()) )
select m
11 methods matched
methods | Full Name |
---|---|
ReplaceRow(Int32,Vector) | B_Geometry.BGeomMatrix.ReplaceRow(Int32 ,Vector) |
GaussianElimination(BGeomMatrix,Vector ,Double[]&) | B_Geometry.LinearAlgebra .GaussianElimination(BGeomMatrix,Vector ,Double[]&) |
op_Addition(Vector,Vector) | B_Geometry.Vector.op_Addition(Vector ,Vector) |
op_Subtraction(Vector,Vector) | B_Geometry.Vector.op_Subtraction(Vector ,Vector) |
Subtract(Vector,Vector) | B_Geometry.Vector.Subtract(Vector,Vector ) |
Subtract(Vector) | B_Geometry.Vector.Subtract(Vector) |
DotProduct(Vector) | B_Geometry.Vector.DotProduct(Vector) |
Cofactor() | Mathos.Matrix.Cofactor() |
Adjugate() | Mathos.Matrix.Adjugate() |
Inverse() | Mathos.Matrix.Inverse() |
GetNextTerm(Double[],Int32) | Mathos.Calculus.FiniteCalculus .GetNextTerm(Double[],Int32) |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
System.Collection | 110 |
|
Rule warning: Collection properties should be read only |
// A writable collection property allows a user to replace the collection with
// a completely different collection. A read-only property stops the collection
// from being replaced but still allows the individual members to be set.
// If replacing the collection is a goal, the preferred design pattern is to
// include a method to remove all the elements from the collection
// (with a call to the ICollection.Clear() method) and then re-populate the collection.
warnif count > 0
// First find collectionTypes
let collectionInterfaces = ThirdParty.Types.WithFullNameIn(
"System.Collections.ICollection", "System.Collections.Generic.ICollection<T>")
where collectionInterfaces.Count() > 0
let collectionTypes = Types.ThatImplementAny(collectionInterfaces)
.Union(collectionInterfaces).ToHashSet()
// Then find all property setters that have an associated
// getter that returns a collection type.
from propGetter in Application.Methods.Where(
m => m.IsPropertyGetter &&
m.ReturnType != null &&
collectionTypes.Contains(m.ReturnType))
let propSetter = propGetter.ParentType.Methods.WithSimpleName(
propGetter.SimpleName.Replace("get_","set_"))
.SingleOrDefault()
where propSetter != null &&
!propSetter.IsPrivate
select new { propSetter, propGetter.ReturnType }
1 methods matched
method | ReturnType | Full Name |
---|---|---|
set_Elements(Double[]) | Array | B_Geometry.Vector.set_Elements(Double[]) |
Statistics
Stat | ReturnType |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
System.Globalization | 010 |
|
Rule warning: Float and Date Parsing must be culture aware |
warnif count > 0
from m in ThirdParty.Types.WithFullNameIn(
"System.DateTime",
"System.Single",
"System.Double",
"System.Decimal").ChildMethods()
where m.NbParameters > 0 &&
(m.SimpleName == "Parse" ||
m.SimpleName == "ToString") &&
!m.Name.Contains("IFormatProvider")
select new { m, m.MethodsCallingMe }
2 methods matched
methods | MethodsCallingMe | Full Name |
---|---|---|
Parse(String) | 1 method | System.Decimal.Parse(String) |
Parse(String) | 3 methods | System.Double.Parse(String) |
Statistics
Stat | MethodsCallingMe |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Object Oriented Design
|
Base class should not use derivatives |
warnif count > 0
from baseClass in JustMyCode.Types
where baseClass.IsClass && baseClass.NbChildren > 0 // <-- for optimization!
let derivedClassesUsed = baseClass.DerivedTypes.UsedBy(baseClass)
where derivedClassesUsed.Count() > 0
select new { baseClass, derivedClassesUsed }
No types matched
Class shouldn't be too deep in inheritance tree |
warnif count > 0 from t in JustMyCode.Types
where t.IsClass
let baseClasses = t.BaseClasses.ExceptThirdParty()
// Warn for classes with 3 or more base classes.
// Notice that we don't count third-party classes
// because this rule concerns your code design,
// not third-party libraries consumed design.
where baseClasses.Count() >= 3
select new { t, baseClasses,
// The metric value DepthOfInheritance takes account
// of third-party base classes
t.DepthOfInheritance }
// Branches too long in the derivation should be avoided.
// See the definition of the DepthOfInheritance metric here
// http://www.ndepend.com/Metrics.aspx#DIT
No types matched
Rule warning: Class with no descendant should be sealed if possible |
warnif count > 0 from t in JustMyCode.Types where
t.IsClass &&
t.NbChildren ==0 &&
!t.IsSealed &&
!t.IsStatic
// && !t.IsPublic <-- You might want to add this condition
// if you are developing a framework
// with classes that are intended to be
// sub-classed by your clients.
orderby t.NbLinesOfCode descending
select new { t, t.NbLinesOfCode }
115 types matched
types | # lines of code (LOC) | Full Name |
---|---|---|
Matrix | 249 | Mathos.Matrix |
Form1 | 170 | B_Geometry.Form1 |
VectorsAndMatrices | 166 | MathosTest.VectorsAndMatrices |
MainWindow | 122 | RubyInt.MainWindow |
UncertainNumber | 112 | Mathos.Statistics.UncertainNumber |
MainWindow | 99 | Interactive_Mathematics.MainWindow |
BasisFunction | 98 | B_Geometry.BasisFunction |
Shapes | 98 | MathosTest.Shapes |
BGeomMatrix | 96 | B_Geometry.BGeomMatrix |
TestofcomplexNumbers | 96 | MathosTest.TestofcomplexNumbers |
Triangle | 93 | Mathos.Geometry.Shapes.Triangle |
DoubleArthimeticTest | 90 | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest |
IntegralApproximation | 88 | Laboratory.Module.IntegralApproximation |
_Default | 87 | ProjectWebsite._Default |
GeomUtils | 85 | B_Geometry.GeomUtils |
Vector | 84 | Mathos.Vector |
Vector | 83 | B_Geometry.Vector |
Converter | 75 | Laboratory.Module.Converter |
TestOfFractions | 75 | MathosTest.TestOfFractions |
Get | 70 | Mathos.Arithmetic.Numbers.Get |
Statistics | 57 | MathosTest.Statistics |
Uncertainty | 52 | MathosTest.Uncertainty.Uncertainty |
ComplexArithmeticTest | 50 | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest |
ConverterTest | 48 | MathosTest.ConverterTest |
LinearAlgebra | 45 | B_Geometry.LinearAlgebra |
BCurve | 41 | B_Geometry.BCurve |
Fibonacci | 41 | Mathos.PreCalculus.Sequences.Fibonacci |
DiceSimulator | 40 | Mathos.Statistics.DiceSimulator |
Trapezoid | 39 | Mathos.Geometry.Shapes.Trapezoid |
DiscreteMathematics | 38 | MathosTest.DiscreteMathematics |
FiniteCalculusTest | 38 | MathosTest.Mathos_Main.Calculus .FiniteCalculusTest |
EquationSolver | 35 | Laboratory.Module.EquationSolver |
Extension | 33 | RubyInt.Extension |
RightCircularCone | 31 | Mathos.Geometry.Shapes.RightCircularCone |
RightCircularCylinder | 31 | Mathos.Geometry.Shapes .RightCircularCylinder |
RectangularPrism | 31 | Mathos.Geometry.Shapes.RectangularPrism |
AngleConversionM | 30 | Mathos.Converter.AngleConversionM |
SquarePyramid | 29 | Mathos.Geometry.Shapes.SquarePyramid |
Uncertainty | 28 | Laboratory.Module.Uncertainty |
coordinateStruct | 28 | MathosTest.coordinateStruct |
CalculusTest | 27 | MathosTest.Calculus.CalculusTest |
Rectangle | 27 | Mathos.Geometry.Shapes.Rectangle |
Cube | 26 | Mathos.Geometry.Shapes.Cube |
Circle | 26 | Mathos.Geometry.Shapes.Circle |
RightTriangle | 26 | Mathos.Geometry.Shapes.RightTriangle |
Parallelogram | 26 | Mathos.Geometry.Shapes.Parallelogram |
NumberChecker | 25 | Laboratory.Module.NumberChecker |
WebForm1 | 24 | Laboratory.Module.DataAnalysis.WebForm1 |
ElementaryTests | 24 | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests |
HelpWindow | 24 | RubyInt.HelpWindow |
Square | 24 | Mathos.Geometry.Shapes.Square |
PythagoreanTest | 23 | MathosTest.PythagoreanTest |
Sphere | 23 | Mathos.Geometry.Shapes.Sphere |
StatisticalDistributions | 20 | MathosTest.Mathos_Main .StatisticalDistributions |
FinanceNetPresentValue | 18 | Laboratory.Module.Finance .FinanceNetPresentValue |
LinearRegression | 17 | Laboratory.Module.DataAnalysis .LinearRegression |
FinanceTest | 17 | MathosTest.FinanceTest |
Check | 17 | Mathos.Arithmetic.Numbers.Check |
Triangle | 16 | Laboratory.Module.Triangle |
DataViewWindow | 16 | RubyInt.DataViewWindow |
Calculate | 16 | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Calculate |
BenchmarkUtil | 15 | Mathos.Testing.BenchmarkUtil |
Ring | 15 | Mathos.Geometry.Shapes.Ring |
GeometricProgression | 15 | Mathos.PreCalculus.Sequences .GeometricProgression |
FinanceRemainingBalanceOfAnnuity | 14 | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity |
Program | 14 | B_Geometry.New.Program |
GammaTests | 14 | MathosTest.Mathos_Main.SpecialFunctions .GammaTests |
Ellipse | 14 | Mathos.Geometry.Shapes.Ellipse |
GeomBox | 13 | B_Geometry.GeomBox |
TemperatureConversion | 13 | Mathos.Converter.TemperatureConversion |
LinearModels+LinearRegressionResults | 13 | Mathos.Statistics .LinearModels+LinearRegressionResults |
FinanceAnnuityPaymentFutureValue | 12 | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue |
FinanceAnnuityPaymentPresentValue | 12 | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue |
FinanceFutureValue | 12 | Laboratory.Module.Finance .FinanceFutureValue |
FinanceFutureValueOfAnAnnuity | 12 | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity |
FinancePresentValue | 12 | Laboratory.Module.Finance .FinancePresentValue |
FinancePresentValueOfAnAnnuity | 12 | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity |
DiceSimulatorTest | 12 | MathosTest.DiceSimulatorTest |
SyntaxTest | 12 | MathosTest.Mathos_Main.SyntaxTest |
ArithmeticProgression | 11 | Mathos.PreCalculus.Sequences .ArithmeticProgression |
EquationSolverTest | 10 | MathosTest.EquationSolverTest |
LinearModelsTest | 10 | MathosTest.LinearModelsTest |
Torus | 10 | Mathos.Geometry.Shapes.Torus |
Factorial | 9 | Laboratory.Module.Factorial |
PreCalculus | 9 | MathosTest.PreCalculus |
Statistics+Literals | 7 | MathosTest.Statistics+Literals |
MyCompletionData | 7 | RubyInt.MyCompletionData |
Register | 6 | Laboratory.Account.Register |
TolerantUtilities | 6 | B_Geometry.TolerantUtilities |
Convert | 6 | Mathos.Arithmetic.Numbers.Convert |
App | 5 | RubyInt.App |
FrmTable | 5 | Interactive_Mathematics.FrmTable |
SingleArthimeticTest | 4 | MathosTest.Mathos_Main.Arithmetic .SingleArthimeticTest |
DenominatorNullException | 4 | Mathos.Exceptions .DenominatorNullException |
InvalidCoordinateFormat | 4 | Mathos.Exceptions .InvalidCoordinateFormat |
InvalidFractionFormatException | 4 | Mathos.Exceptions .InvalidFractionFormatException |
InvalidTriangleException | 4 | Mathos.Exceptions .InvalidTriangleException |
ResultsWindow | 3 | RubyInt.ResultsWindow |
ConversionInfo | 3 | Mathos.Converter.ConversionInfo |
ConversionBase | 3 | Mathos.Converter.ConversionBase |
Statistics
Stat | # lines of code (LOC) |
---|---|
Sum: | 3 740 |
Average: | 32.52 |
Minimum: | 0 |
Maximum: | 249 |
Standard deviation: | 40.25 |
Variance: | 1 620 |
Overrides of Method() should call base.Method() |
// Overrides of Method() should refine the behavior of base.Method().
// If base.Method() is not called, the base behavior is not refined but it is replaced.
// Violations of this rule are a sign of design flaw,
// especially if the design provides valid reasons
// that advocates that the base behavior must be replaced and not refined.
//
// Discussions on this topic are available here:
// http://stackoverflow.com/questions/1107022/should-i-call-the-base-class-implementation-when-overriding-a-method-in-c-sharp
// http://stackoverflow.com/questions/2945147/make-sure-base-method-gets-called-in-c-sharp
warnif count > 0
from t in Types // Take account of third-party types too
// Bother only classes with descendant
where t.IsClass && t.NbChildren > 0
from mBase in t.InstanceMethods
where mBase.IsVirtual &&
!mBase.IsThirdParty &&
!mBase.IsAbstract &&
!mBase.IsExplicitInterfaceImpl
from mOverride in mBase.OverridesDirectDerived
where !mOverride.IsUsing(mBase)
select new { mOverride, shouldCall = mBase, definedInBaseClass = mBase.ParentType }
No methods matched
Do not hide base class methods |
// 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.
// More on hiding vs. virtual usefulness here:
// http://www.artima.com/intv/nonvirtual.html
// http://blogs.msdn.com/b/ericlippert/archive/2008/05/21/method-hiding-apologia.aspx
warnif count > 0
// Define a lookup table indexing methods by their name including parameters signature.
let lookup = Methods.Where(m => !m.IsConstructor && !m.IsStatic && !m.IsGeneratedByCompiler)
.ToLookup(m1 => m1.Name)
from t in Application.Types
where !t.IsStatic && t.IsClass &&
// Discard classes deriving directly from System.Object
t.DepthOfInheritance > 1
where t.BaseClasses.Any()
// For each methods not overriding any methods (new slot),
// let's check if it hides by name some methods defined in base classe.
from m in t.InstanceMethods
where m.IsNewSlot && !m.IsExplicitInterfaceImpl && !m.IsGeneratedByCompiler
// Notice how lookup is used to quickly retrieve methods with same name as m.
// This makes the query 10 times faster than iterating each base methods to check their name.
let baseMethodsHidden = lookup[m.Name].Where(m1 => m1 != m && t.DeriveFrom(m1.ParentType))
where baseMethodsHidden.Count() > 0
select new { m, baseMethodsHidden }
No methods matched
Rule warning: A stateless class or structure might be turned into a static type |
// This rule indicates stateless types that might
// eventually be turned into static classes.
warnif count > 0 from t in JustMyCode.Types where
!t.IsStatic &&
!t.IsGeneric &&
t.InstanceFields.Count() == 0 &&
// Don't match:
// --> types that implement some interfaces.
t.NbInterfacesImplemented == 0 &&
// --> or classes that have sub-classes children.
t.NbChildren == 0 &&
// --> or classes that have a base class
((t.IsClass && t.DepthOfDeriveFrom("System.Object".AllowNoMatch()) == 1) ||
t.IsStructure)
select t
37 types matched
types | Full Name |
---|---|
GeometryVisUtils | B_Geometry.GeometryVisUtils |
GeomUtils | B_Geometry.GeomUtils |
LinearAlgebra | B_Geometry.LinearAlgebra |
Program | B_Geometry.New.Program |
TestofcomplexNumbers | MathosTest.TestofcomplexNumbers |
PreCalculus | MathosTest.PreCalculus |
DiceSimulatorTest | MathosTest.DiceSimulatorTest |
DiscreteMathematics | MathosTest.DiscreteMathematics |
coordinateStruct | MathosTest.coordinateStruct |
EquationSolverTest | MathosTest.EquationSolverTest |
FinanceTest | MathosTest.FinanceTest |
LinearModelsTest | MathosTest.LinearModelsTest |
PythagoreanTest | MathosTest.PythagoreanTest |
Shapes | MathosTest.Shapes |
ConverterTest | MathosTest.ConverterTest |
VectorsAndMatrices | MathosTest.VectorsAndMatrices |
TestOfFractions | MathosTest.TestOfFractions |
Statistics | MathosTest.Statistics |
Statistics+Literals | MathosTest.Statistics+Literals |
CalculusTest | MathosTest.Calculus.CalculusTest |
UnitTest1 | MathosTest.SpecialFunctions.UnitTest1 |
Uncertainty | MathosTest.Uncertainty.Uncertainty |
StatisticalDistributions | MathosTest.Mathos_Main .StatisticalDistributions |
SyntaxTest | MathosTest.Mathos_Main.SyntaxTest |
DoubleArthimeticTest | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest |
IntegerArthimeticTest | MathosTest.Mathos_Main.Arithmetic .IntegerArthimeticTest |
DecimalArithmetic | MathosTest.Mathos_Main.Arithmetic .DecimalArithmetic |
FiniteCalculusTest | MathosTest.Mathos_Main.Calculus .FiniteCalculusTest |
ElementaryTests | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests |
GammaTests | MathosTest.Mathos_Main.SpecialFunctions .GammaTests |
BenchmarkUtil | Mathos.Testing.BenchmarkUtil |
AngleConversionM | Mathos.Converter.AngleConversionM |
TemperatureConversion | Mathos.Converter.TemperatureConversion |
Check | Mathos.Arithmetic.Numbers.Check |
Get | Mathos.Arithmetic.Numbers.Get |
Convert | Mathos.Arithmetic.Numbers.Convert |
Calculate | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Calculate |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Non-static classes should be instantiated or turned to static |
// Notice that classes only instantiated through reflection, like plug-in root classes
// are matched by this rules.
warnif count > 0
from t in JustMyCode.Types
where t.IsClass &&
//!t.IsPublic && // if you are developing a framework,
// you might not want to match public classes
!t.IsStatic &&
!t.IsAttributeClass && // Attributes class are never seen as instantiated
!t.DeriveFrom("System.MarshalByRefObject".AllowNoMatch()) // Types instantiated through remoting infrastructure
// find the first constructor of t called
let ctorCalled = t.Constructors.FirstOrDefault(ctor => ctor.NbMethodsCallingMe > 0)
// match t if none of its constructors is called.
where ctorCalled == null
select new { t, t.Visibility }
73 types matched
types | Visibility | Full Name |
---|---|---|
About | Public | Laboratory.About |
Default | Public | Laboratory.Default |
Global | Public | Laboratory.Global |
Modules | Public | Laboratory.Modules |
SiteMaster | Public | Laboratory.SiteMaster |
ChangePassword | Public | Laboratory.Account.ChangePassword |
ChangePasswordSuccess | Public | Laboratory.Account.ChangePasswordSuccess |
Login | Public | Laboratory.Account.Login |
Register | Public | Laboratory.Account.Register |
Converter | Public | Laboratory.Module.Converter |
EquationSolver | Public | Laboratory.Module.EquationSolver |
Factorial | Public | Laboratory.Module.Factorial |
IntegralApproximation | Public | Laboratory.Module.IntegralApproximation |
MConverter | Public | Laboratory.Module.MConverter |
NumberChecker | Public | Laboratory.Module.NumberChecker |
Triangle | Public | Laboratory.Module.Triangle |
Uncertainty | Public | Laboratory.Module.Uncertainty |
LinearRegression | Public | Laboratory.Module.DataAnalysis .LinearRegression |
WebForm1 | Public | Laboratory.Module.DataAnalysis.WebForm1 |
FinanceAnnuityPaymentFutureValue | Public | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue |
FinanceAnnuityPaymentPresentValue | Public | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue |
FinanceFutureValue | Public | Laboratory.Module.Finance .FinanceFutureValue |
FinanceFutureValueOfAnAnnuity | Public | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity |
FinanceNetPresentValue | Public | Laboratory.Module.Finance .FinanceNetPresentValue |
FinancePresentValue | Public | Laboratory.Module.Finance .FinancePresentValue |
FinancePresentValueOfAnAnnuity | Public | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity |
FinanceRemainingBalanceOfAnnuity | Public | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity |
Form1 | Public | B_Geometry.Form1 |
GeomBox | Public | B_Geometry.GeomBox |
GeometryVisUtils | Public | B_Geometry.GeometryVisUtils |
GeomUtils | Internal | B_Geometry.GeomUtils |
LinearAlgebra | Public | B_Geometry.LinearAlgebra |
Program | Public | B_Geometry.New.Program |
TestofcomplexNumbers | Public | MathosTest.TestofcomplexNumbers |
PreCalculus | Public | MathosTest.PreCalculus |
DiceSimulatorTest | Public | MathosTest.DiceSimulatorTest |
DiscreteMathematics | Public | MathosTest.DiscreteMathematics |
coordinateStruct | Public | MathosTest.coordinateStruct |
EquationSolverTest | Public | MathosTest.EquationSolverTest |
FinanceTest | Public | MathosTest.FinanceTest |
LinearModelsTest | Public | MathosTest.LinearModelsTest |
PythagoreanTest | Public | MathosTest.PythagoreanTest |
Shapes | Public | MathosTest.Shapes |
ConverterTest | Public | MathosTest.ConverterTest |
VectorsAndMatrices | Public | MathosTest.VectorsAndMatrices |
TestOfFractions | Public | MathosTest.TestOfFractions |
Statistics | Public | MathosTest.Statistics |
Statistics+Literals | Private | MathosTest.Statistics+Literals |
CalculusTest | Public | MathosTest.Calculus.CalculusTest |
UnitTest1 | Public | MathosTest.SpecialFunctions.UnitTest1 |
Uncertainty | Public | MathosTest.Uncertainty.Uncertainty |
StatisticalDistributions | Public | MathosTest.Mathos_Main .StatisticalDistributions |
SyntaxTest | Public | MathosTest.Mathos_Main.SyntaxTest |
ComplexArithmeticTest | Public | MathosTest.Mathos_Main.Arithmetic .ComplexArithmeticTest |
DoubleArthimeticTest | Public | MathosTest.Mathos_Main.Arithmetic .DoubleArthimeticTest |
IntegerArthimeticTest | Public | MathosTest.Mathos_Main.Arithmetic .IntegerArthimeticTest |
SingleArthimeticTest | Public | MathosTest.Mathos_Main.Arithmetic .SingleArthimeticTest |
DecimalArithmetic | Public | MathosTest.Mathos_Main.Arithmetic .DecimalArithmetic |
FiniteCalculusTest | Public | MathosTest.Mathos_Main.Calculus .FiniteCalculusTest |
ElementaryTests | Public | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests |
GammaTests | Public | MathosTest.Mathos_Main.SpecialFunctions .GammaTests |
MainWindow | Public | RubyInt.MainWindow |
_Default | Public | ProjectWebsite._Default |
MainWindow | Public | Interactive_Mathematics.MainWindow |
BenchmarkUtil | Public | Mathos.Testing.BenchmarkUtil |
AngleConversionM | Public | Mathos.Converter.AngleConversionM |
TemperatureConversion | Public | Mathos.Converter.TemperatureConversion |
NumberList | Public | Mathos.Statistics.NumberList |
Check | Public | Mathos.Arithmetic.Numbers.Check |
Get | Public | Mathos.Arithmetic.Numbers.Get |
Convert | Public | Mathos.Arithmetic.Numbers.Convert |
Calculate | Public | Mathos.Geometry.CoordinateGeometry .TwoDimensional.Calculate |
Fibonacci | Public | Mathos.PreCalculus.Sequences.Fibonacci |
Statistics
Stat | Visibility |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Methods should be declared static if possible |
warnif count > 0
// When an instance method can be safely declared as static you should declare it as static.
// Since it doesn't use any instance data and method of its type and base-types,
// you should consider if such a method could be moved to a static utility class
// or if it is strongly related enough to its current declaring type to stay in it.
//
// Turning an instance method into a static method is a micro performance optimization
// since a static method is a bit cheaper to invoke than an instance method.
from t in JustMyCode.Types.Where(t =>
!t.IsStatic && !t.IsInterface &&
!t.IsEnumeration && !t.IsDelegate &&
!t.IsGeneratedByCompiler)
let methodsThatCanBeMadeStatic =
from m in t.InstanceMethods
// An instance method can be turned to static if it is not virtual,
// not using the this reference and also, not using
// any of its class or base classes instance fields or instance methods.
where !m.IsAbstract && !m.IsVirtual &&
!m.AccessThis && !m.IsExplicitInterfaceImpl &&
// Optimization: Using FirstOrDefault() avoid to check all members,
// as soon as one member is found
// we know the method m cannot be made static.
m.MembersUsed.FirstOrDefault(
mUsed => !mUsed.IsStatic &&
(mUsed.ParentType == t ||
t.DeriveFrom(mUsed.ParentType))
) == null
select m
from m in methodsThatCanBeMadeStatic
let staticFieldsUsed = m.ParentType.StaticFields.UsedBy(m).Where(f => !f.IsGeneratedByCompiler)
select new { m, staticFieldsUsed }
229 methods matched
methods | staticFieldsUsed | Full Name |
---|---|---|
Page_Load(Object,EventArgs) | 0 field | Laboratory.About.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Default.Page_Load(Object ,EventArgs) |
Application_Start(Object,EventArgs) | 0 field | Laboratory.Global.Application_Start (Object,EventArgs) |
Application_End(Object,EventArgs) | 0 field | Laboratory.Global.Application_End(Object ,EventArgs) |
Application_Error(Object,EventArgs) | 0 field | Laboratory.Global.Application_Error (Object,EventArgs) |
Session_Start(Object,EventArgs) | 0 field | Laboratory.Global.Session_Start(Object ,EventArgs) |
Session_End(Object,EventArgs) | 0 field | Laboratory.Global.Session_End(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Modules.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.SiteMaster.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Account.ChangePassword .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Account.ChangePasswordSuccess .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.EquationSolver .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Factorial.Page_Load (Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.IntegralApproximation .Page_Load(Object,EventArgs) |
EvaluateExpression(String,Double) | 0 field | Laboratory.Module.IntegralApproximation .EvaluateExpression(String,Double) |
IntegrateUsingRectangleMethod(String ,Decimal,Decimal,Decimal) | 0 field | Laboratory.Module.IntegralApproximation .IntegrateUsingRectangleMethod(String ,Decimal,Decimal,Decimal) |
IntegrateUsingTrapezoidalRule(String ,Decimal,Decimal,Decimal) | 0 field | Laboratory.Module.IntegralApproximation .IntegrateUsingTrapezoidalRule(String ,Decimal,Decimal,Decimal) |
IntegrateUsingSimpsonsRule(String ,Decimal,Decimal,Decimal) | 0 field | Laboratory.Module.IntegralApproximation .IntegrateUsingSimpsonsRule(String ,Decimal,Decimal,Decimal) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.NumberChecker .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Triangle.Page_Load (Object,EventArgs) |
ToDoubleC(String) | 0 field | Laboratory.Module.Triangle.ToDoubleC (String) |
pow(Decimal,Decimal) | 0 field | Laboratory.Module.Uncertainty.pow (Decimal,Decimal) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.DataAnalysis .LinearRegression.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.DataAnalysis.WebForm1 .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceFutureValue.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity.Page_Load (Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceNetPresentValue.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinancePresentValue.Page_Load(Object ,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity .Page_Load(Object,EventArgs) |
Page_Load(Object,EventArgs) | 0 field | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity .Page_Load(Object,EventArgs) |
glControl1_MouseUp(Object,MouseEventArgs ) | 1 field | B_Geometry.Form1.glControl1_MouseUp (Object,MouseEventArgs) |
glControl1_MouseDown(Object ,MouseEventArgs) | 2 fields | B_Geometry.Form1.glControl1_MouseDown (Object,MouseEventArgs) |
button1_Click(Object,EventArgs) | 1 field | B_Geometry.Form1.button1_Click(Object ,EventArgs) |
DrawCurve(Double) | 1 field | B_Geometry.Form1.DrawCurve(Double) |
DrawCube() | 0 field | B_Geometry.Form1.DrawCube() |
AreApproximatelyEqual(Double,Double) | 0 field | MathosTest.TestofcomplexNumbers .AreApproximatelyEqual(Double,Double) |
IsApproximatelyZero(Double) | 0 field | MathosTest.TestofcomplexNumbers .IsApproximatelyZero(Double) |
ComplexNumberConstructorsWithNonZeroValu edParameters() | 0 field | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithNonZeroVal uedParameters() |
ComplexNumberConstructorsWithZeroValuedP arameters() | 0 field | MathosTest.TestofcomplexNumbers .ComplexNumberConstructorsWithZeroValued Parameters() |
TestEqualityOfComplexNos() | 0 field | MathosTest.TestofcomplexNumbers .TestEqualityOfComplexNos() |
TestAdditionOfComplexNos() | 0 field | MathosTest.TestofcomplexNumbers .TestAdditionOfComplexNos() |
TestSubtractionOfComplexNos() | 0 field | MathosTest.TestofcomplexNumbers .TestSubtractionOfComplexNos() |
TestMultiplicationOfComplexNos() | 0 field | MathosTest.TestofcomplexNumbers .TestMultiplicationOfComplexNos() |
TestComplexFractionFromString() | 0 field | MathosTest.TestofcomplexNumbers .TestComplexFractionFromString() |
CalculateSum() | 0 field | MathosTest.PreCalculus.CalculateSum() |
ArithmeticProgression() | 0 field | MathosTest.PreCalculus .ArithmeticProgression() |
GeometricProgression() | 0 field | MathosTest.PreCalculus .GeometricProgression() |
DiceDiff() | 0 field | MathosTest.DiceSimulatorTest.DiceDiff() |
Find() | 0 field | MathosTest.DiscreteMathematics.Find() |
FindLargePrimes() | 0 field | MathosTest.DiscreteMathematics .FindLargePrimes() |
Factorial() | 0 field | MathosTest.DiscreteMathematics.Factorial () |
Remainder() | 0 field | MathosTest.DiscreteMathematics.Remainder () |
FactorialBigIntegerTest() | 0 field | MathosTest.DiscreteMathematics .FactorialBigIntegerTest() |
OtherStuff() | 0 field | MathosTest.DiscreteMathematics .OtherStuff() |
IsDivisibleBy() | 0 field | MathosTest.DiscreteMathematics .IsDivisibleBy() |
GetFactors() | 0 field | MathosTest.DiscreteMathematics .GetFactors() |
CoordinateBasic() | 0 field | MathosTest.coordinateStruct .CoordinateBasic() |
TestingExtensionMethods() | 0 field | MathosTest.coordinateStruct .TestingExtensionMethods() |
TestVisualRepresentation() | 0 field | MathosTest.coordinateStruct .TestVisualRepresentation() |
QuadraticEquationExTest() | 0 field | MathosTest.EquationSolverTest .QuadraticEquationExTest() |
QuadraticEquationTest() | 0 field | MathosTest.EquationSolverTest .QuadraticEquationTest() |
SystemOfTwoEquationsTest() | 0 field | MathosTest.EquationSolverTest .SystemOfTwoEquationsTest() |
FutureValue() | 0 field | MathosTest.FinanceTest.FutureValue() |
PresentValue() | 0 field | MathosTest.FinanceTest.PresentValue() |
NetPresentValue() | 0 field | MathosTest.FinanceTest.NetPresentValue() |
PresentValueOfAnnuity() | 0 field | MathosTest.FinanceTest .PresentValueOfAnnuity() |
FutureValueOfAnnuity() | 0 field | MathosTest.FinanceTest .FutureValueOfAnnuity() |
AnnuityPaymentPresentValue() | 0 field | MathosTest.FinanceTest .AnnuityPaymentPresentValue() |
AnnuityPaymentFutureValue() | 0 field | MathosTest.FinanceTest .AnnuityPaymentFutureValue() |
RemainingBalanceOfAnnuity() | 0 field | MathosTest.FinanceTest .RemainingBalanceOfAnnuity() |
PredictionTest() | 0 field | MathosTest.LinearModelsTest .PredictionTest() |
TestDiff() | 0 field | MathosTest.LinearModelsTest.TestDiff() |
FindHypotenuse() | 0 field | MathosTest.PythagoreanTest .FindHypotenuse() |
FindHypotenuseValidateInputs() | 0 field | MathosTest.PythagoreanTest .FindHypotenuseValidateInputs() |
FindNonHypotenuse() | 0 field | MathosTest.PythagoreanTest .FindNonHypotenuse() |
FindNonHypotenuseValidateInputs() | 0 field | MathosTest.PythagoreanTest .FindNonHypotenuseValidateInputs() |
CircleTest() | 0 field | MathosTest.Shapes.CircleTest() |
CubeTest() | 0 field | MathosTest.Shapes.CubeTest() |
ParallelogramTest() | 0 field | MathosTest.Shapes.ParallelogramTest() |
RectangleTest() | 0 field | MathosTest.Shapes.RectangleTest() |
RectangularPrismTest() | 0 field | MathosTest.Shapes.RectangularPrismTest() |
RightCircularConeTest() | 0 field | MathosTest.Shapes.RightCircularConeTest( ) |
RightCircularCylinderTest() | 0 field | MathosTest.Shapes .RightCircularCylinderTest() |
SphereTest() | 0 field | MathosTest.Shapes.SphereTest() |
SquareTest() | 0 field | MathosTest.Shapes.SquareTest() |
SquarePyramidTest() | 0 field | MathosTest.Shapes.SquarePyramidTest() |
TrapezoidTest() | 0 field | MathosTest.Shapes.TrapezoidTest() |
RightTriangleTest() | 0 field | MathosTest.Shapes.RightTriangleTest() |
TriangleTest() | 0 field | MathosTest.Shapes.TriangleTest() |
LengthConversion() | 0 field | MathosTest.ConverterTest .LengthConversion() |
SpeedConversion() | 0 field | MathosTest.ConverterTest.SpeedConversion () |
MassConversion() | 0 field | MathosTest.ConverterTest.MassConversion( ) |
VolumeConversion() | 0 field | MathosTest.ConverterTest .VolumeConversion() |
AreaConversion() | 0 field | MathosTest.ConverterTest.AreaConversion( ) |
PressureConversion() | 0 field | MathosTest.ConverterTest .PressureConversion() |
PowerConversion() | 0 field | MathosTest.ConverterTest.PowerConversion () |
BaseConversions() | 0 field | MathosTest.ConverterTest.BaseConversions () |
UnitConverterTest() | 0 field | MathosTest.ConverterTest .UnitConverterTest() |
Statistics
Stat | staticFieldsUsed |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Constructor should not call a virtual methods |
// Returns constructor of a non-sealed type calling virtual methods.
// In such a situation, if a derived class overrides the method,
// then the override method will be called before the derived constructor.
// This makes the class fragile to derive from.
//
// Violations reported can be solved by re-designing object initialisation
// or by marking the parent class as sealed, if possible.
warnif count > 0
from t in Application.Types where
t.IsClass &&
!t.IsGeneratedByCompiler &&
!t.IsSealed
from ctor in t.Constructors
let virtualMethodsCalled = from mCalled in ctor.MethodsCalled
where mCalled.IsVirtual &&
(mCalled.ParentType == t ||
t.DeriveFrom(mCalled.ParentType))
select mCalled
where virtualMethodsCalled.Count() > 0
select new { ctor ,
virtualMethodsCalled,
// If there is no derived type, it might be
// an opportunity to mark t as sealed.
t.DerivedTypes }
6 methods matched
methods | virtualMethodsCalled | DerivedTypes | Full Name |
---|---|---|---|
.ctor() | 1 method | 0 type | RubyInt.HelpWindow..ctor() |
.ctor() | 1 method | 0 type | RubyInt.ResultsWindow..ctor() |
.ctor(MainWindow) | 1 method | 0 type | RubyInt.DataViewWindow..ctor(MainWindow) |
.ctor() | 1 method | 0 type | RubyInt.MainWindow..ctor() |
.ctor() | 1 method | 0 type | Interactive_Mathematics.FrmTable..ctor() |
.ctor() | 1 method | 0 type | Interactive_Mathematics.MainWindow..ctor () |
Statistics
Stat | virtualMethodsCalled | DerivedTypes |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Avoid the Singleton pattern |
warnif count > 0
from t in Application.Types
where !t.IsStatic && !t.IsAbstract && (t.IsClass || t.IsStructure)
// All ctors of a singleton are private
where t.Constructors.Where(ctor => !ctor.IsPrivate).Count() == 0
// A singleton contains one static field of its parent type, to reference the unique instance
let staticFieldInstances = t.StaticFields.WithFieldType(t)
where staticFieldInstances.Count() == 1
select new { t, staticFieldInstance = staticFieldInstances.First() }
// The Singleton pattern consists in syntactically enforcing that a class
// has just one unique instance.
// At first glance, this pattern looks appealing and it is widely used.
// However, we discourage you from using singleton classes because experience
// shows that singletons often result in less testable and less maintainable code.
// More details available in these discussions:
// http://codebetter.com/patricksmacchia/2011/05/04/back-to-basics-usage-of-static-members/
// http://adamschepis.com/blog/2011/05/02/im-adam-and-im-a-recovering-singleton-addict/
No types matched
Rule warning: Don't assign static fields from instance methods |
// Assigning static fields from instance methods leads to
// poorly maintainable and non thread-safe code.
// It is advised to assign static fields inline or from class constructor.
warnif count > 0
from f in Application.Fields where
f.IsStatic &&
!f.IsLiteral &&
!f.IsInitOnly &&
!f.IsGeneratedByCompiler &&
// Contract API define such a insideContractEvaluation static field
f.Name != "insideContractEvaluation"
let assignedBy = f.MethodsAssigningMe.Where(m => !m.IsStatic)
where assignedBy .Count() > 0
select new { f, assignedBy }
2 fields matched
fields | assignedBy | Full Name |
---|---|---|
session_curve | 1 method | B_Geometry.Form1.session_curve |
mouse_clicked | 2 methods | B_Geometry.Form1.mouse_clicked |
Statistics
Stat | assignedBy |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Avoid empty interfaces |
warnif count > 0 from t in JustMyCode.Types where
t.IsInterface &&
t.NbMethods == 0
select new { t, t.TypesThatImplementMe }
// Interfaces define members that provide a behavior
// or usage contract. The functionality described by
// the interface can be adopted by any type,
// regardless of where the type appears in the
// inheritance hierarchy. A type implements an
// interface by providing implementations for the
// interface's members. An empty interface does not
// define any members, and as such, does not define
// a contract that can be implemented.
// If your design includes empty interfaces that
// types are expected to implement, you are probably
// using an interface as a marker, or a way of
// identifying a group of types. If this identification
// will occur at runtime, the correct way to accomplish
// this is to use a custom attribute. Use the presence
// or absence of the attribute, or the attribute's
// properties, to identify the target types. If the
// identification must occurs at compile time, then using
// an empty interface is acceptable.
7 types matched
types | TypesThatImplementMe | Full Name |
---|---|---|
INaturalNumber | 5 types | Mathos.Arithmetic.Numbers.INaturalNumber |
IInteger | 4 types | Mathos.Arithmetic.Numbers.IInteger |
IRationalNumber | 3 types | Mathos.Arithmetic.Numbers .IRationalNumber |
IIRationalNumber | 2 types | Mathos.Arithmetic.Numbers .IIRationalNumber |
IRealNumber | 1 type | Mathos.Arithmetic.Numbers.IRealNumber |
IImaginary | 1 type | Mathos.Arithmetic.Numbers.IImaginary |
IComplex | 0 type | Mathos.Arithmetic.Numbers.IComplex |
Statistics
Stat | TypesThatImplementMe |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Avoid types initialization cycles |
warnif count > 0
// The class constructor (also called static constructor, and named cctor in IL code)
// of a type, if any, is executed by the CLR at runtime, the first time the type is used.
// A cctor doesn't need to be explicitely declared in C# or VB.NET, to exist in compiled IL code.
// Having a static field inline initialization is enought to have
// the cctor implicitely declared in the parent class or structure.
//
// If the cctor of a type t1 is using the type t2 and if the cctor of t2 is using t1,
// some type initialization unexpected and hard-to-diagnose buggy behavior can occur.
// Such a cyclic chain of initialization is not necessarily limited to two types
// and can embrace N types in the general case.
// More information on types initialization cycles can be found here:
// http://msmvps.com/blogs/jon_skeet/archive/2012/04/07/1808561.aspx
// The present code rule enumerates types initialization cycles.
// Some false positives can appear if some lambda expressions are defined
// in cctors or in methods called by cctors. In such situation, this rule
// considers these lambda expressions as executed at type initialization time,
// while it is not necessarily the case.
// Types initialization cycle can only happen between types of an assembly.
from assembly in Application.Assemblies
let cctorSuspects = assembly.ChildMethods.Where(
m => m.IsClassConstructor &&
// Optimization: types involved in a type cycle necessarily don't have type level.
m.ParentType.Level == null)
where cctorSuspects.Count() > 1
let typesSuspects = cctorSuspects.ParentTypes().ToHashSet()
//
// dicoTmp associates to each type suspect T, a set of types from typesSuspects
// that contains at least a method or a field used directly or indirectly by the cctor of T.
//
let dicoTmp = cctorSuspects.ToDictionary(
cctor => cctor.ParentType,
cctor => ((IMember)cctor).ToEnumerable().FillIterative(
members => from m in members
from mUsed in (m is IMethod) ? (m as IMethod).MembersUsed : new IMember[0]
where mUsed.ParentAssembly == assembly
select mUsed)
.DefinitionDomain
.Select(m => m.ParentType) // Don't need .Distinct() here, because of ToHashSet() below.
.Except(cctor.ParentType)
.Intersect(typesSuspects)
.ToHashSet()
)
//
// dico associates to each type suspect T, the set of types initialized (directly or indirectly)
// by the initialization of T. This second step is needed, because if a cctor of a type T1
// calls a member of a type T2, not only the cctor of T1 triggers the initialization of T2,
// but also it triggers the initialization of all types that are initialized by T2 initialization.
//
let dico = typesSuspects.Where(t => dicoTmp[t].Count() > 0).ToDictionary(
typeSuspect => typeSuspect,
typeSuspect => typeSuspect.ToEnumerable().FillIterative(
types => from t in types
from tUsed in dicoTmp[t]
select tUsed)
.DefinitionDomain
.Except(typeSuspect)
.ToHashSet()
)
//
// Now that dico is prepared, detect the cctor cycles
//
from t in dico.Keys
// Thanks to the work done to build dico, it is now pretty easy
// to spot types involved in an initialization cyle with t!
let usersAndUseds = from tTmp in dico[t]
where dico.ContainsKey(tTmp) && dico[tTmp].Contains(t)
select tTmp
where usersAndUseds.Count() > 0
// Here we've found type(s) both using and used by the suspect type.
// A cycle involving the type t is found!
let typeInitCycle = usersAndUseds.Append(t)
// Compute methodsCalled and fieldsUsed, useful to explore
// how a cctor involved in a type initialization cycle, triggers other type initialization.
let methodsCalledDepth = assembly.ChildMethods.DepthOfIsUsedBy(t.ClassConstructor)
let fieldsUsedDepth = assembly.ChildFields.DepthOfIsUsedBy(t.ClassConstructor)
let methodsCalled = methodsCalledDepth.DefinitionDomain.OrderBy(m => methodsCalledDepth[m]).ToArray()
let fieldsUsed = fieldsUsedDepth.DefinitionDomain.OrderBy(f => fieldsUsedDepth[f]).ToArray()
// Use the tick box to: Group cctors methods By parent types
select new { t.ClassConstructor,
cctorsCycle= typeInitCycle.Select(tTmp => tTmp.ClassConstructor),
// methodsCalled and fieldsUsed are members used directly and indirectly by the cctor.
// Export these members to the dependency graph (right click the cell Export/Append ... to the Graph)
// and see how the cctor trigger the initialization of other types
methodsCalled,
fieldsUsed
}
No methods matched
API Breaking Changes
|
API Breaking Changes: Types |
// This rule warns if a publicly visible type is
// not publicly visible anymore or if it has been removed.
// Such type can break the code of your clients.
warnif count > 0 from t in codeBase.OlderVersion().Application.Types
where t.IsPubliclyVisible &&
// The type has been removed and its parent assembly hasn't been removed ...
( (t.WasRemoved() && !t.ParentAssembly.WasRemoved()) ||
// ... or the type is not publicly visible anymore
!t.WasRemoved() && !t.NewerVersion().IsPubliclyVisible)
select new { t,
NewVisibility = (t.WasRemoved() ? " " : t.NewerVersion().Visibility.ToString()) }
No types matched
API Breaking Changes: Methods |
// This rule warns if a publicly visible method is
// not publicly visible anymore or if it has been removed.
// Such method can break the code of your clients.
warnif count > 0 from m in codeBase.OlderVersion().Application.Methods
where m.IsPubliclyVisible &&
// The method has been removed and its parent type hasn't been removed ...
( (m.WasRemoved() && !m.ParentType.WasRemoved()) ||
// ... or the method is not publicly visible anymore
!m.WasRemoved() && !m.NewerVersion().IsPubliclyVisible)
select new { m,
NewVisibility = (m.WasRemoved() ? " " : m.NewerVersion().Visibility.ToString()) }
No methods matched
API Breaking Changes: Fields |
// This rule warns if a publicly visible field is
// not publicly visible anymore or if it has been removed.
// Such field can break the code of your clients.
warnif count > 0 from f in codeBase.OlderVersion().Application.Fields
where f.IsPubliclyVisible &&
// The field has been removed and its parent type hasn't been removed ...
( (f.WasRemoved() && !f.ParentType.WasRemoved()) ||
// ... or the field is not publicly visible anymore
!f.WasRemoved() && !f.NewerVersion().IsPubliclyVisible)
select new { f,
NewVisibility = (f.WasRemoved() ? " " : f.NewerVersion().Visibility.ToString()) }
No fields matched
API Breaking Changes: Interfaces and Abstract Classes |
// This rule warns if a publicly visible interface or abstract class
// has been changed and contains new abstract methods or
// if some abstract methods have been removed.
// This can break the code of clients
// that implement such interface or derive from such abstract class.
warnif count > 0 from tNewer in Application.Types where
(tNewer.IsInterface || tNewer.IsClass && tNewer.IsAbstract) &&
tNewer.IsPubliclyVisible &&
tNewer.IsPresentInBothBuilds()
let tOlder = tNewer.OlderVersion() where tOlder.IsPubliclyVisible
let methodsRemoved = tOlder.Methods.Where(m => m.IsAbstract && m.WasRemoved())
let methodsAdded = tNewer.Methods.Where(m => m.IsAbstract && m.WasAdded())
where methodsAdded.Count() > 0 || methodsRemoved.Count() > 0
select new { tNewer, methodsAdded, methodsRemoved }
No types matched
Broken serializable types |
// Find breaking changes in types marked with SerializableAttribute.
warnif count > 0
from t in Application.Types where
// Collect types tagged with SerializableAttribute
t.HasAttribute("System.SerializableAttribute".AllowNoMatch()) &&
!t.IsDelegate &&
t.IsPresentInBothBuilds() &&
t.HasAttribute(t)
// Find newer and older versions of NonSerializedAttribute
let newNonSerializedAttribute = ThirdParty.Types.WithFullName("System.NonSerializedAttribute").SingleOrDefault()
let oldNonSerializedAttribute = newNonSerializedAttribute == null ? null : newNonSerializedAttribute.OlderVersion()
// Find added or removed fields not marked with NonSerializedAttribute
let addedInstanceField = from f in t.InstanceFields where
f.WasAdded() &&
(newNonSerializedAttribute == null || !f.HasAttribute(newNonSerializedAttribute))
select f
let removedInstanceField = from f in t.OlderVersion().InstanceFields where
f.WasRemoved() &&
(oldNonSerializedAttribute == null || !f.HasAttribute(oldNonSerializedAttribute))
select f
where addedInstanceField.Count() > 0 || removedInstanceField.Count() > 0
select new { t, addedInstanceField, removedInstanceField }
// From http://msdn.microsoft.com/library/system.serializableattribute.aspx :
// All the public and private fields in a type that are marked by the
// SerializableAttribute are serialized by default, unless the type
// implements the ISerializable interface to override the serialization process.
// The default serialization process excludes fields that are marked
// with the NonSerializedAttribute attribute.
No types matched
Avoid transforming immutable types into mutable types |
// Immutability is a strong property on a type.
// Breaking immutability can result in serious problem for an algorithm consummer
// that has been written taking account of the type immutability.
// To visualize changes in code, right-click a matched type and select:
// - Compare older and newer versions of source file
// - Compare older and newer versions disassembled with Reflector
warnif count > 0
from t in Application.Types where
t.IsPresentInBothBuilds() &&
!t.IsStatic &&
!t.IsImmutable &&
t.OlderVersion().IsImmutable
let mutableFields = from f in t.InstanceFields where !f.IsImmutable select f
select new { t, mutableFields }
No types matched
Avoid changing enumerations Flags status |
// Being tagged with the Flags attribute is a strong property for an enumeration.
// Changing the Flags status of an enumeration has significant impact for its client.
warnif count > 0
let oldFlags = codeBase.OlderVersion().ThirdParty.Types.WithFullName("System.FlagsAttribute").SingleOrDefault()
let newFlags = ThirdParty.Types.WithFullName("System.FlagsAttribute").SingleOrDefault()
where oldFlags != null && newFlags != null
from t in Application.Types where
t.IsEnumeration &&
t.IsPresentInBothBuilds()
let isFlags = t.HasAttribute(newFlags)
let wasFlags = t.OlderVersion().HasAttribute(oldFlags)
where isFlags != wasFlags
select new { t, isFlags, wasFlags }
No types matched
API: New publicly visible types |
// List types that are new in the public surface of your assemblies
from t in Application.Types
where t.IsPubliclyVisible &&
// The type has been removed and its parent assembly hasn't been removed ...
( (t.WasAdded() && !t.ParentAssembly.WasAdded()) ||
// ... or the type existed but was not publicly visible
!t.WasAdded() && !t.OlderVersion().IsPubliclyVisible)
select new { t,
OldVisibility = (t.WasAdded() ? " " : t.OlderVersion().Visibility.ToString()) }
No types matched
API: New publicly visible methods |
// List methods that are new in the public surface of your assemblies
from m in Application.Methods
where m.IsPubliclyVisible &&
// The method has been removed and its parent assembly hasn'm been removed ...
( (m.WasAdded() && !m.ParentType.WasAdded()) ||
// ... or the t existed but was not publicly visible
!m.WasAdded() && !m.OlderVersion().IsPubliclyVisible)
select new { m,
OldVisibility = (m.WasAdded() ? " " : m.OlderVersion().Visibility.ToString()) }
No methods matched
API: New publicly visible fields |
// List fields that are new in the public surface of your assemblies
from f in Application.Fields
where f.IsPubliclyVisible &&
// The method has been removed and its parent assembly hasn'f been removed ...
( (f.WasAdded() && !f.ParentType.WasAdded()) ||
// ... or the t existed but was not publicly visible
!f.WasAdded() && !f.OlderVersion().IsPubliclyVisible)
select new { f,
OldVisibility = (f.WasAdded() ? " " : f.OlderVersion().Visibility.ToString()) }
No fields matched
Code Diff Summary
|
New assemblies |
from a in Application.Assemblies where a.WasAdded()
select new { a, a.NbLinesOfCode }
No assemblies matched
Assemblies removed |
from a in codeBase.OlderVersion().Application.Assemblies where a.WasRemoved()
select new { a, a.NbLinesOfCode }
No assemblies matched
Assemblies where code was changed |
from a in Application.Assemblies where a.CodeWasChanged()
select new { a, a.NbLinesOfCode,
oldNbLinesOfCode = a.OlderVersion().NbLinesOfCode.GetValueOrDefault() ,
delta = (int) a.NbLinesOfCode.GetValueOrDefault() - a.OlderVersion().NbLinesOfCode.GetValueOrDefault() }
No assemblies matched
New namespaces |
from n in Application.Namespaces where
!n.ParentAssembly.WasAdded() &&
n.WasAdded()
select new { n, n.NbLinesOfCode }
No namespaces matched
Namespaces removed |
from n in codeBase.OlderVersion().Application.Namespaces where
!n.ParentAssembly.WasRemoved() &&
n.WasRemoved()
select new { n, n.NbLinesOfCode }
No namespaces matched
Namespaces where code was changed |
from n in Application.Namespaces where n.CodeWasChanged()
select new { n, n.NbLinesOfCode,
oldNbLinesOfCode = n.OlderVersion().NbLinesOfCode.GetValueOrDefault() ,
delta = (int) n.NbLinesOfCode.GetValueOrDefault() - n.OlderVersion().NbLinesOfCode.GetValueOrDefault() }
No namespaces matched
New types |
from t in Application.Types where
!t.ParentNamespace.WasAdded() &&
t.WasAdded()
select new { t, t.NbLinesOfCode }
No types matched
Types removed |
from t in codeBase.OlderVersion().Application.Types where
!t.ParentNamespace.WasRemoved() &&
t.WasRemoved()
select new { t, t.NbLinesOfCode }
No types matched
Types where code was changed |
// To visualize changes in code, right-click a matched type and select:
// - Compare older and newer versions of source file
// - Compare older and newer versions disassembled with Reflector
from t in Application.Types where t.CodeWasChanged()
//select new { t, t.NbLinesOfCode }
select new { t, t.NbLinesOfCode,
oldNbLinesOfCode = t.OlderVersion().NbLinesOfCode ,
delta = (int?) t.NbLinesOfCode - t.OlderVersion().NbLinesOfCode }
/*from t in Application.Types where t.CodeWasChanged() && t.IsPresentInBothBuild
select new { t, t.NbLinesOfCode,
oldNbLinesOfCode = t.OlderVersion().NbLinesOfCode ,
delta = (int) t.NbLinesOfCode - t.OlderVersion().NbLinesOfCode }*/
No types matched
Heuristic to find types moved from one namespace or assembly to another |
let typesRemoved = codeBase.OlderVersion().Types.Where(t => t.WasRemoved())
let typesAdded = Types.Where(t => t.WasAdded())
from tMoved in typesAdded.Join(
typesRemoved,
t => t.Name,
t => t.Name,
(tNewer, tOlder) => new { tNewer,
OlderParentNamespace = tOlder.ParentNamespace,
OlderParentAssembly = tOlder.ParentAssembly } )
select tMoved
No types matched
Types directly using one or several types changed |
let typesChanged = Application.Types.Where(t => t.CodeWasChanged()).ToHashSet()
from t in JustMyCode.Types.UsingAny(typesChanged) where
!t.CodeWasChanged() &&
!t.WasAdded()
let typesChangedUsed = t.TypesUsed.Intersect(typesChanged)
select new { t, typesChangedUsed }
No types matched
Types indirectly using one or several types changed |
let typesChanged = Application.Types.Where(t => t.CodeWasChanged()).ToHashSet()
// 'depth' represents a code metric defined on types using
// directly or indirectly any type where code was changed.
let depth = JustMyCode.Types.DepthOfIsUsingAny(typesChanged)
from t in depth.DefinitionDomain where
!t.CodeWasChanged() &&
!t.WasAdded()
let typesChangedDirectlyUsed = t.TypesUsed.Intersect(typesChanged)
let depthOfUsingTypesChanged = depth[t]
orderby depthOfUsingTypesChanged
select new { t, depthOfUsingTypesChanged, typesChangedDirectlyUsed }
No types matched
New methods |
from m in Application.Methods where
!m.ParentType.WasAdded() &&
m.WasAdded()
select new { m, m.NbLinesOfCode }
No methods matched
Methods removed |
from m in codeBase.OlderVersion().Application.Methods where
!m.ParentType.WasRemoved() &&
m.WasRemoved()
select new { m, m.NbLinesOfCode }
No methods matched
Methods where code was changed |
// To visualize changes in code, right-click a matched method and select:
// - Compare older and newer versions of source file
// - Compare older and newer versions disassembled with Reflector
from m in Application.Methods where m.CodeWasChanged()
select new { m, m.NbLinesOfCode,
oldNbLinesOfCode = m.OlderVersion().NbLinesOfCode ,
delta = (int?) m.NbLinesOfCode - m.OlderVersion().NbLinesOfCode }
No methods matched
Methods directly calling one or several methods changed |
let methodsChanged = Application.Methods.Where(m => m.CodeWasChanged()).ToHashSet()
from m in JustMyCode.Methods.UsingAny(methodsChanged ) where
!m.CodeWasChanged() &&
!m.WasAdded()
let methodsChangedCalled = m.MethodsCalled.Intersect(methodsChanged)
select new { m, methodsChangedCalled }
No methods matched
Methods indirectly calling one or several methods changed |
let methodsChanged = Application.Methods.Where(m => m.CodeWasChanged()).ToHashSet()
// 'depth' represents a code metric defined on methods using
// directly or indirectly any method where code was changed.
let depth = JustMyCode.Methods.DepthOfIsUsingAny(methodsChanged)
from m in depth.DefinitionDomain where
!m.CodeWasChanged() &&
!m.WasAdded()
let methodsChangedDirectlyUsed = m.MethodsCalled.Intersect(methodsChanged)
let depthOfUsingMethodsChanged = depth[m]
orderby depthOfUsingMethodsChanged
select new { m, depthOfUsingMethodsChanged, methodsChangedDirectlyUsed }
No methods matched
New fields |
from f in Application.Fields where
!f.ParentType.WasAdded() &&
f.WasAdded()
select new { f }
No fields matched
Fields removed |
from f in codeBase.OlderVersion().Application.Fields where
!f.ParentType.WasRemoved() &&
f.WasRemoved()
select new { f }
No fields matched
Third party types that were not used and that are now used |
from t in ThirdParty.Types where t.IsUsedRecently()
select new { t, t.Methods, t.Fields, t.TypesUsingMe }
No types matched
Third party types that were used and that are not used anymore |
from t in codeBase.OlderVersion().Types where t.IsNotUsedAnymore()
select new { t, t.Methods, t.Fields, TypesThatUsedMe = t.TypesUsingMe }
No types matched
Third party methods that were not used and that are now used |
from m in ThirdParty.Methods where
m.IsUsedRecently() &&
!m.ParentType.IsUsedRecently()
select new { m, m.MethodsCallingMe }
No methods matched
Third party methods that were used and that are not used anymore |
from m in codeBase.OlderVersion().Methods where
m.IsNotUsedAnymore() &&
!m.ParentType.IsNotUsedAnymore()
select new { m, MethodsThatCalledMe = m.MethodsCallingMe}
No methods matched
Third party fields that were not used and that are now used |
from f in ThirdParty.Fields where
f.IsUsedRecently() &&
!f.ParentType.IsUsedRecently()
select new { f, f.MethodsUsingMe }
No fields matched
Third party fields that were used and that are not used anymore |
from f in codeBase.OlderVersion().Fields where
f.IsNotUsedAnymore() &&
!f.ParentType.IsNotUsedAnymore()
select new { f, MethodsThatUsedMe = f.MethodsUsingMe }
No fields matched
Test and Code Coverage
|
C.R.A.P method code metric |
// Change Risk Analyzer and Predictor (i.e. CRAP) code metric
// This code metric helps in pinpointing overly complex and untested code.
// Reference: http://www.artima.com/weblogs/viewpost.jsp?thread=215899
// Formula: CRAP(m) = comp(m)^2 * (1 – cov(m)/100)^3 + comp(m)
warnif count > 0
from m in JustMyCode.Methods
// Don't match too short methods
where m.NbLinesOfCode > 10
let CC = m.CyclomaticComplexity
let uncov = (100 - m.PercentageCoverage) / 100f
let CRAP = (CC * CC * uncov * uncov * uncov) + CC
where CRAP != null && CRAP > 30
orderby CRAP descending, m.NbLinesOfCode descending
select new { m, CRAP, CC, uncoveredPercentage = uncov*100, m.NbLinesOfCode }
No methods matched
Complex methods partially covered by tests should be 100% covered |
warnif count > 0 from m in JustMyCode.Methods
where
// These metrics' definitions are available here:
// http://www.ndepend.com/Metrics.aspx#MetricsOnMethods
( m.NbLinesOfCode > 30 ||
m.ILCyclomaticComplexity > 50 ||
m.ILNestingDepth > 4 ||
m.NbVariables > 8) &&
// Take care only of complex methods
// already partially covered, but not completely covered.
m.PercentageCoverage > 0 &&
m.PercentageCoverage < 100
orderby m.NbLinesOfCodeNotCovered ascending,
m.NbLinesOfCode descending
select new { m, m.PercentageCoverage, m.NbLinesOfCode,
m.NbLinesOfCodeCovered, m.NbLinesOfCodeNotCovered,
m.ILCyclomaticComplexity, m.ILNestingDepth, m.NbVariables }
No methods matched
Method changed poorly covered |
from m in Application.Methods where
m.PercentageCoverage < 30 &&
m.CodeWasChanged()
orderby m.NbLinesOfCode descending,
m.NbLinesOfCodeNotCovered ,
m.PercentageCoverage
select new { m, m.PercentageCoverage, m.NbLinesOfCode,
m.NbLinesOfCodeNotCovered }
No methods matched
Method added poorly covered |
from m in Application.Methods where
m.NbLinesOfCode > 0 &&
m.PercentageCoverage < 30 &&
m.WasAdded()
orderby m.NbLinesOfCode descending,
m.NbLinesOfCodeNotCovered ,
m.PercentageCoverage
select new { m, m.PercentageCoverage, m.NbLinesOfCode,
m.NbLinesOfCodeNotCovered }
No methods matched
Types 95% to 99% covered |
from t in Application.Types where
t.PercentageCoverage >= 95 &&
t.PercentageCoverage <= 99 &&
!t.IsGeneratedByCompiler
let methodsCulprit = t.Methods.Where(m => m.PercentageCoverage < 100)
orderby t.NbLinesOfCode descending ,
t.NbLinesOfCodeNotCovered ,
t.PercentageCoverage
select new { t, t.PercentageCoverage, t.NbLinesOfCode,
t.NbLinesOfCodeNotCovered, methodsCulprit }
// Having types 100% covered by tests is a good idea because
// the small portion of code hard to cover, is also the
// portion of code that is the most likely to contain bugs.
No types matched
Namespaces 95% to 99% covered |
from n in Application.Namespaces where
n.PercentageCoverage >= 95 &&
n.PercentageCoverage <= 99
let methodsCulprit = n.ChildMethods.Where(m => m.PercentageCoverage < 100)
orderby n.NbLinesOfCode descending ,
n.NbLinesOfCodeNotCovered ,
n.PercentageCoverage
select new { n, n.PercentageCoverage, n.NbLinesOfCode,
n.NbLinesOfCodeNotCovered, methodsCulprit }
// Having types 100% covered by tests is a good idea because
// the small portion of code hard to cover, is also the
// portion of code that is the most likely to contain bugs.
No namespaces matched
Types tagged with FullCoveredAttribute should be 100% covered |
warnif count > 0
from t in Application.Types where
t.HasAttribute ("NDepend.Attributes.FullCoveredAttribute".AllowNoMatch()) &&
t.PercentageCoverage < 100
let notFullCoveredMethods = t.Methods.Where(
m => m.NbLinesOfCode> 0 &&
m.PercentageCoverage < 100 &&
!m.HasAttribute("NDepend.Attributes.UncoverableByTestAttribute".AllowNoMatch()))
orderby t.NbLinesOfCodeNotCovered descending
select new { t, t.PercentageCoverage, t.NbLinesOfCodeNotCovered, notFullCoveredMethods,
t.NbLinesOfCode, t.NbLinesOfCodeCovered }
// By using a FullCoveredAttribute, you can signify to developers
// that a class is, and must remain in the future, 100% covered by tests.
// If you don't want to link NDepend.API.dll,
// you can use your own attribute and adapt this rule.
// Having types 100% covered by tests is a good idea because
// the small portion of code hard to cover, is also the
// portion of code that is the most likely to contain bugs.
No types matched
Types 100% covered should be tagged with FullCoveredAttribute |
warnif count > 0 from t in JustMyCode.Types where
!t.HasAttribute ("NDepend.Attributes.FullCoveredAttribute".AllowNoMatch()) &&
t.PercentageCoverage == 100 &&
!t.IsGeneratedByCompiler
select new { t, t.NbLinesOfCode }
// By using a FullCoveredAttribute, you can signify to developers
// that a class is, and must remain in the future, 100% covered by tests.
// If you don't want to link NDepend.API.dll, you can use your own attribute and adapt this rule.
// Having types 100% covered by tests is a good idea because
// the small portion of code hard to cover, is also the
// portion of code that is the most likely to contain bugs.
No types matched
Types not covered at all |
from t in Application.Types where
t.PercentageCoverage == 0
orderby t.NbLinesOfCode descending
select new { t, t.NbLinesOfCode }
No types matched
Namespaces not covered at all |
from n in Application.Namespaces where
n.PercentageCoverage == 0
orderby n.NbLinesOfCode descending
select new { n, n.NbLinesOfCode}
No namespaces matched
Test Methods |
// We advise to not include test assemblies in code analyzed by NDepend.
// But if you wish the current query to run properly,
// you'll need to consider test assemblies in your list of application assemblies analyzed by NDepend..
let testAttr = ThirdParty.Types.WithNameIn("TestAttribute", "TestCaseAttribute")
let testMethods = Methods.TaggedWithAnyAttributes(testAttr)
from m in testMethods
select m
No methods matched
Methods directly called by test Methods |
// Lists all methods directly called by tests methods.
// Overrides of virtual and absract methods, called through polymorphism, are not listed.
// Methods solely invoked through a delegate are not listed.
// Methods solely invoked through reflection are not listed.
// We advise to not include test assemblies in code analyzed by NDepend.
// But if you wish the current query to run properly,
// you'll need to consider test assemblies in your list of application assemblies analyzed by NDepend..
let testAttr = ThirdParty.Types.WithNameIn("TestAttribute", "TestCaseAttribute")
let testMethods = Methods.TaggedWithAnyAttributes(testAttr).ToHashSet()
// --- Uncomment this line if your test methods are in dedicated test assemblies ---
//let testAssemblies = testMethods.ParentAssemblies().ToHashSet()
from m in Application.Methods.UsedByAny(testMethods)
// --- Uncomment this line if your test methods are in dedicated test assemblies ---
//where !testAssemblies.Contains(m.ParentAssembly)
select new { m ,
calledByTests = m.MethodsCallingMe.Intersect(testMethods ),
// --- Uncomment this line if your project import some coverage data ---
// m.PercentageCoverage
}
No methods matched
Methods directly and indirectly called by test Methods |
// Lists all methods called directly or indirectly by tests methods.
// Overrides of virtual and absract methods, called through polymorphism, are not listed.
// Methods solely invoked through a delegate are not listed.
// Methods solely invoked through reflection are not listed.
// We advise to not include test assemblies in code analyzed by NDepend.
// But if you wish the current query to run properly,
// you'll need to consider test assemblies in your list of application assemblies analyzed by NDepend.
let testAttr = from t in ThirdParty.Types.WithNameIn("TestAttribute", "TestCaseAttribute") select t
let testMethods = Methods.TaggedWithAnyAttributes(testAttr)
// --- Uncomment this line if your test methods are in dedicated test assemblies ---
// let testAssemblies = testMethods.ParentAssemblies().ToHashSet()
let depthOfCalledByTest = Application.Methods.DepthOfIsUsedByAny(testMethods)
from pair in depthOfCalledByTest
where pair.Value > 0
orderby pair.Value ascending
// --- Uncomment this line if your test methods are in dedicated test assemblies ---
//&& !testAssemblies.Contains(pair.CodeElement.ParentAssembly)
select new {
method = pair.CodeElement,
// (depthOfCalledByTests == 1) means that the method is directly called by tests
// (depthOfCalledByTests == 2) means that the method is directly called by a method directly called by tests
// ...
depthOfCalledByTests = pair.Value,
// --- Uncomment this line if your project import some coverage data ---
// m.PercentageCoverage
}
No methods matched
Dead Code
Potentially dead Types |
warnif count > 0
// Filter procedure for types that should'nt be considered as dead
let canTypeBeConsideredAsDeadProc = new Func<IType, bool>(
t => !t.IsPublic && // Public types might be used by client applications of your assemblies.
t.Name != "Program" &&
!t.IsGeneratedByCompiler &&
// If you don't want to link NDepend.API.dll, you can use your own IsNotDeadCodeAttribute and adapt this rule.
!t.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()) &&
// Exclude static types that define only const fields
// because they cannot be seen as used in IL code.
!(t.IsStatic && t.NbMethods == 0 && !t.Fields.Where(f => !f.IsLiteral).Any()))
// Select types unused
let typesUnused =
from t in JustMyCode.Types where
t.NbTypesUsingMe == 0 && canTypeBeConsideredAsDeadProc(t)
select t
// Dead types = types used only by unused types (recursive)
let deadTypesMetric = typesUnused.FillIterative(
types => from t in codeBase.Application.Types.UsedByAny(types).Except(types)
where canTypeBeConsideredAsDeadProc(t) &&
t.TypesUsingMe.Intersect(types).Count() == t.NbTypesUsingMe
select t)
from t in deadTypesMetric.DefinitionDomain
select new { t, t.TypesUsingMe, depth = deadTypesMetric[t] }
No types matched
Critical Rule warning: Potentially dead Methods |
warnif count > 0
// Filter procedure for methods that should'nt be considered as dead
let canMethodBeConsideredAsDeadProc = new Func<IMethod, bool>(
m => !m.IsPubliclyVisible && // Public methods might be used by client applications of your assemblies.
!m.IsEntryPoint && // Main() method is not used by-design.
!m.IsExplicitInterfaceImpl && // The IL code never explicitely calls explicit interface methods implementation.
!m.IsClassConstructor && // The IL code never explicitely calls class constructors.
!m.IsFinalizer && // The IL code never explicitely calls finalizers.
!m.IsVirtual && // Only check for non virtual method that are not seen as used in IL.
!(m.IsConstructor && // Don't take account of protected ctor that might be call by a derived ctors.
m.IsProtected) &&
!m.IsEventAdder && // The IL code never explicitely calls events adder/remover.
!m.IsEventRemover &&
!m.IsGeneratedByCompiler &&
!m.ParentType.IsDelegate &&
// Methods tagged with these two attributes are called by the serialization infrastructure.
!m.HasAttribute("System.Runtime.Serialization.OnSerializingAttribute".AllowNoMatch()) &&
!m.HasAttribute("System.Runtime.Serialization.OnDeserializedAttribute".AllowNoMatch()) &&
// If you don't want to link NDepend.API.dll, you can use your own IsNotDeadCodeAttribute and adapt this rule.
!m.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()))
// Get methods unused
let methodsUnused =
from m in JustMyCode.Methods where
m.NbMethodsCallingMe == 0 &&
canMethodBeConsideredAsDeadProc(m)
select m
// Dead methods = methods used only by unused methods (recursive)
let deadMethodsMetric = methodsUnused.FillIterative(
methods => // Unique loop, just to let a chance to build the hashset.
from o in (new object()).ToEnumerable()
// Use a hashet to make Intersect calls much faster!
let hashset = methods.ToHashSet()
from m in codeBase.Application.Methods.UsedByAny(methods).Except(methods)
where canMethodBeConsideredAsDeadProc(m) &&
// Select methods called only by methods already considered as dead
hashset.Intersect(m.MethodsCallingMe).Count() == m.NbMethodsCallingMe
select m)
from m in JustMyCode.Methods.Intersect(deadMethodsMetric.DefinitionDomain)
select new { m, m.MethodsCallingMe, depth = deadMethodsMetric[m] }
14 methods matched
methods | MethodsCallingMe | depth | Full Name |
---|---|---|---|
Application_Start(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Application_Start (Object,EventArgs) |
Application_End(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Application_End(Object ,EventArgs) |
Application_Error(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Application_Error (Object,EventArgs) |
Session_Start(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Session_Start(Object ,EventArgs) |
Session_End(Object,EventArgs) | 0 method | 0 | Laboratory.Global.Session_End(Object ,EventArgs) |
IntegrateUsingRectangleMethod(String ,Decimal,Decimal,Decimal) | 0 method | 0 | Laboratory.Module.IntegralApproximation .IntegrateUsingRectangleMethod(String ,Decimal,Decimal,Decimal) |
IntegrateUsingTrapezoidalRule(String ,Decimal,Decimal,Decimal) | 0 method | 0 | Laboratory.Module.IntegralApproximation .IntegrateUsingTrapezoidalRule(String ,Decimal,Decimal,Decimal) |
IntegrateUsingSimpsonsRule(String ,Decimal,Decimal,Decimal) | 0 method | 0 | Laboratory.Module.IntegralApproximation .IntegrateUsingSimpsonsRule(String ,Decimal,Decimal,Decimal) |
.ctor() | 0 method | 0 | B_Geometry.GeomUtils..ctor() |
.ctor() | 0 method | 0 | MathosTest.Statistics+Literals..ctor() |
AreApproximatelyEqual(Complex,Complex) | 0 method | 0 | MathosTest.Mathos_Main.SpecialFunctions .ElementaryTests.AreApproximatelyEqual (Complex,Complex) |
IsApproximatelyZero(Double) | 0 method | 0 | MathosTest.Mathos_Main.SpecialFunctions .GammaTests.IsApproximatelyZero(Double) |
Button_MouseEnter(Object,MouseEventArgs) | 0 method | 0 | RubyInt.HelpWindow.Button_MouseEnter (Object,MouseEventArgs) |
IsTriangle(Double,Double,Double) | 0 method | 0 | Mathos.Geometry.Shapes.Triangle .IsTriangle(Double,Double,Double) |
Statistics
Stat | MethodsCallingMe | depth |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Critical Rule warning: Potentially dead Fields |
warnif count > 0
from f in JustMyCode.Fields where
f.NbMethodsUsingMe == 0 &&
!f.IsPublic && // Although not recommended, public fields might be used by client applications of your assemblies.
!f.IsLiteral && // The IL code never explicitely uses literal fields.
!f.IsEnumValue && // The IL code never explicitely uses enumeration value.
f.Name != "value__" && // Field named 'value__' are relative to enumerations and the IL code never explicitely uses them.
!f.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()) &&
!f.IsGeneratedByCompiler
// If you don't want to link NDepend.API.dll, you can use your own IsNotDeadCodeAttribute and adapt this rule.
select f
38 fields matched
fields | Full Name |
---|---|
HyperLink1 | Laboratory.Default.HyperLink1 |
Table1 | Laboratory.Modules.Table1 |
HeadContent | Laboratory.SiteMaster.HeadContent |
NavigationMenu | Laboratory.SiteMaster.NavigationMenu |
MainContent | Laboratory.SiteMaster.MainContent |
ChangeUserPassword | Laboratory.Account.ChangePassword .ChangeUserPassword |
LoginUser | Laboratory.Account.Login.LoginUser |
RegisterUserWizardStep | Laboratory.Account.Register .RegisterUserWizardStep |
Panel1 | Laboratory.Module.Converter.Panel1 |
CalculateButton | Laboratory.Module.Converter .CalculateButton |
ErrorLabel | Laboratory.Module.Converter.ErrorLabel |
SolveSystemOfTwoEquation | Laboratory.Module.EquationSolver .SolveSystemOfTwoEquation |
SolveQuadraticEquation | Laboratory.Module.EquationSolver .SolveQuadraticEquation |
CalculateButton | Laboratory.Module.Factorial .CalculateButton |
Label1 | Laboratory.Module.IntegralApproximation .Label1 |
Label2 | Laboratory.Module.IntegralApproximation .Label2 |
CalculateButton | Laboratory.Module.IntegralApproximation .CalculateButton |
Label3 | Laboratory.Module.IntegralApproximation .Label3 |
Label4 | Laboratory.Module.IntegralApproximation .Label4 |
Label5 | Laboratory.Module.IntegralApproximation .Label5 |
returnvalue | Laboratory.Module.MConverter.returnvalue |
CalculateButton | Laboratory.Module.NumberChecker .CalculateButton |
ErrorLabel | Laboratory.Module.NumberChecker .ErrorLabel |
CalculateButton | Laboratory.Module.Triangle .CalculateButton |
CalculateButton | Laboratory.Module.Uncertainty .CalculateButton |
ErrorLabel | Laboratory.Module.Uncertainty.ErrorLabel |
Button1 | Laboratory.Module.DataAnalysis .LinearRegression.Button1 |
FindNthTerm | Laboratory.Module.DataAnalysis.WebForm1 .FindNthTerm |
Button1 | Laboratory.Module.DataAnalysis.WebForm1 .Button1 |
CalculateButton | Laboratory.Module.Finance .FinanceAnnuityPaymentFutureValue .CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceAnnuityPaymentPresentValue .CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceFutureValue.CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceFutureValueOfAnAnnuity .CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceNetPresentValue.CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinancePresentValue.CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinancePresentValueOfAnAnnuity .CalculateButton |
CalculateButton | Laboratory.Module.Finance .FinanceRemainingBalanceOfAnnuity .CalculateButton |
Calc | ProjectWebsite._Default.Calc |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Wrong usage of IsNotDeadCodeAttribute |
// This IsNotDeadCodeAttribute can be used to signify that
// despite a member could be removed without provoking any syntax error
// (we also say it is dead code), your intention is to not remove this member.
// Default 'Dead Code' code rules take account of this attribute.
// IsNotDeadCodeAttribute is defined in NDepend.API.dll
// If you don't want to link NDepend.API.dll, you can use
// your own IsNotDeadCodeAttribute and adapt this rule.
warnif count == 1
let tAttr = Types.WithFullName("NDepend.Attributes.IsNotDeadCodeAttribute").FirstOrDefault()
where tAttr != null
// Get types that do a wrong usage of IsNotDeadCodeAttribute
let types = from t in Application.Types where
t.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()) &&
( // types used don't need to be tagged with IsNotDeadCodeAttribute!
t.NbTypesUsingMe > 0 ||
// Static types that define only const fields cannot be seen as used in IL code.
// They don't need to be tagged with IsNotDeadCodeAttribute.
(t.IsStatic && t.NbMethods == 0 && !t.Fields.Where(f => !f.IsLiteral).Any())
)
select t
// Get methods that do a wrong usage of IsNotDeadCodeAttribute
let methods = from m in Application.Methods where
m.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()) &&
m.NbMethodsCallingMe > 0
select m
// Get fields that do a wrong usage of IsNotDeadCodeAttribute
let fields = from f in Application.Fields where
f.HasAttribute("NDepend.Attributes.IsNotDeadCodeAttribute".AllowNoMatch()) &&
f.NbMethodsUsingMe > 0
select f
where types.Count() > 0 || methods.Count() > 0 || fields.Count() > 0
select new { tAttr, types , methods, fields }
No types matched
Trend Charts
Lines of Code
Rules Violated
Rules Violations
Percentage Coverage by Tests
No Trend Data has been logged for this Chart.Max
Average
Third-Party Usage
Assemblies Dependencies
Assembly | Depends on | Is referenced by |
---|---|---|
Laboratory v1.0.0.0 | mscorlib v4.0.0.0 ; System.Web v4.0.0.0 ; System v4.0.0.0 ; Mathos v1.0.5.1 ; System.Numerics v4.0.0.0 ; MathParser v1.0.5.0 ; System.Core v4.0.0.0 ; | - |
B_Geometry v1.0.0.0 | mscorlib v4.0.0.0 ; System v4.0.0.0 ; System.Windows.Forms v4.0.0.0 ; OpenTK.GLControl v1.0.0.0 ; OpenTK v1.0.0.0 ; System.Drawing v4.0.0.0 ; | - |
MathosTest v1.0.0.0 | mscorlib v4.0.0.0 ; Mathos v1.0.5.1 ; System v4.0.0.0 ; System.Numerics v4.0.0.0 ; System.Core v4.0.0.0 ; | - |
RubyInt v1.0.0.0 | mscorlib v4.0.0.0 ; PresentationFramework v4.0.0.0 ; System v4.0.0.0 ; PresentationCore v4.0.0.0 ; System.Core v4.0.0.0 ; ICSharpCode.AvalonEdit v4.4.0.9727 ; System.Xaml v4.0.0.0 ; Microsoft.Scripting v1.0.0.0 ; MathParser v1.0.5.0 ; Mathos v1.0.5.1 ; IronRuby v1.0.0.0 ; System.Xml v4.0.0.0 ; MahApps.Metro v0.13.1.0 ; WindowsBase v4.0.0.0 ; Microsoft.Threading.Tasks v1.0.12.0 ; | - |
ProjectWebsite v1.0.0.0 | mscorlib v4.0.0.0 ; MathParser v1.0.5.0 ; System.Web v4.0.0.0 ; Mathos v1.0.5.1 ; | - |
Interactive Mathematics v1.0.0.0 | mscorlib v4.0.0.0 ; PresentationFramework v4.0.0.0 ; System v4.0.0.0 ; System.Xaml v4.0.0.0 ; MathParser v1.0.5.0 ; PresentationCore v4.0.0.0 ; WindowsBase v4.0.0.0 ; Microsoft.CSharp v4.0.0.0 ; System.Core v4.0.0.0 ; Mathos v1.0.5.1 ; | - |
Mathos v1.0.5.1 | mscorlib v4.0.0.0 ; System.Numerics v4.0.0.0 ; System.Core v4.0.0.0 ; System v4.0.0.0 ; | Laboratory v1.0.0.0 ; MathosTest v1.0.0.0 ; RubyInt v1.0.0.0 ; ProjectWebsite v1.0.0.0 ; Interactive Mathematics v1.0.0.0 ; |
Assemblies Build Order
- Laboratory
- B_Geometry
- MathosTest
- RubyInt
- ProjectWebsite
- Interactive Mathematics
- Mathos
Assemblies Build Order
- Laboratory
- B_Geometry
- MathosTest
- RubyInt
- ProjectWebsite
- Interactive Mathematics
- Mathos
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 v5.4.1.8430 | |
No Baseline for Comparison loaded. | |
Can't load the assembly {Microsoft.VisualStudio.QualityTools.UnitTestFramework}: Can't find the .NET assembly {Microsoft.VisualStudio.QualityTools.UnitTestFramework} in specified folders. Has it been compiled properly? Is the NDepend project missing the containing folder of the .NET assembly? | |
Can't load the assembly {System.Threading.Tasks}: Several .NET assemblies have the name {System.Threading.Tasks} but they are different. - C:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\RubyInt\bin\Debug\System.Threading.Tasks.dll v0.0 34 528 bytes - C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\System.Threading.Tasks.dll v0.0 30 344 bytes | |
Can't load the assembly {System.Runtime}: Several .NET assemblies have the name {System.Runtime} but they are different. - C:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\RubyInt\bin\Debug\System.Runtime.dll v0.0 22 208 bytes - C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\System.Runtime.dll v0.0 36 440 bytes | |
Concurrent mode | |
.NET Assembly loaded from {C:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Mathos\bin\Debug} Mathos.dll v1.0.5.1 | |
.NET Assembly loaded from {C:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\bin\Debug} MathosTest.dll v1.0.0.0 | |
.NET Assemblies loaded from {C:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Interactive Mathematics\bin\Debug} Interactive Mathematics.exe v1.0.0.0 MathParser.dll v1.0.5.0 | |
.NET Assembly loaded from {C:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\ProjectWebsite\bin} ProjectWebsite.dll v1.0.0.0 | |
.NET Assembly loaded from {C:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\Laboratory\bin} Laboratory.dll v1.0.0.0 | |
.NET Assemblies loaded from {C:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\B_Geometry\bin\Debug} B_Geometry.exe v1.0.0.0 OpenTK.GLControl.dll v1.0.0.0 OpenTK.dll v1.0.0.0 | |
.NET Assemblies loaded from {C:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\RubyInt\bin\Debug} RubyInt.exe v1.0.0.0 MahApps.Metro.dll v0.13.1.0 ICSharpCode.AvalonEdit.dll v4.4.0.9727 Microsoft.Scripting.dll v1.0.0.0 IronRuby.dll v1.0.0.0 Microsoft.Threading.Tasks.dll v1.0.12.0 | |
.NET Assemblies loaded from {C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319} mscorlib.dll v4.0.0.0 System.Numerics.dll v4.0.0.0 System.Core.dll v4.0.0.0 System.dll v4.0.0.0 System.Xaml.dll v4.0.0.0 Microsoft.CSharp.dll v4.0.0.0 System.Web.dll v4.0.0.0 System.Windows.Forms.dll v4.0.0.0 System.Drawing.dll v4.0.0.0 System.Xml.dll v4.0.0.0 | |
.NET Assemblies loaded from {C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF} PresentationFramework.dll v4.0.0.0 PresentationCore.dll v4.0.0.0 WindowsBase.dll v4.0.0.0 | |
Versioning issue: Assembly {Laboratory v1.0.0.0} references {MathParser v1.0.7.2} but NDepend has loaded {MathParser v1.0.5.0} | |
Assembly {Microsoft.VisualStudio.QualityTools.UnitTestFramework} is referenced by {MathosTest} but is not found. | |
Versioning issue: Assembly {RubyInt v1.0.0.0} references {MathParser v1.0.7.2} but NDepend has loaded {MathParser v1.0.5.0} | |
Assembly {System.Threading.Tasks} is referenced by {RubyInt} but is not found. | |
Assembly {System.Runtime} is referenced by {RubyInt} but is not found. | |
The source file {c:\Users\Artem Los\Documents\Visual Studio 2013\Projects\mathos\MathosTest\Mathos Main\Statistics and DiceSim\LinearModels.cs} (last modified 2014-10-25 23:07:36) and the PDB file of the assembly {MathosTest} (last modified 2014-10-25 22:24:34) are not in-sync. | |
185 source files parsed ; all source files found ; 1 source file not in-sync with PDB | |
0 code rule has been extracted from code. | |
No dependency cycle detected in assemblies referencement graph. | |
11-27-2014 19:11:41 Analyse dependencies of your application. | |
11-27-2014 19:11:46 Log trend metrics values. | |
11-27-2014 19:11:47 Execute queries and rules | |
6 critical rules are violated. - Methods too complex - critical - Potentially dead Methods - Potentially dead Fields - Don't assign a field from many methods - Exception class name should be suffixed with 'Exception' - Avoid having different types with same name | |
11-27-2014 19:11:48 NDepend analysis done. Duration: 00:08 | |
11-27-2014 19:11:48 Building the report (standard). |