Skip to content

Commit

Permalink
Add CI yaml file for csharp parser
Browse files Browse the repository at this point in the history
  • Loading branch information
chidozieononiwu committed Jun 27, 2024
1 parent d2298ee commit 3aeaae6
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/apiview/parsers/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Previously APIview tokens were created as a flat list assigned to the `CodeFileT

## Serialization

Serialize the generated code file to JSON and then compress the file using Gzip compression. Try to make the json as small as possible by ignoring null values and empty collections.
Serialize the generated code file to JSON with Gzip compression. The output file should have `.json.tgz` extension. Try to make the json as small as possible by ignoring null values and empty collections.
Don't worry about indentation that will be handled by the tree structure. In the case you want to have indentation between the tokens then use `TabSpace` token kind.

## Examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\dotnet\APIView\APIView\APIView.csproj" />
<ProjectReference Include="..\..\..\..\src\dotnet\Azure.ClientSdk.Analyzers\Azure.ClientSdk.Analyzers\Azure.ClientSdk.Analyzers.csproj" />
<ProjectReference Include="..\..\..\..\..\src\dotnet\APIView\APIView\APIView.csproj" />
<ProjectReference Include="..\..\..\..\..\src\dotnet\Azure.ClientSdk.Analyzers\Azure.ClientSdk.Analyzers\Azure.ClientSdk.Analyzers.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ private bool IsAccessible(ISymbol s)
case Accessibility.Public:
return true;
case Accessibility.Internal:
return s.GetAttributes().Any(a => a.AttributeClass.Name == "FriendAttribute");
return s.GetAttributes().Any(a => a.AttributeClass?.Name == "FriendAttribute");
default:
return IsAccessibleExplicitInterfaceImplementation(s);
}
Expand Down
27 changes: 27 additions & 0 deletions tools/apiview/parsers/csharp-api-parser/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
trigger:
branches:
include:
- main
- feature/*
- release/*
- hotfix/*
paths:
include:
- tools/apiview/parsers/csharp-api-parser

pr:
branches:
include:
- main
- feature/*
- release/*
- hotfix/*
paths:
include:
- tools/apiview/parsers/csharp-api-parser

extends:
template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml
parameters:
PackageDirectory: $(Build.SourcesDirectory)/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "APIView", "..\..\..\..\src\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ClientSdk.Analyzers", "..\..\..\..\src\dotnet\Azure.ClientSdk.Analyzers\Azure.ClientSdk.Analyzers\Azure.ClientSdk.Analyzers.csproj", "{4ECD9A58-ABEB-4285-A5D7-7CDA8A558AE0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpAPIParser", "CSharpAPIParser.csproj", "{EB159E3D-9732-4EB3-A3C2-817475B9D749}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpAPIParser", "CSharpAPIParser\CSharpAPIParser.csproj", "{EB159E3D-9732-4EB3-A3C2-817475B9D749}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down

0 comments on commit 3aeaae6

Please sign in to comment.