Open CyrusNajmabadi opened 5 years ago
Tagging @mavasani @sharwell
Note: i have a potential fix here. I've verified it manually. But this repo doesn't have VB tests, so i'm not sure how to make a full test for it.
@CyrusNajmabadi If you are looking at enhancing the public API analyzer that we use for Roslyn.sln, then you want to look in the roslyn-analyzers repo at https://github.com/dotnet/roslyn-analyzers/blob/master/src/Roslyn.Diagnostics.Analyzers/Core/DeclarePublicAPIAnalyzer.cs. We have an open community PR to add the same functionality in roslyn-analyzers repo, but that change proposes a breaking change to the public API text, which seems much less preferable.
Just as an FYI: The public API analyzer in this repo (PublicApiAnalyzer) was a fork from the original implementation in roslyn-analyzers repo, primarily to enable publishing a separate NuGet package just with this analyzer (Roslyn.Diagnostics.Analyzers NuGet package also contains other Roslyn.sln specific analyzers). We had a work item somewhere to consolidate both analyzers so we avoid this confusion, but that hasn't happened yet.
Ah, good to know. I'll move things over there.
@mavasani can you help me with that repo. The instructions say this:
Clone the repository
Restore and build: build.cmd
Execute tests: test.cmd
However, neither build.cmd or test.cmd exist. There is a cibuild.cmd. But it fails for me with:
Feeds used:
C:\Users\cyrus\AppData\Local\NuGet\Cache
C:\Users\cyrus\.nuget\packages\
https://api.nuget.org/v3/index.json
https://www.myget.org/F/roslyn-nightly/
https://www.myget.org/F/dotnet-core/
https://dotnet.myget.org/F/roslyn/api/v3/index.json
Error loading lock file 'C:\github\roslyn-analyzers\src\Microsoft.ApiDesignGuidelines.Analyzers\Core\project.lock.json' : Value cannot be null.
Ignore me entirely. my fork is hugely out of date.
@CyrusNajmabadi Not a duplicate of dotnet/roslyn-analyzers. This is an extracted implementation of the Public API Analyzer that works is any repository, as opposed to the much more limited implementation in roslyn-analyzers.
Simple repro:
Expected: Analyzer complains that 'A' is not part of the publicapi file.
Actual: Analyzer does not complain at all.