Skip to content

Commit

Permalink
more summary
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatandrei committed Oct 5, 2024
1 parent bcc2328 commit 5c98eaa
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<h1>Summary @nameSolution </h1>
<a href="#licences-per-project"> Licenses</a>: @projectDicts.NrLicenses()
<h2>If you are new to the project</h2>
<ul>
<ol>
<li>Goto <a href="#building-blocks"> Building Blocks </a> @bb0.Length - you can understand those projects without references
</li>
<li>Goto
Expand All @@ -244,24 +244,29 @@
<a href="#projects-with-tests">relation of the projects</a>
</li>

</ul>
</ol>
<h2>If you want to improve the project</h2>
<ul>
<ol>
<li>See <a href="#packages-with-major-version-different">Packages with Major Version different</a>
</li>
<li>See <a href="#Cyclomatic-Complexity-for-Method">
methods with most cyclomatic complexity
</a>
</li>
<li>See <a href="#methods-public-lines">
methods with most public lines
public methods with most lines
</a>
</li>
<li>See <a href="#Maintainability-for-Method">
methods low maintaining score
</a>
</li>
</ul>
<li>
See <a href="#executable-lines-per-method">
methods with most lines
</a>
</li>
</ol>

</div>
<div class="right">
Expand Down Expand Up @@ -334,7 +339,7 @@
<tr>
<td>@(++tableRow)</td>
<td>
<a href="assemblies-references">Max nr of references to other assemblies</a>:@maxAssemblyRef.Count
<a href="#assemblies-references">Max nr of references to other assemblies</a>:@maxAssemblyRef.Count
</td>
<td>@maxAssemblyRef.Name</td>
</tr>
Expand All @@ -344,7 +349,7 @@
<tr>
<td>@(++tableRow)</td>
<td>
<a href="number-of-classes-per-assembly">
<a href="#assemblies-public-classes">
Max nr of public Classes
</a>:@mostPublicClasses.Count
</td>
Expand All @@ -353,7 +358,9 @@
}
<tr>
<td>@(++tableRow)</td>
<td>With max nr of Classes:@maxClasses.Count</td>
<td>
<a href="#number-of-classes-per-assembly">
With max nr of Classes</a>:@maxClasses.Count</td>
<td>@maxClasses.Name</td>
</tr>
<tr>
Expand All @@ -370,29 +377,29 @@
<td>
<a href="#Maintainability-for-Assembly">
With low maintaining score
</a>:@minMaintAssIndex.Count
</a>:@minMaintAssIndex?.Count

</td>
<td>@minMaintAssIndex.Name</td>
<td>@minMaintAssIndex?.Name</td>
</tr>
<tr>
<td>@(++tableRow)</td>
<td><a href="#Class-Coupling-for-Assembly"> With max coupling</a>:@maxCCAssIndex.Count</td>
<td>@maxCCAssIndex.Name</td>
<td><a href="#Class-Coupling-for-Assembly"> With max coupling</a>:@maxCCAssIndex?.Count</td>
<td>@maxCCAssIndex?.Name</td>
</tr>
<tr>
<td>@(++tableRow)</td>
<td>
<a href="#Cyclomatic-Complexity-for-Assembly">
With most Cyclomatic Complexity
</a>:@maxCycAssIndex.Count
</a>:@maxCycAssIndex?.Count
</td>
<td>@maxCycAssIndex.Name</td>
<td>@maxCycAssIndex?.Name</td>
</tr>
<tr>
<td>@(++tableRow)</td>
<td><a href="#assemblies-public-lines">With most lines</a>:@maxexecAssLines.Count</td>
<td>@maxexecAssLines.Name</td>
<td><a href="#assemblies-public-lines">With most lines</a>:@maxexecAssLines?.Count</td>
<td>@maxexecAssLines?.Name</td>
</tr>
</tbody>
</table>
Expand All @@ -416,9 +423,9 @@
<td>
<a href="#number-of-methods-per-class">
With max nr of methods
</a>:@maxMethodsClass.Count
</a>:@maxMethodsClass?.Count
</td>
<td>@maxMethodsClass.Name</td>
<td>@maxMethodsClass?.Name</td>
</tr>
<tr>
<td>@(++tableRow)</td>
Expand All @@ -435,9 +442,9 @@
<a href="#Class-Coupling-for-Class">
With max coupling
</a>
:@maxCCClassIndex.Count
:@maxCCClassIndex?.Count
</td>
<td>@maxCCClassIndex.Name</td>
<td>@maxCCClassIndex?.Name</td>
</tr>
<tr>
<td>@(++tableRow)</td>
Expand Down Expand Up @@ -501,7 +508,7 @@
With most lines
</a>:@publicClassRefData.PublicMethod_MostLinesOfCode_Most()?.Count
</td>
<td>@maxExecMethodsLines?.Name</td>
<td>@publicClassRefData.PublicMethod_MostLinesOfCode_Most()?.Name</td>
</tr>


