mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-05-03 20:39:14 -05:00
set WarningsAsErrors = true
This commit is contained in:
@@ -117,12 +117,14 @@ File shrunk in size by: {{ difference | file_size }} / {{ percent }}%
|
||||
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", settings.ApiToken);
|
||||
|
||||
// Create the request content
|
||||
#pragma warning disable IL2026
|
||||
var content = new StringContent(JsonSerializer.Serialize(
|
||||
new {
|
||||
type = "note",
|
||||
title,
|
||||
body
|
||||
}), Encoding.UTF8, "application/json");
|
||||
#pragma warning restore IL2026
|
||||
|
||||
|
||||
var response = httpClient.PostAsync("https://api.pushbullet.com/v2/pushes", content).Result;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<Product>Pushbullet</Product>
|
||||
<PackageProjectUrl>https://fileflows.com/</PackageProjectUrl>
|
||||
<Description>Lets you send Pushbullet messages to a server</Description>
|
||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Update="i18n\*.json">
|
||||
|
||||
@@ -11,7 +11,7 @@ public class PushbulletTests
|
||||
[TestMethod]
|
||||
public void Pushbullet_Basic_Message()
|
||||
{
|
||||
var args = new NodeParameters("test.file", new TestLogger(), false, string.Empty, null);
|
||||
var args = new NodeParameters("test.file", new TestLogger(), false, string.Empty, null!);
|
||||
args.GetPluginSettingsJson = (string input) =>
|
||||
{
|
||||
return File.ReadAllText("../../../../../Pushbullet.json");
|
||||
|
||||
@@ -24,11 +24,13 @@ internal class TestLogger : ILogger
|
||||
{
|
||||
if (args == null || args.Length == 0)
|
||||
return;
|
||||
#pragma warning disable IL2026
|
||||
string message = type + " -> " +
|
||||
string.Join(", ", args.Select(x =>
|
||||
x == null ? "null" :
|
||||
x.GetType().IsPrimitive || x is string ? x.ToString() :
|
||||
System.Text.Json.JsonSerializer.Serialize(x)));
|
||||
#pragma warning restore IL2026
|
||||
Messages.Add(message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user