fix typo
This commit is contained in:
@@ -24,14 +24,14 @@ namespace Barotrauma {
|
|||||||
// Barotrauma
|
// Barotrauma
|
||||||
"Barotrauma",
|
"Barotrauma",
|
||||||
};
|
};
|
||||||
private static string[] typessProhibited = new string[] {
|
private static string[] typesProhibited = new string[] {
|
||||||
//"System.Reflection",
|
//"System.Reflection",
|
||||||
"System.IO",
|
"System.IO",
|
||||||
};
|
};
|
||||||
public static bool IsTypeAllowed(string usingName)
|
public static bool IsTypeAllowed(string usingName)
|
||||||
{
|
{
|
||||||
if (useWhitelist && !typesPermited.Any(u => u.StartsWith(usingName))) return false;
|
if (useWhitelist && !typesPermited.Any(u => u.StartsWith(usingName))) return false;
|
||||||
if (typessProhibited.Any(u => u.StartsWith(usingName))) return false;
|
if (typesProhibited.Any(u => u.StartsWith(usingName))) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ namespace Barotrauma {
|
|||||||
var tlStatements = nodeCheck.Where(n => n is GlobalStatementSyntax).ToList();
|
var tlStatements = nodeCheck.Where(n => n is GlobalStatementSyntax).ToList();
|
||||||
if (tlStatements.Count > 0)
|
if (tlStatements.Count > 0)
|
||||||
{
|
{
|
||||||
string errStr = "Cmopilation Error:";
|
string errStr = "Compilation Error:";
|
||||||
foreach (var tls in tlStatements) tls.GetDiagnostics().ToList().ForEach(d => errStr += $"\n {d.ToString()}");
|
foreach (var tls in tlStatements) tls.GetDiagnostics().ToList().ForEach(d => errStr += $"\n {d.ToString()}");
|
||||||
return errStr;
|
return errStr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user