Skip to content

Commit

Permalink
[Aaru] Reformat and cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
claunia committed Oct 3, 2023
1 parent 1252fee commit 8815bef
Show file tree
Hide file tree
Showing 33 changed files with 3,380 additions and 3,343 deletions.
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dotnet_style_qualification_for_property
dotnet_style_require_accessibility_modifiers = never:suggestion

# ReSharper properties
resharper_align_first_arg_by_paren = false
resharper_align_linq_query = true
resharper_align_multiline_argument = true
resharper_align_multiline_array_and_object_initializer = false
Expand All @@ -82,7 +83,7 @@ resharper_braces_for_ifelse
resharper_braces_for_while = required_for_multiline
resharper_builtin_type_apply_to_native_integer = true
resharper_constructor_or_destructor_body = expression_body
resharper_csharp_align_first_arg_by_paren = true
resharper_csharp_align_first_arg_by_paren = false
resharper_csharp_empty_block_style = together_same_line
resharper_csharp_place_comments_at_first_column = true
resharper_csharp_prefer_qualified_reference = false
Expand All @@ -95,7 +96,7 @@ resharper_for_built_in_types
resharper_function_declaration_return_type_style = on_single_line
resharper_function_definition_return_type_style = on_single_line
resharper_html_pi_attribute_style = first_attribute_on_single_line
resharper_indent_anonymous_method_block = true
resharper_indent_anonymous_method_block = false
resharper_indent_preprocessor_if = outdent
resharper_indent_preprocessor_other = outdent
resharper_indent_preprocessor_region = outdent
Expand Down
388 changes: 194 additions & 194 deletions Aaru/Aaru.csproj

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions Aaru/Commands/Archive/Info.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,23 @@ public static int Invoke(bool debug, bool verbose, string imagePath)
});

AaruConsole.DebugWriteLineEvent += (format, objects) =>
{
if(objects is null)
stderrConsole.MarkupLine(format);
else
stderrConsole.MarkupLine(format, objects);
};
{
if(objects is null)
stderrConsole.MarkupLine(format);
else
stderrConsole.MarkupLine(format, objects);
};
}

if(verbose)
{
AaruConsole.WriteEvent += (format, objects) =>
{
if(objects is null)
AnsiConsole.Markup(format);
else
AnsiConsole.Markup(format, objects);
};
{
if(objects is null)
AnsiConsole.Markup(format);
else
AnsiConsole.Markup(format, objects);
};
}

Statistics.AddCommand("archive-info");
Expand Down
24 changes: 12 additions & 12 deletions Aaru/Commands/Configure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ int Invoke(bool debug, bool verbose)
});

AaruConsole.DebugWriteLineEvent += (format, objects) =>
{
if(objects is null)
stderrConsole.MarkupLine(format);
else
stderrConsole.MarkupLine(format, objects);
};
{
if(objects is null)
stderrConsole.MarkupLine(format);
else
stderrConsole.MarkupLine(format, objects);
};
}

if(verbose)
{
AaruConsole.WriteEvent += (format, objects) =>
{
if(objects is null)
AnsiConsole.Markup(format);
else
AnsiConsole.Markup(format, objects);
};
{
if(objects is null)
AnsiConsole.Markup(format);
else
AnsiConsole.Markup(format, objects);
};
}

return DoConfigure(false);
Expand Down
26 changes: 13 additions & 13 deletions Aaru/Commands/Database/Statistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,23 @@ public static int Invoke(bool debug, bool verbose)
});

AaruConsole.DebugWriteLineEvent += (format, objects) =>
{
if(objects is null)
stderrConsole.MarkupLine(format);
else
stderrConsole.MarkupLine(format, objects);
};
{
if(objects is null)
stderrConsole.MarkupLine(format);
else
stderrConsole.MarkupLine(format, objects);
};
}

if(verbose)
{
AaruConsole.WriteEvent += (format, objects) =>
{
if(objects is null)
AnsiConsole.Markup(format);
else
AnsiConsole.Markup(format, objects);
};
{
if(objects is null)
AnsiConsole.Markup(format);
else
AnsiConsole.Markup(format, objects);
};
}

var ctx = AaruContext.Create(Settings.Settings.LocalDbPath);
Expand Down Expand Up @@ -118,7 +118,7 @@ public static int Invoke(bool debug, bool verbose)
ulong count = 0;

foreach(Aaru.Database.Models.Command fsInfo in ctx.Commands.Where(c => c.Name == "fs-info" &&
c.Synchronized))
c.Synchronized))
{
count += fsInfo.Count;
ctx.Remove(fsInfo);
Expand Down
24 changes: 12 additions & 12 deletions Aaru/Commands/Database/Update.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@ int Invoke(bool debug, bool verbose, bool clear, bool clearAll)
});

AaruConsole.DebugWriteLineEvent += (format, objects) =>
{
if(objects is null)
stderrConsole.MarkupLine(format);
else
stderrConsole.MarkupLine(format, objects);
};
{
if(objects is null)
stderrConsole.MarkupLine(format);
else
stderrConsole.MarkupLine(format, objects);
};
}

if(verbose)
{
AaruConsole.WriteEvent += (format, objects) =>
{
if(objects is null)
AnsiConsole.Markup(format);
else
AnsiConsole.Markup(format, objects);
};
{
if(objects is null)
AnsiConsole.Markup(format);
else
AnsiConsole.Markup(format, objects);
};
}

AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug);
Expand Down
Loading

0 comments on commit 8815bef

Please sign in to comment.