Add formating rules

This commit is contained in:
ProfessionalUwU 2023-06-03 08:51:24 +02:00
parent 64100065c9
commit 281b6f01a2
Signed by: ProfessionalUwU
GPG Key ID: 013AD77C0A9DD3F2
3 changed files with 54 additions and 28 deletions

26
.editorconfig Normal file
View File

@ -0,0 +1,26 @@
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
[*.cs]
# Indentation and spacing
indent_size = 4
indent_style = tab
tab_width = 4
# Naming Conventions
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# New line preferences
csharp_new_line_before_open_brace = none
csharp_new_line_before_else = false
csharp_new_line_before_catch = false
csharp_new_line_before_finally = false
# Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
# Switch case
csharp_indent_case_contents = true

View File

@ -1,16 +1,16 @@
public class Program { public class Program {
static void Main(string[] args) { static void Main(string[] args) {
if (args.Length == 0) { if (args.Length == 0) {
Console.ForegroundColor = ConsoleColor.Red; Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Please specify an option."); Console.WriteLine("Please specify an option.");
Console.ResetColor(); Console.ResetColor();
} else { } else {
switch(args[0]) { switch (args[0]) {
case "": case "":
break; break;
default: default:
break; break;
} }
} }
} }
} }

View File

@ -1,23 +1,23 @@
public class Pacserver { public class Pacserver {
public static string pacmanCacheDirectory { get; set; } = string.Empty; public static string pacmanCacheDirectory { get; set; } = string.Empty;
public static string determinePacmanCacheDirectory() { public static string determinePacmanCacheDirectory() {
return pacmanCacheDirectory; return pacmanCacheDirectory;
} }
public static string pacmanDatabaseDirectory { get; set; } = string.Empty; public static string pacmanDatabaseDirectory { get; set; } = string.Empty;
public static string determinePacmanDatabaseDirectory() { public static string determinePacmanDatabaseDirectory() {
return pacmanDatabaseDirectory; return pacmanDatabaseDirectory;
} }
public static void checkForNewerPackagesAndDatabases() { public static void checkForNewerPackagesAndDatabases() {
} }
public static void transferPacmanCache() { public static void transferPacmanCache() {
} }
public static void transferPacmanDatabases() { public static void transferPacmanDatabases() {
} }
} }