Proj0304: Package source mappings should be unique
The first package source mapping that matches serves the package. Therefor, a second mapping with the same pattern will never match, and is therefore considered a mistake.
Non-compliant
<configuration>
<packageSources>
<clear />
<add key="Internal-packages" value="https://pkgs.dev.azure.com/company/_packaging/Components/nuget/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="Internal-packages">
<package pattern="Qowaiv.CodeGeneration" />
<package pattern="Company.*" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="Qowaiv.CodeGeneration" />
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
Compliant
<configuration>
<packageSources>
<clear />
<add key="Internal-packages" value="https://pkgs.dev.azure.com/company/_packaging/Components/nuget/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="Internal-packages">
<package pattern="Qowaiv.CodeGeneration" />
<package pattern="Company.*" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>