Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .vs/dinfo/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file modified .vs/dinfo/v18/.suo
Binary file not shown.
185 changes: 103 additions & 82 deletions .vs/dinfo/v18/DocumentLayout.backup.json

Large diffs are not rendered by default.

213 changes: 211 additions & 2 deletions .vs/dinfo/v18/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,64 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\Nicola\\Desktop\\DINFO\\",
"Documents": [],
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\utils\\globals.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\utils\\globals.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\helpers\\git.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\helpers\\git.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\helpers\\files.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\helpers\\files.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\helpers\\directory.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\helpers\\directory.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\handlers\\html\\handler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\handlers\\html\\handler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\handlers\\json\\handler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\handlers\\json\\handler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\handlers\\yaml\\handler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\handlers\\yaml\\handler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\handlers\\config-file.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\handlers\\config-file.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\handlers\\json\\git.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\handlers\\json\\git.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\handlers\\json\\file.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\handlers\\json\\file.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\core\\handlers\\json\\directory.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CFB3EE22-0291-4573-AFDD-651D20F202C4}|src\\core\\dinfo.core.csproj|solutionrelative:src\\core\\handlers\\json\\directory.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{0BC8E1BC-9495-4D71-8FA4-99571EB3014A}|src\\tui\\dinfo.tui.csproj|c:\\users\\nicola\\desktop\\dinfo\\src\\tui\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{0BC8E1BC-9495-4D71-8FA4-99571EB3014A}|src\\tui\\dinfo.tui.csproj|solutionrelative:src\\tui\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"SelectedChildIndex": 6,
"Children": [
{
"$type": "Bookmark",
Expand All @@ -30,6 +79,166 @@
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "globals.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Utils\\globals.cs",
"RelativeDocumentMoniker": "src\\core\\Utils\\globals.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Utils\\globals.cs",
"RelativeToolTip": "src\\core\\Utils\\globals.cs",
"ViewState": "AgIAACMAAAAAAAAAAAAqwC0AAAAjAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:31:47.931Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "git.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Helpers\\git.cs",
"RelativeDocumentMoniker": "src\\core\\Helpers\\git.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Helpers\\git.cs",
"RelativeToolTip": "src\\core\\Helpers\\git.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAC0AAAAMAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:30:57.55Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "files.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Helpers\\files.cs",
"RelativeDocumentMoniker": "src\\core\\Helpers\\files.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Helpers\\files.cs",
"RelativeToolTip": "src\\core\\Helpers\\files.cs",
"ViewState": "AgIAAKoAAAAAAAAAAAAAwJ4AAABSAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:29:04.994Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "directory.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Helpers\\directory.cs",
"RelativeDocumentMoniker": "src\\core\\Helpers\\directory.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Helpers\\directory.cs",
"RelativeToolTip": "src\\core\\Helpers\\directory.cs",
"ViewState": "AgIAAMQAAAAAAAAAAADwv9AAAAA6AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:26:46.608Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "Handler.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Yaml\\Handler.cs",
"RelativeDocumentMoniker": "src\\core\\Handlers\\Yaml\\Handler.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Yaml\\Handler.cs",
"RelativeToolTip": "src\\core\\Handlers\\Yaml\\Handler.cs",
"ViewState": "AgIAAEwAAAAAAAAAAAA7wAkAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:25:13.451Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "config-file.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\config-file.cs",
"RelativeDocumentMoniker": "src\\core\\Handlers\\config-file.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\config-file.cs",
"RelativeToolTip": "src\\core\\Handlers\\config-file.cs",
"ViewState": "AgIAACUAAAAAAAAAAAAowEkAAAAnAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:22:28.089Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "Handler.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Json\\Handler.cs",
"RelativeDocumentMoniker": "src\\core\\Handlers\\Json\\Handler.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Json\\Handler.cs",
"RelativeToolTip": "src\\core\\Handlers\\Json\\Handler.cs",
"ViewState": "AgIAAEMAAAAAAAAAAAA7wAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:20:58.385Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "Git.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Json\\Git.cs",
"RelativeDocumentMoniker": "src\\core\\Handlers\\Json\\Git.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Json\\Git.cs",
"RelativeToolTip": "src\\core\\Handlers\\Json\\Git.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:20:56.66Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "File.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Json\\File.cs",
"RelativeDocumentMoniker": "src\\core\\Handlers\\Json\\File.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Json\\File.cs",
"RelativeToolTip": "src\\core\\Handlers\\Json\\File.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:20:54.929Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 10,
"Title": "Directory.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Json\\Directory.cs",
"RelativeDocumentMoniker": "src\\core\\Handlers\\Json\\Directory.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Json\\Directory.cs",
"RelativeToolTip": "src\\core\\Handlers\\Json\\Directory.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:20:51.961Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "Handler.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Html\\Handler.cs",
"RelativeDocumentMoniker": "src\\core\\Handlers\\Html\\Handler.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\core\\Handlers\\Html\\Handler.cs",
"RelativeToolTip": "src\\core\\Handlers\\Html\\Handler.cs",
"ViewState": "AgIAABwAAAAAAAAAAAA7wAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:20:38.717Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 11,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\tui\\Program.cs",
"RelativeDocumentMoniker": "src\\tui\\Program.cs",
"ToolTip": "C:\\Users\\Nicola\\Desktop\\DINFO\\src\\tui\\Program.cs",
"RelativeToolTip": "src\\tui\\Program.cs",
"ViewState": "AgIAAA4AAAAAAAAAAAAcwAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-11-22T21:19:37.666Z",
"EditorCaption": ""
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/Handlers/config-file.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static class ConfigHelper
{
public static void FindConfigFile(string targetDirectory)
{
while (!string.IsNullOrEmpty(targetDirectory))
while (!string.IsNullOrWhiteSpace(targetDirectory))
{
var configPath = Path.Combine(targetDirectory, "dinfo.yaml");

Expand Down Expand Up @@ -63,7 +63,7 @@ public static void FindConfigFile(string targetDirectory)

public static void DeserializeConfigFile(string configFilePath)
{
if (string.IsNullOrEmpty(configFilePath) || !File.Exists(configFilePath))
if (string.IsNullOrWhiteSpace(configFilePath) || !File.Exists(configFilePath))
return;

var deserializer = new DeserializerBuilder()
Expand Down
9 changes: 2 additions & 7 deletions src/core/Helpers/directory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ public async Task ProcessDirectoryAsync(string targetDirectory, CancellationToke
foreach (string fileName in fileEntries)
{
var fileInfo = new FileInfo(fileName);

string relativePath = string.IsNullOrEmpty(GlobalsUtils.TargetDirectory)
? string.Empty
: Path.GetRelativePath(GlobalsUtils.TargetDirectory, fileName);
string relativePath = string.IsNullOrWhiteSpace(GlobalsUtils.TargetDirectory) ? string.Empty : Path.GetRelativePath(GlobalsUtils.TargetDirectory, fileName);

bool isIgnored = GlobalsUtils.IgnoredFiles.Any(pattern =>
{
Expand Down Expand Up @@ -102,9 +99,7 @@ public async Task ProcessDirectoryAsync(string targetDirectory, CancellationToke
continue;
}

string relativePath = string.IsNullOrEmpty(GlobalsUtils.TargetDirectory)
? string.Empty
: Path.GetRelativePath(GlobalsUtils.TargetDirectory, subDirectory);
string relativePath = string.IsNullOrWhiteSpace(GlobalsUtils.TargetDirectory) ? string.Empty : Path.GetRelativePath(GlobalsUtils.TargetDirectory, subDirectory);

bool isIgnoredDir = GlobalsUtils.IgnoredDirectories.Any(pattern =>
{
Expand Down
8 changes: 4 additions & 4 deletions src/core/Helpers/files.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ public void GetFileType(string fileName)
logger.LogDebug("Getting file type for file {fileName}", fileName);
string? name = Path.GetFileName(fileName);

if (name.StartsWith('.'))
if (name?.StartsWith('.') ?? false)
{
return;
}

string? extension = Path.GetExtension(name);
if (!string.IsNullOrEmpty(extension))
if (!string.IsNullOrWhiteSpace(extension))
{
GlobalsUtils.FileTypes.Add(extension);
}
Expand All @@ -97,13 +97,13 @@ public string GetFileTypeSingleFile(string fileName)
logger.LogDebug("Getting file type single file");
string? name = Path.GetFileName(fileName);

if (name.StartsWith('.'))
if (name?.StartsWith('.') ?? false)
{
return "N/A";
}

string? extension = Path.GetExtension(name);
if (!string.IsNullOrEmpty(extension))
if (!string.IsNullOrWhiteSpace(extension))
{
return extension;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/Helpers/git.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void FindGitRoot(string targetDirectory)
{
logger.LogDebug("Finding git root for directory {targetDirectory}", targetDirectory);

while (!string.IsNullOrEmpty(targetDirectory))
while (!string.IsNullOrWhiteSpace(targetDirectory))
{
if (Directory.Exists(Path.Combine(targetDirectory, ".git")))
{
Expand Down
3 changes: 1 addition & 2 deletions src/core/dinfo.core.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishTrimmed>true</PublishTrimmed>
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
</PropertyGroup>

Expand Down
3 changes: 1 addition & 2 deletions src/tui/dinfo.tui.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName>dinfo</AssemblyName>
Expand All @@ -7,7 +7,6 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishAot>false</PublishAot>
<PublishTrimmed>false</PublishTrimmed>
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
<Version>1.2.2</Version>
</PropertyGroup>
Expand Down