Skip to content

Commit

Permalink
style: format code with dotnet-format, Prettier and StandardJS
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in f6b557d according to the output
from dotnet-format, Prettier and StandardJS.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Feb 4, 2024
1 parent f6b557d commit 4272781
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 72 deletions.
23 changes: 11 additions & 12 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
date: 2023-07-13T05:44:46:00-05:00Z
description: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, yadda, yadda, yadda...
keywords:
- IP
- copyright
- license
- mit
- IP
- copyright
- license
- mit
permissions:
- commercial-use
- modifications
- distribution
- private-use
- commercial-use
- modifications
- distribution
- private-use
conditions:
- include-copyright
- include-copyright
limitations:
- liability
- warranty
- liability
- warranty
lastmod: 2024-01-0T00:39:00.0000+05:00Z
license: MIT
slug: mit-license
Expand All @@ -32,4 +32,3 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2 changes: 1 addition & 1 deletion Tasks/DeleteAndPush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DeleteAndPush : NuGetTaskBase
public override bool Execute()
{
new DeletePackage(TaskResources, HelpKeywordPrefix) { Source = Source, ApiKey = this.ApiKey, PackageId = PackageId, Version = Version, MSBuildProjectDirectory = MSBuildProjectDirectory }.Execute();
new Push(TaskResources, HelpKeywordPrefix) { Source = Source, ApiKey = ApiKey, PackagePath = PackagePath, MSBuildProjectDirectory = MSBuildProjectDirectory }.Execute();
new Push(TaskResources, HelpKeywordPrefix) { Source = Source, ApiKey = ApiKey, PackagePath = PackagePath, MSBuildProjectDirectory = MSBuildProjectDirectory }.Execute();
return true;
}
}
92 changes: 46 additions & 46 deletions Tasks/NuGetMSBuildLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,50 @@ namespace NuGetPush.Tasks;

public class NuGetMSBuildTaskLogger(MSBTask task) : NuGet.Common.ILogger
{
public void LogDebug(string data) => LogMessage(MessageImportance.Low, data);

public void LogVerbose(string data) => LogMessage(MessageImportance.Low, data);

public void LogInformation(string data) => LogMessage(MessageImportance.Low, data);

public void LogMinimal(string data) => LogMessage(MessageImportance.Low, data);

public void LogWarning(string data) => LogMessage(MessageImportance.High, data);

public void LogError(string data) => LogMessage(MessageImportance.High, data);

public void LogInformationSummary(string data) => LogMessage(MessageImportance.Low, data);

public void Log(LogLevel level, string data) => LogMessage(data);

public TTask LogAsync(LogLevel level, string data)
{
LogMessage(MessageImportance.Low, data);
return TTask.CompletedTask;
}

public void Log(ILogMessage message) => LogMessage(message.ToString());

public TTask LogAsync(ILogMessage message)
{
LogMessage(message.ToString());
return TTask.CompletedTask;
}

protected MSBTask Task => task;
protected IBuildEngine BuildEngine=> Task.BuildEngine;

protected void LogMessage(string message) => LogMessage(MessageImportance.Low, message);

protected void LogMessage(MessageImportance importance, string message, params object[] messageArgs)
{
var e = new BuildMessageEventArgs(
message,
helpKeyword: null,
senderName: Task.GetType().Name,
importance,
DateTime.UtcNow,
messageArgs);
BuildEngine.LogMessageEvent(e);
}
public void LogDebug(string data) => LogMessage(MessageImportance.Low, data);

public void LogVerbose(string data) => LogMessage(MessageImportance.Low, data);

public void LogInformation(string data) => LogMessage(MessageImportance.Low, data);

public void LogMinimal(string data) => LogMessage(MessageImportance.Low, data);

public void LogWarning(string data) => LogMessage(MessageImportance.High, data);

public void LogError(string data) => LogMessage(MessageImportance.High, data);

public void LogInformationSummary(string data) => LogMessage(MessageImportance.Low, data);

public void Log(LogLevel level, string data) => LogMessage(data);

public TTask LogAsync(LogLevel level, string data)
{
LogMessage(MessageImportance.Low, data);
return TTask.CompletedTask;
}

public void Log(ILogMessage message) => LogMessage(message.ToString());

public TTask LogAsync(ILogMessage message)
{
LogMessage(message.ToString());
return TTask.CompletedTask;
}

protected MSBTask Task => task;
protected IBuildEngine BuildEngine => Task.BuildEngine;

protected void LogMessage(string message) => LogMessage(MessageImportance.Low, message);

protected void LogMessage(MessageImportance importance, string message, params object[] messageArgs)
{
var e = new BuildMessageEventArgs(
message,
helpKeyword: null,
senderName: Task.GetType().Name,
importance,
DateTime.UtcNow,
messageArgs);
BuildEngine.LogMessageEvent(e);
}
}
2 changes: 1 addition & 1 deletion Tasks/NuGetTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public NuGetTaskBase() : base() { }
protected PackageSourceProvider PackageSourceProvider => new(Settings);

private NuGetMSBuildTaskLogger? _logger;
public virtual NuGetMSBuildTaskLogger Logger { get => _logger ??= new (this); set => _logger = value; }
public virtual NuGetMSBuildTaskLogger Logger { get => _logger ??= new(this); set => _logger = value; }

private string? _apiKey;
public virtual string ApiKey
Expand Down
23 changes: 11 additions & 12 deletions TestPush/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
date: 2023-07-13T05:44:46:00-05:00Z
description: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, yadda, yadda, yadda...
keywords:
- IP
- copyright
- license
- mit
- IP
- copyright
- license
- mit
permissions:
- commercial-use
- modifications
- distribution
- private-use
- commercial-use
- modifications
- distribution
- private-use
conditions:
- include-copyright
- include-copyright
limitations:
- liability
- warranty
- liability
- warranty
lastmod: 2024-01-0T00:39:00.0000+05:00Z
license: MIT
slug: mit-license
Expand All @@ -32,4 +32,3 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit 4272781

Please sign in to comment.