Expand Down Expand Up @@ -701,7 +708,7 @@
</text>
}
];
var table = new Tabulator("bb-table", {
var table = new Tabulator("#bb-table", {
data: tabledata,
layout: "fitColumns",
pagination: "local",
Expand Down Expand Up @@ -761,7 +768,7 @@
</text>
}
];
var table = new Tabulator("test-projects-table", {
var table = new Tabulator("#test-projects-table", {
data: tabledata,
layout: "fitColumns",
pagination: "local",
Expand Down Expand Up @@ -809,6 +816,7 @@
<h3>Cyclomatic Complexity per method</h3>
@CycMethodDisplay.Render()


<h2 id="number-of-classes-per-assembly"> Number of classes per assembly</h2>

@{
Expand Down Expand Up @@ -986,7 +994,7 @@
<h2 id="executable-lines">Executable lines</h2>
<h3 id="executable-lines-per-assembly">Per assembly</h3>
@{
tuple = new(execAssLines, "Number lines per project");
tuple = new(execAssLines, "Number exec lines per project");
namePerCountDisplay = new(tuple);
}
@namePerCountDisplay.Render()
Expand All @@ -995,7 +1003,18 @@

@{

tuple = new(execClassLines, "Number lines per class");
tuple = new(execClassLines, "Number exec lines per class");
namePerCountDisplay = new(tuple);
}

@namePerCountDisplay.Render()


<h3 id="executable-lines-per-method">Per method</h3>

@{

tuple = new(execMethodsLines, "Number exec lines per method");
namePerCountDisplay = new(tuple);
}

Expand Down Expand Up @@ -1080,7 +1099,7 @@
<h3 id="class-references"> Classes with References</h3>

@{
tuple = new(refSummary.classRefs, "References per class");
tuple = new(refSummary?.classRefs??[], "References per class");
namePerCountDisplay = new(tuple);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
namespace NetPackageAnalyzerDocusaurus;
public class TemplateGenerator
{
public async Task<string> Generate_DisplayAllVersions(DisplayDataMoreThan1Version model)
public async Task<string> Generate_DisplayAllVersions(DisplayDataMoreThan1Version? model)
{
if(model == null)
return string.Empty;

var rz = new DisplayAllVersions(model);
return await rz.RenderAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var mostPublicClasses = publicClassRefData
.Assemblies_PublicClasses
.FirstOrDefault();
var maxAssemblyRef = refSummary.AssembliesReferences.FirstOrDefault();
var maxAssemblyRef = refSummary.AssembliesReferences?.FirstOrDefault();

var keysPackageMultiple = more1Version.KeysPackageMultipleMajorDiffers();
var nrVersionIterator = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ line @CommitsFile
### Number commits per csproj files

@{
Tuple<ProjectsDict, Func<ProjectData, NetPackageAnalyzeHistory.History>> newModel=
new(Model, x => x.AllHistoryFile.AllHistory());
Tuple<ProjectsDict, Func<ProjectData, History>> newModel=
new(Model, x => x.AllHistoryFile?.AllHistory()??History.Empty);
var c = new CommitsPerData(newModel);
var data = c.Render();
}
Expand Down
1 change: 1 addition & 0 deletions src/NetPackageAnalyzer/NetPackageAnalyzerWork/globals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
global using System.IO.Compression;
global using NetPackageAnalyzerDiagram;
global using RSCG_ExportDiagram_Import;
global using NetPackageAnalyzeHistory;



0 comments on commit 5c98eaa

Please sign in to comment.