Skip to content

Commit ae357c9

Browse files
committed
Rename EmojisConstants to AppEmojisConstants to avoid naming conflicts with Atc.Console.Spectre.EmojisConstants
1 parent 893830b commit ae357c9

17 files changed

+78
-74
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,15 @@ Running the command above produces the following output
169169
|_| \_\ \__,_| |_| \___| |___/ \__,_| | .__/ \__,_| \__,_| \__| \___| |_|
170170
|_|
171171
🐭 Working on EditorConfig files
172-
🟢 /.editorconfig files merged
173-
🟢 sample/.editorconfig created
174-
🟢 src/.editorconfig created
175-
🟢 test/.editorconfig created
172+
🟢 root: .editorconfig files merged
173+
🟢 sample: .editorconfig created
174+
🟢 src: .editorconfig created
175+
🟢 test: .editorconfig created
176176
🔨 Working on Directory.Build.props files
177-
🟢 /Directory.Build.props created
178-
🟢 sample/Directory.Build.props created
179-
🟢 src/Directory.Build.props created
180-
🟢 test/Directory.Build.props created
177+
🟢 root: Directory.Build.props created
178+
🟢 sample: Directory.Build.props created
179+
🟢 src: Directory.Build.props created
180+
🟢 test: Directory.Build.props created
181181
✅ Done
182182
```
183183

src/Atc.CodingRules.Updater.CLI/Commands/AnalyzerProvidersCacheCleanupCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ public override int Execute(CommandContext context)
1717
}
1818
catch (Exception ex)
1919
{
20-
logger.LogError($"{Console.Spectre.EmojisConstants.Error} {ex.GetMessage()}");
20+
logger.LogError($"{EmojisConstants.Error} {ex.GetMessage()}");
2121
return ConsoleExitStatusCodes.Failure;
2222
}
2323

24-
logger.LogInformation($"{Console.Spectre.EmojisConstants.Done} Done");
24+
logger.LogInformation($"{EmojisConstants.Done} Done");
2525
return ConsoleExitStatusCodes.Success;
2626
}
2727
}

src/Atc.CodingRules.Updater.CLI/Commands/AnalyzerProvidersCollectCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ await AnalyzerProviderBaseRulesHelper.GetAnalyzerProviderBaseRules(
3333
}
3434
catch (Exception ex)
3535
{
36-
logger.LogError($"{Console.Spectre.EmojisConstants.Error} {ex.GetMessage()}");
36+
logger.LogError($"{EmojisConstants.Error} {ex.GetMessage()}");
3737
return ConsoleExitStatusCodes.Failure;
3838
}
3939

40-
logger.LogInformation($"{Console.Spectre.EmojisConstants.Done} Done");
40+
logger.LogInformation($"{EmojisConstants.Done} Done");
4141
return ConsoleExitStatusCodes.Success;
4242
}
4343

src/Atc.CodingRules.Updater.CLI/Commands/OptionsFileCreateCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ private async Task<int> ExecuteInternalAsync(
3535
}
3636
catch (Exception ex)
3737
{
38-
logger.LogError($"{Console.Spectre.EmojisConstants.Error} {ex.GetMessage()}");
38+
logger.LogError($"{EmojisConstants.Error} {ex.GetMessage()}");
3939
return ConsoleExitStatusCodes.Failure;
4040
}
4141

42-
logger.LogInformation($"{Console.Spectre.EmojisConstants.Done} Done");
42+
logger.LogInformation($"{EmojisConstants.Done} Done");
4343
return ConsoleExitStatusCodes.Success;
4444
}
4545
}

src/Atc.CodingRules.Updater.CLI/Commands/OptionsFileValidateCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ private async Task<int> ExecuteInternalAsync(
3838
}
3939
catch (Exception ex)
4040
{
41-
logger.LogError($"{Console.Spectre.EmojisConstants.Error} {ex.GetMessage()}");
41+
logger.LogError($"{EmojisConstants.Error} {ex.GetMessage()}");
4242
return ConsoleExitStatusCodes.Failure;
4343
}
4444

45-
logger.LogInformation($"{Console.Spectre.EmojisConstants.Done} Done");
45+
logger.LogInformation($"{EmojisConstants.Done} Done");
4646
return ConsoleExitStatusCodes.Success;
4747
}
4848
}

src/Atc.CodingRules.Updater.CLI/Commands/RootCommand.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ private static async Task<int> ExecuteInternalAsync(
1616
{
1717
if (settings.IsOptionValueTrue(settings.Version))
1818
{
19-
HandleVersionOption();
19+
try
20+
{
21+
HandleVersionOption();
22+
}
23+
catch
24+
{
25+
return ConsoleExitStatusCodes.Failure;
26+
}
2027
}
2128

2229
await Task.Delay(1);

src/Atc.CodingRules.Updater.CLI/Commands/RunCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ await ProjectHelper.HandleFiles(
5353
}
5454
catch (Exception ex)
5555
{
56-
logger.LogError($"{Console.Spectre.EmojisConstants.Error} {ex.Message}");
56+
logger.LogError($"{EmojisConstants.Error} {ex.Message}");
5757
return ConsoleExitStatusCodes.Failure;
5858
}
5959

60-
logger.LogInformation($"{Console.Spectre.EmojisConstants.Done} Done");
60+
logger.LogInformation($"{EmojisConstants.Done} Done");
6161
return ConsoleExitStatusCodes.Success;
6262
}
6363

src/Atc.CodingRules.Updater.CLI/Commands/SanityCheckCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ private async Task<int> ExecuteInternalAsync(
2929
}
3030
catch (Exception ex)
3131
{
32-
logger.LogError($"{Console.Spectre.EmojisConstants.Error} {ex.Message}");
32+
logger.LogError($"{EmojisConstants.Error} {ex.Message}");
3333
return ConsoleExitStatusCodes.Failure;
3434
}
3535

36-
logger.LogInformation($"{Console.Spectre.EmojisConstants.Done} Done");
36+
logger.LogInformation($"{EmojisConstants.Done} Done");
3737
return ConsoleExitStatusCodes.Success;
3838
}
3939

src/Atc.CodingRules.Updater.CLI/OptionsHelper.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ public static async Task<Options> CreateDefault(
4545
options.ProjectTarget = settings.ProjectTarget.Value;
4646
}
4747

48-
var serializeOptions = JsonSerializerOptionsFactory.Create();
49-
var json = JsonSerializer.Serialize(options, serializeOptions);
50-
await Helpers.FileHelper.WriteAllTextAsync(fileInfo, json);
48+
await FileHelper<Options>.WriteModelToJsonFileAsync(fileInfo, options);
5149
return (true, string.Empty);
5250
}
5351

src/Atc.CodingRules.Updater.CLI/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ public static class Program
88
{
99
public static Task<int> Main(string[] args)
1010
{
11+
args = new[] { "run", "-p", @"C:\Temp\sletmig", "-v" };
12+
1113
ArgumentNullException.ThrowIfNull(args);
1214

1315
args = SetProjectPathFromDotArgumentIfNeeded(args);

0 commit comments

Comments
 (0)