[xtro] Update u2todo not to create todo files for non supported frameworks

This commit is contained in:
Sebastien Pouliot 2018-08-21 15:42:36 -04:00
Родитель b8d1a8739e
Коммит 75b146b9d2
7 изменённых файлов: 152 добавлений и 5 удалений

Просмотреть файл

@ -0,0 +1,90 @@
using System;
namespace Extrospection {
public static partial class Helpers {
public static bool Filter (string fx)
{
switch (fx) {
// macOS only - unsupported frameworks
case "AE":
case "AGL":
case "AppleScriptObjC":
case "ATS":
case "AudioVideoBridging":
case "Automator":
case "CalendarStore":
case "CarbonCore":
case "CFOpenDirectory":
case "Collaboration":
case "ColorSync":
case "CommonPanels":
case "CryptoTokenKit":
case "DictionaryServices":
case "DirectoryService":
case "DiskArbitration":
case "DiscRecording":
case "DiscRecordingUI":
case "DVDPlayback":
case "ExceptionHandling":
case "ForceFeedback":
case "FSEvents":
case "FWAUserLib":
case "GLUT":
case "Help":
case "HIServices":
case "HIToolbox":
case "Hypervisor":
case "ICADevices":
case "ImageCaptureCore":
case "ImageCapture":
case "IMServicePlugIn":
case "Ink":
case "InputMethodKit":
case "InstallerPlugins":
case "IOBluetooth":
case "IOBluetoothUI":
case "IOKit":
case "JavaFrameEmbedding":
case "JavaVM":
case "Kerberos":
case "LatentSemanticMapping":
case "LaunchServices":
case "Metadata":
case "NavigationServices":
case "NetFS":
case "OpenCL":
case "OpenDirectory":
case "OpenScripting":
case "OSAKit":
case "OSServices":
case "PreferencePanes":
case "Python":
case "QD":
case "QuartzFilters":
case "ruby":
case "ScreenSaver":
case "Scripting":
case "ScriptingBridge":
case "SearchKit":
case "SecurityFoundation": // bugzilla
case "SecurityHI":
case "ServiceManagement":
case "SharedFileList":
case "SpeechRecognition":
case "SpeechSynthesis":
case "SyncServices":
case "Tcl":
case "TWAIN":
case "vmnet":
// other non-supported frameworks
case "GSS": // iOS and macOS
case "vecLib": // all
return true;
default:
return false;
}
}
}
}

Просмотреть файл

@ -9,7 +9,7 @@ using Clang.Ast;
namespace Extrospection {
public static class Helpers {
public static partial class Helpers {
// the original name can be lost and, if not registered (e.g. enums), might not be available
static Dictionary<string,string> map = new Dictionary<string, string> () {

Просмотреть файл

@ -118,5 +118,5 @@ remove-empty-files:
find . -empty -exec git rm -f {} \;
unclassified2todo:
$(SYSTEM_CSC) u2todo.cs
$(SYSTEM_CSC) Filter.cs u2todo/u2todo.cs
$(MONO) u2todo.exe

Просмотреть файл

@ -1,10 +1,19 @@
using System;
using System;
using System.IO;
using Extrospection;
class Program {
static void Main ()
static void Main (string[] args)
{
foreach (var file in Directory.GetFiles (".", "*.unclassified")) {
var dir = args.Length == 0 ? "." : args [0];
foreach (var file in Directory.GetFiles (dir, "*.unclassified")) {
var last = file.LastIndexOf ('-');
var fx = file.Substring (last + 1, file.Length - last - 14);
if (Helpers.Filter (fx)) {
Console.WriteLine ($"{fx} is ignored, skipping...");
continue;
}
var todo = Path.ChangeExtension (file, ".todo");
if (File.Exists (todo)) {
Console.WriteLine ($"Appending {file} to {todo}");

Просмотреть файл

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{244C7FD0-39C9-49F7-8D88-A954EA8DFFF6}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>u2todo</RootNamespace>
<AssemblyName>u2todo</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ExternalConsole>true</ExternalConsole>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ExternalConsole>true</ExternalConsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="u2todo.cs" />
<Compile Include="..\Filter.cs">
<Link>Filter.cs</Link>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

Просмотреть файл

@ -87,6 +87,7 @@
<Compile Include="SimdCheck.cs" />
<Compile Include="Log.cs" />
<Compile Include="RequiresSuperCheck.cs" />
<Compile Include="Filter.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />

Просмотреть файл

@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xtro-report", "xtro-report\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xtro-sanity", "xtro-sanity\xtro-sanity.csproj", "{E4D9B627-EF24-43AF-B6F2-60F38694C905}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "u2todo", "u2todo\u2todo.csproj", "{244C7FD0-39C9-49F7-8D88-A954EA8DFFF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -25,5 +27,9 @@ Global
{E4D9B627-EF24-43AF-B6F2-60F38694C905}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4D9B627-EF24-43AF-B6F2-60F38694C905}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4D9B627-EF24-43AF-B6F2-60F38694C905}.Release|Any CPU.Build.0 = Release|Any CPU
{244C7FD0-39C9-49F7-8D88-A954EA8DFFF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{244C7FD0-39C9-49F7-8D88-A954EA8DFFF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{244C7FD0-39C9-49F7-8D88-A954EA8DFFF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{244C7FD0-39C9-49F7-8D88-A954EA8DFFF6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal