-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⬆️ Bump files with dotnet-file sync (#310)
* ⬆️ Bump files with dotnet-file sync # devlooped/oss - Add our implementation of JWT manifest reading and reporting devlooped/oss@a0ae727 - Integrate more seamlessly with the existing workflows devlooped/oss@e732f6a - Add copylocal behavior when merging assemblies devlooped/oss@7cda4a1 - Use org profile links for diagnostics devlooped/oss@b03392d - Whitespace and formatting devlooped/oss@d74f511 - Minimal docs on consuming devlooped/oss@827a1d1 - Simplify and unify manifest reading implementation devlooped/oss@4fca946 - Ignore sponsorlink sources in formatting devlooped/oss@f571a42 - Add CI for SponsorLink analyzer devlooped/oss@45595a0 - Remove unused legacy nuget.org devlooped/oss@17871a3
- Loading branch information
1 parent
aed4b2c
commit bf7c169
Showing
46 changed files
with
2,561 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<IsRoslynComponent>true</IsRoslynComponent> | ||
<PackFolder>analyzers/dotnet/roslyn4.0</PackFolder> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<CustomAfterMicrosoftCSharpTargets>$(MSBuildThisFileDirectory)..\SponsorLink.targets</CustomAfterMicrosoftCSharpTargets> | ||
<MergeAnalyzerAssemblies>true</MergeAnalyzerAssemblies> | ||
<ImplicitUsings>disable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="NuGetizer" Version="1.2.2" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" Pack="false" /> | ||
<PackageReference Include="PolySharp" Version="1.14.1" PrivateAssets="all" /> | ||
<PackageReference Include="ThisAssembly.AssemblyInfo" Version="1.4.3" PrivateAssets="all" /> | ||
<PackageReference Include="ThisAssembly.Git" Version="1.4.3" PrivateAssets="all" /> | ||
<PackageReference Include="ThisAssembly.Constants" Version="1.4.3" PrivateAssets="all" /> | ||
<PackageReference Include="ThisAssembly.Strings" Version="1.4.3" PrivateAssets="all" /> | ||
<PackageReference Include="ThisAssembly.Project" Version="1.4.3" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<InternalsVisibleTo Include="Tests" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Update="buildTransitive\SponsorableLib.targets" Pack="true" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"profiles": { | ||
"SponsorableLib": { | ||
"commandName": "DebugRoslynComponent", | ||
"targetProject": "..\\Tests\\Tests.csproj", | ||
"environmentVariables": { | ||
"SPONSORLINK_TRACE": "true" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Collections.Immutable; | ||
using Devlooped.Sponsors; | ||
using Microsoft.CodeAnalysis; | ||
using Microsoft.CodeAnalysis.Diagnostics; | ||
using static Devlooped.Sponsors.SponsorLink; | ||
using static ThisAssembly.Constants; | ||
|
||
namespace Analyzer; | ||
|
||
[DiagnosticAnalyzer(LanguageNames.CSharp)] | ||
public class StatusReportingAnalyzer : DiagnosticAnalyzer | ||
{ | ||
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray<DiagnosticDescriptor>.Empty; | ||
|
||
public override void Initialize(AnalysisContext context) | ||
{ | ||
context.EnableConcurrentExecution(); | ||
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); | ||
|
||
context.RegisterCodeBlockAction(c => | ||
{ | ||
var status = Diagnostics.GetStatus(Funding.Product); | ||
Tracing.Trace($"Status: {status}"); | ||
}); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/SponsorLink/Analyzer/buildTransitive/SponsorableLib.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="Devlooped.Sponsors.targets"/> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<GenerateDocumentationFile>false</GenerateDocumentationFile> | ||
<LangVersion>latest</LangVersion> | ||
<ImplicitUsings>true</ImplicitUsings> | ||
<Nullable>annotations</Nullable> | ||
<PackOnBuild>true</PackOnBuild> | ||
<!-- Avoid deleting older packed versions to avoid rebuild errors (since package is in same solution, which is uncommon) --> | ||
<EnablePackCleanup>false</EnablePackCleanup> | ||
<PackageOutputPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)bin'))</PackageOutputPath> | ||
|
||
<RestoreSources>https://pkg.kzu.app/index.json;https://api.nuget.org/v3/index.json</RestoreSources> | ||
<RestoreSources Condition="Exists('$(PackageOutputPath)')">$(PackageOutputPath);$(RestoreSources)</RestoreSources> | ||
|
||
<!-- Roslyn caches analyzers aggressively so we are better off using a very dynamic version number | ||
for local builds where a quick devloop is key. We bump version every 10 seconds --> | ||
<Version>42.42.$([System.Math]::Floor($([MSBuild]::Divide($([System.DateTime]::Now.TimeOfDay.TotalSeconds), 10))))</Version> | ||
|
||
<Product>SponsorableLib</Product> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!--<Constant Include="Funding.Product" Value="$(Product)" /> | ||
<Constant Include="Funding.AnalyzerPrefix" Value="SLIB" />--> | ||
<!--<Constant Include="Funding.GraceDays" Value="21" />--> | ||
</ItemGroup> | ||
|
||
<!-- DOGFOODING LOCAL BUILDS --> | ||
<!-- Create a Directory.targets.user alongside this file, with the following content | ||
(update the version number to the number of the built local package): --> | ||
<!-- | ||
<Project> | ||
<ItemGroup Condition="Exists('$(DevPath)')"> | ||
<PackageReference Update="@(PackageReference -> WithMetadataValue('Identity', 'Devlooped.SponsorLink'))" | ||
Version="42.42.6587" /> | ||
</ItemGroup> | ||
</Project> | ||
--> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project> | ||
|
||
<ItemGroup Condition="Exists('$(PackageOutputPath)\SponsorableLib.$(Version).nupkg')"> | ||
<PackageReference Update="@(PackageReference -> WithMetadataValue('Identity', 'SponsorableLib'))" | ||
Version="$(Version)" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<PackNone>true</PackNone> | ||
<PackageId>SponsorableLib</PackageId> | ||
<Description>Sample library incorporating SponsorLink checks</Description> | ||
<PackOnBuild>true</PackOnBuild> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="NuGetizer" Version="1.2.2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Analyzer\Analyzer.csproj" ReferenceOutputAssembly="false" OutputType="Analyzer" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<EmbeddedResource Update="Resources.resx"> | ||
<!-- Default to Just Works resources generation. See https://www.cazzulino.com/resources.html --> | ||
<Generator>MSBuild:Compile</Generator> | ||
<StronglyTypedFileName>$(IntermediateOutputPath)\$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.'))%(Filename).g$(DefaultLanguageSourceExtension)</StronglyTypedFileName> | ||
<StronglyTypedLanguage>$(Language)</StronglyTypedLanguage> | ||
<StronglyTypedNamespace Condition="'%(RelativeDir)' == ''">$(RootNamespace)</StronglyTypedNamespace> | ||
<StronglyTypedNamespace Condition="'%(RelativeDir)' != ''">$(RootNamespace).$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.').TrimEnd('.'))</StronglyTypedNamespace> | ||
<StronglyTypedClassName>%(Filename)</StronglyTypedClassName> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.