<Project>
  <!-- Sets defaults for all projects in the repo -->

  <PropertyGroup>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <PropertyGroup>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <WarningsNotAsErrors>NU1902;NU1903</WarningsNotAsErrors>
    <!-- Suppress IDE0065 globally for all projects -->
    <NoWarn>$(NoWarn);IDE0065</NoWarn>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <AnalysisMode>AllEnabledByDefault</AnalysisMode>
    <!-- Don't enforce code style rules as build errors in Debug -->
    <EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
  </PropertyGroup>

  <ItemGroup>
    <AdditionalFiles Include="$(MSBuildThisFileDirectory)/BannedSymbols.txt" />
    <AdditionalFiles Include="$(MSBuildThisFileDirectory)/stylecop.json" />
  </ItemGroup>

  <!-- Custom Analyzers -->
  <ItemGroup Condition=" '$(MSBuildProjectName)' != 'Jellyfin.CodeAnalysis' AND '$(Configuration)' == 'Debug' ">
    <ProjectReference Include="$(MSBuildThisFileDirectory)src/Jellyfin.CodeAnalysis/Jellyfin.CodeAnalysis.csproj" OutputItemType="Analyzer" />
  </ItemGroup>

</Project>
