public void Warning1(Source src, object code, string msg) { // Silence warnings from cached packages (unless -W3 was passed) if (src.Package.IsCached && WarningLevel < 3 || src.Package.IsVerified || MaxErrorCount > 0 && WarningCount >= MaxErrorCount || WarningLevel == 0) { return; } // Silence warnings from UX generated code (unless -W3 was passed) if (src.FullPath.EndsWith(".g.uno") && WarningLevel < 3) { return; } var str = code?.ToString() ?? "W0000"; Report(src, str, msg, ConsoleColor.Yellow); lock (Errors) { WarningCount++; Errors.AddWarning(src, str, msg); } }