(xml_path, msbuild_rules)
| 2670 | |
| 2671 | |
| 2672 | def _GenerateMSBuildRuleXmlFile(xml_path, msbuild_rules): |
| 2673 | # Generate the .xml file |
| 2674 | content = [ |
| 2675 | "ProjectSchemaDefinitions", |
| 2676 | { |
| 2677 | "xmlns": ( |
| 2678 | "clr-namespace:Microsoft.Build.Framework.XamlTypes;" |
| 2679 | "assembly=Microsoft.Build.Framework" |
| 2680 | ), |
| 2681 | "xmlns:x": "http://schemas.microsoft.com/winfx/2006/xaml", |
| 2682 | "xmlns:sys": "clr-namespace:System;assembly=mscorlib", |
| 2683 | "xmlns:transformCallback": "Microsoft.Cpp.Dev10.ConvertPropertyCallback", |
| 2684 | }, |
| 2685 | ] |
| 2686 | for rule in msbuild_rules: |
| 2687 | content.extend( |
| 2688 | [ |
| 2689 | [ |
| 2690 | "Rule", |
| 2691 | { |
| 2692 | "Name": rule.rule_name, |
| 2693 | "PageTemplate": "tool", |
| 2694 | "DisplayName": rule.display_name, |
| 2695 | "Order": "200", |
| 2696 | }, |
| 2697 | [ |
| 2698 | "Rule.DataSource", |
| 2699 | [ |
| 2700 | "DataSource", |
| 2701 | {"Persistence": "ProjectFile", "ItemType": rule.rule_name}, |
| 2702 | ], |
| 2703 | ], |
| 2704 | [ |
| 2705 | "Rule.Categories", |
| 2706 | [ |
| 2707 | "Category", |
| 2708 | {"Name": "General"}, |
| 2709 | ["Category.DisplayName", ["sys:String", "General"]], |
| 2710 | ], |
| 2711 | [ |
| 2712 | "Category", |
| 2713 | {"Name": "Command Line", "Subtype": "CommandLine"}, |
| 2714 | ["Category.DisplayName", ["sys:String", "Command Line"]], |
| 2715 | ], |
| 2716 | ], |
| 2717 | [ |
| 2718 | "StringListProperty", |
| 2719 | { |
| 2720 | "Name": "Inputs", |
| 2721 | "Category": "Command Line", |
| 2722 | "IsRequired": "true", |
| 2723 | "Switch": " ", |
| 2724 | }, |
| 2725 | [ |
| 2726 | "StringListProperty.DataSource", |
| 2727 | [ |
| 2728 | "DataSource", |
| 2729 | { |
no test coverage detected