ionide / FSharp.Analyzers.SDK

Library for building custom analyzers for F# / FSAC

Home Page:http://ionide.io/FSharp.Analyzers.SDK/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please add License to fsharp-analyzers dotnet tool publication

DamianAtWork opened this issue · comments

I work in an environment where .NET packages and tools go through an internal package manager and doesn't allow us to use nuget.org directly (not uncommon). Our policies block unlicensed packages and the scanning for licenses is automated.

Would it be possibly to include the license information with fsharp-analyzers? The currently published packages don't include licensing info.

The current NuGet package (published in January 2022) contains a standard MIT license, using PackageLicenseExpression as per the official recommendations. I assume this issue can be closed.

Nermind, I didn't read carefully enough. It seems this issue pertains to the fsharp-analyzers package. It does not currently have a license.

It looks to me like none of the current nuget packages are showing a license on the nuget.org listing?

/wonders if the condition at https://github.com/ionide/FSharp.Analyzers.SDK/blob/ae263a59ef5b453789ba191cac0105ffedfa7b65/Directory.Build.props#L28C3-L28C3 might be getting resolved before 'IsPackable' is set to true in the projects?

Yes, that's exactly correct - D.B.props happens very early in the ordering of building a project:

  • D.B.props
  • Props from the SDK(s) you've imported (From the Sdk="..." at the top of the project file)
  • the project file itself
  • Targets from the SDK(s) you've imported
  • D.B.targets

Generally if you have any logic (not just static values) I'd suggest that you use a Directory.Build.targets for that instead - it tends to behave most like users expect MSBuild logic to behave.

Is there a need for PackageLicenseExpression to be conditioned in any case? (I didn't think it'd do anything for projects that aren't packaged anyway)
(Same with PackageTags)

This should be fixed in the 0.22.0 release

commented

Yep, @Numpsy is correct. It seems to be fixed now.