Skip to content

Commit

Permalink
Merge pull request #209 from baruchiro/antlr4
Browse files Browse the repository at this point in the history
[Issue #208] Add Antlr4 tag support
  • Loading branch information
hvanbakel committed Nov 13, 2018
2 parents b299b80 + 76c48c5 commit f5f0dcc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public sealed class FileTransformation : ILegacyOnlyProjectTransformation
"Reference",
"ProjectReference",
"PackageReference",
"Antlr4"
};

private readonly ILogger logger;
Expand Down
3 changes: 2 additions & 1 deletion Project2015To2017.Tests/FileTransformationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ public void TransformsFiles()

var includeItems = project.ItemGroups.SelectMany(x => x.Elements()).ToImmutableList();

Assert.AreEqual(29, includeItems.Count);
Assert.AreEqual(31, includeItems.Count);

Assert.AreEqual(12, includeItems.Count(x => x.Name.LocalName == "Reference"));
Assert.AreEqual(2, includeItems.Count(x => x.Name.LocalName == "ProjectReference"));
Assert.AreEqual(2, includeItems.Count(x=> x.Name.LocalName.Equals("Antlr4")));
Assert.AreEqual(11, includeItems.Count(x => x.Name.LocalName == "Compile"));
Assert.AreEqual(5, includeItems.Count(x => x.Name.LocalName == "Compile" && x.Attribute("Update") != null));
Assert.AreEqual(4, includeItems.Count(x => x.Name.LocalName == "Compile" && x.Attribute("Include") != null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@
<Project>{E5D98CC5-93A3-450D-B33E-F9CAD02BBD8C}</Project>
<Name>YetAnotherProject</Name>
</ProjectReference>
<Antlr4 Include="filename1.g4">
<Generator>MSBuild:Compile</Generator>
<TargetLanguage>CSharp_v4_5</TargetLanguage>
<CustomToolNamespace>myFramework</CustomToolNamespace>
</Antlr4>
<Antlr4 Include="filename2.g4">
<Generator>MSBuild:Compile</Generator>
<TargetLanguage>CSharp_v4_5</TargetLanguage>
<CustomToolNamespace>myFramework</CustomToolNamespace>
</Antlr4>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down

0 comments on commit f5f0dcc

Please sign in to comment.