Skip to content

Commit

Permalink
formaatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Bod9001 committed Dec 12, 2024
1 parent b1c6f48 commit 91f9b86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions UnitystationLauncher/Services/InstallationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ public List<Installation> GetInstallations()
// should be something like {basePath}/{forkName}/{version}
if (server.ForkName.SanitiseStringPath() == "nonbuild")
{
throw new Exception($" bad server.ForkName {server.ForkName.SanitiseStringPath()} Not allowed as save location (nonbuild)");
throw new Exception($" bad server ForkName {server.ForkName.SanitiseStringPath()} Not allowed as save location (nonbuild)");

Check warning on line 120 in UnitystationLauncher/Services/InstallationService.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

UnitystationLauncher/Services/InstallationService.cs#L120

'System.Exception' should not be thrown by user code.

Check failure on line 120 in UnitystationLauncher/Services/InstallationService.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

UnitystationLauncher/Services/InstallationService.cs#L120

Replace the string 'server' with 'nameof(server)'.
}

if (server.ForkName.SanitiseStringPath() == "tts")
{
throw new Exception($" bad server.ForkName {server.ForkName.SanitiseStringPath()} Not allowed as save location (tts) ");
throw new Exception($" bad server ForkName {server.ForkName.SanitiseStringPath()} Not allowed as save location (tts) ");

Check warning on line 125 in UnitystationLauncher/Services/InstallationService.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

UnitystationLauncher/Services/InstallationService.cs#L125

'System.Exception' should not be thrown by user code.

Check failure on line 125 in UnitystationLauncher/Services/InstallationService.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

UnitystationLauncher/Services/InstallationService.cs#L125

Replace the string 'server' with 'nameof(server)'.
}


Expand Down
6 changes: 5 additions & 1 deletion UnitystationLauncher/Services/TTSService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ public TTSService(HttpClient httpClient, IPreferencesService preferencesService,

public async Task CheckAndDownloadLatestVersion(Download Download)

Check failure on line 46 in UnitystationLauncher/Services/TTSService.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

UnitystationLauncher/Services/TTSService.cs#L46

The Cyclomatic Complexity of this method is 15 which is greater than 10 authorized.
{
if ((_preferencesService.GetPreferences().TTSEnabled is true) == false) return;
if ((_preferencesService.GetPreferences().TTSEnabled is true) == false)
{
return;
}

if (_environmentService.GetCurrentEnvironment() == CurrentEnvironment.MacOsStandalone)
{
Expand Down Expand Up @@ -309,6 +312,7 @@ public void StartTTS()
}
}


public void StopTTS()
{
if (process != null)
Expand Down

0 comments on commit 91f9b86

Please sign in to comment.