dd597fca44
BrandingLinks (5 Hellion-owned URLs) and IntegrationLinks (2 third-party plugin URLs) now run through UrlValidation.ValidateAll from a [ModuleInitializer] hook. A malformed URL throws InvalidOperationException at plugin load with the source class and the broken URL in the message, instead of silently failing when a user clicks the button. CA2255 is suppressed at the attribute sites — the warning is for library code shipped to unknown consumers, but the plugin DLL is loaded directly by Dalamud, which makes module-init the right one-shot hook.
21 lines
671 B
C#
21 lines
671 B
C#
using System.Runtime.CompilerServices;
|
|
using HellionChat.Util;
|
|
|
|
namespace HellionChat.Integrations;
|
|
|
|
// Third-party plugin URLs — separate from BrandingLinks (Hellion-owned URLs).
|
|
internal static class IntegrationLinks
|
|
{
|
|
public const string HonorificRepo = "https://github.com/Caraxi/Honorific";
|
|
public const string HonorificAuthor = "https://github.com/Caraxi";
|
|
|
|
// See BrandingLinks.ValidateUrls for the CA2255 rationale.
|
|
#pragma warning disable CA2255
|
|
[ModuleInitializer]
|
|
#pragma warning restore CA2255
|
|
internal static void ValidateUrls()
|
|
{
|
|
UrlValidation.ValidateAll(nameof(IntegrationLinks), HonorificRepo, HonorificAuthor);
|
|
}
|
|
}
|