no-floating-package-version
What it does
Section titled “What it does”Reports a PackageReference or PackageVersion whose Version contains * (1.*), on the attribute. No fix, because the version to pin is a decision.
Why it matters
Section titled “Why it matters”A floating version restores whatever is the newest match on the day of the build. Two builds of the same commit can use different packages, a new release can break the build without a change in the repository, and a compromised release arrives without anyone reading it.
To fix, pin the version (1.2.3), and update it on purpose.
Example
Section titled “Example”<Project> <ItemGroup> <PackageReference Include="A" Version="1.0.0" /> <PackageReference Include="B" Version="1.*" /> <PackageVersion Include="C" Version="*" ></PackageVersion> <Other Include="D" Version="1.*" /> </ItemGroup></Project>Configuration
Section titled “Configuration”xml: lint: rules: no-floating-package-version: warn # off (default), warn, errorSuppress one line with sudsy-disable-next-line no-floating-package-version in a comment of the file’s language.