-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# devlooped/oss - SponsorLink-enabled analyzers need copylocal devlooped/oss@7593657 - Add our implementation of JWT manifest reading and reporting devlooped/oss@a0ae727 - Whitespace and formatting devlooped/oss@d74f511 - Rename sample assemblies for nicer display devlooped/oss@93df7c7 - Dynamically fetch devlooped JWK from github devlooped/oss@55124bc - Minor code simplification devlooped/oss@cf154d5 - Remove dependency on ThisAssembly devlooped/oss@c879f25 - Add nullable and generated code annotations devlooped/oss@b2a11fa - Fix path to jwk.ps1 alongside the SponsorLink.targets devlooped/oss@c4830fc - Improve versioning of sample package devlooped/oss@3b943f5 - Fix scenario where multiple packages share product name devlooped/oss@23f83bd - Minimal docs on consuming devlooped/oss@827a1d1 - Add targets for inclusion from tests devlooped/oss@81ba912 - Simplify and unify manifest reading implementation devlooped/oss@4fca946 - Update to checkout@v4 devlooped/oss@5fb1723 - Update dotnet-file.yml with fix to create pull request action devlooped/oss@11a331d - Don't add random wait on manual dotnet-file runs devlooped/oss@7afe350 - Add static usings to allow unprefixed ThrowXxxx devlooped/oss@6dfe21f - Add compatibility for non-SDK projects without InitializeSourceControlInformation target devlooped/oss@6e96c59 - Set Version from VersionLabel if it's a refs/tags/ devlooped/oss@57653a2 - Cleanup build and publish to use VersionLabel devlooped/oss@14deaea - Bump create-pr dependency to avoid error with existing PRs devlooped/oss@11a8757 - Only commit markdown files when resolving includes devlooped/oss@2c10a83
- Loading branch information
1 parent
311904c
commit a92b84d
Showing
46 changed files
with
2,654 additions
and
49 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
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,37 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<AssemblyName>SponsorableLib.Analyzers</AssemblyName> | ||
<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> | ||
|
||
<ItemGroup> | ||
<Compile Remove="C:\Code\devlooped.oss\src\SponsorLink\SponsorLink\ThisAssembly.cs" /> | ||
</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,25 @@ | ||
using System.Collections.Immutable; | ||
using Devlooped.Sponsors; | ||
using Microsoft.CodeAnalysis; | ||
using Microsoft.CodeAnalysis.Diagnostics; | ||
using static Devlooped.Sponsors.SponsorLink; | ||
|
||
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,47 @@ | ||
<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 --> | ||
<Epoc>$([System.DateTime]::Parse("2024-03-15"))</Epoc> | ||
<TotalDays>$([System.DateTime]::UtcNow.Subtract($(Epoc)).TotalDays)</TotalDays> | ||
<Days>$([System.Math]::Truncate($(TotalDays)))</Days> | ||
<Seconds>$([System.Math]::Floor($([MSBuild]::Divide($([System.DateTime]::UtcNow.TimeOfDay.TotalSeconds), 10))))</Seconds> | ||
<Version>42.$(Days).$(Seconds)</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,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<AssemblyName>SponsorableLib</AssemblyName> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<PackNone>true</PackNone> | ||
<PackageId>SponsorableLib</PackageId> | ||
<Description>Sample library incorporating SponsorLink checks</Description> | ||
<PackOnBuild>true</PackOnBuild> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="NuGetizer" Version="1.2.2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Analyzer\Analyzer.csproj" ReferenceOutputAssembly="false" OutputType="Analyzer" /> | ||
</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,5 @@ | ||
namespace SponsorableLib; | ||
|
||
public class MyClass | ||
{ | ||
} |
Oops, something went wrong.