Skip to content

Commit

Permalink
Turn XML doc and Sig<->Impl mismatch warnings on by default (dotnet#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermp authored and nosami committed Feb 22, 2021
1 parent 38b2f23 commit 72374ca
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/fsharp/CompilerDiagnostics.fs
Expand Up @@ -374,9 +374,7 @@ let warningOn err level specificWarnOn =
// Some specific warnings are never on by default, i.e. unused variable warnings
match n with
| 1182 -> false // chkUnusedValue - off by default
| 3218 -> false // ArgumentsInSigAndImplMismatch - off by default
| 3180 -> false // abImplicitHeapAllocation - off by default
| 3390 -> false // xmlDocBadlyFormed - off by default
| _ -> level >= GetWarningLevel err

let SplitRelatedDiagnostics(err: PhasedDiagnostic) : PhasedDiagnostic * PhasedDiagnostic list =
Expand Down
Expand Up @@ -242,14 +242,14 @@ type FSharpDependencyManager (outputDir:string option) =
sprintf """ #r "nuget:FSharp.Data";; // %s 'FSharp.Data' %s""" (SR.loadNugetPackage()) (SR.highestVersion())
|]

member this.ResolveDependencies(scriptExt: string, packageManagerTextLines: (string * string) seq, targetFramework: string, runtimeIdentifier: string) : obj =
member this.ResolveDependencies(scriptExt: string, packageManagerTextLines: (string * string) seq, targetFrameworkMoniker: string, runtimeIdentifier: string) : obj =
let poundRprefix =
match scriptExt with
| ".csx" -> "#r \""
| _ -> "#r @\""

let generateAndBuildProjectArtifacts =
let resolutionResult = prepareDependencyResolutionFiles (scriptExt, packageManagerTextLines, targetFramework, runtimeIdentifier)
let resolutionResult = prepareDependencyResolutionFiles (scriptExt, packageManagerTextLines, targetFrameworkMoniker, runtimeIdentifier)
match resolutionResult.resolutionsFile with
| Some file ->
let resolutions = getResolutionsFromFile file
Expand Down
3 changes: 2 additions & 1 deletion tests/service/data/TestTP/ProvidedTypes.fsi
Expand Up @@ -412,7 +412,8 @@ type ProvidedAssembly =
/// and adjust the 'Assembly' property of all provided type definitions to return that
/// assembly.
/// </summary>
/// <param name="enclosingTypeNames">A path of type names to wrap the generated types. The generated types are then generated as nested types.</param>
/// <param name="types">A list of nested ProvidedTypeDefinitions to add to the ProvidedAssembly.</param>
/// <param name="enclosingGeneratedTypeNames">A path of type names to wrap the generated types. The generated types are then generated as nested types.</param>
member AddNestedTypes : types : ProvidedTypeDefinition list * enclosingGeneratedTypeNames: string list -> unit

#if FX_NO_LOCAL_FILESYSTEM
Expand Down
1 change: 1 addition & 0 deletions tests/service/data/TestTP/TestTP.fsproj
Expand Up @@ -5,6 +5,7 @@
<TargetFramework>net472</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<UnitTestType>nunit</UnitTestType>
<OtherFlags>--nowarn:3390 --nowarn:3218</OtherFlags>
</PropertyGroup>

<ItemGroup>
Expand Down
Expand Up @@ -5,6 +5,7 @@
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<OtherFlags>--nowarn:3390 --nowarn:3218</OtherFlags>
</PropertyGroup>

<ItemGroup>
Expand Down
Expand Up @@ -427,7 +427,8 @@ type ProvidedAssembly =
/// and adjust the 'Assembly' property of all provided type definitions to return that
/// assembly.
/// </summary>
/// <param name="enclosingTypeNames">A path of type names to wrap the generated types. The generated types are then generated as nested types.</param>
/// <param name="types">A list of nested ProvidedTypeDefinitions to add to the ProvidedAssembly.</param>
/// <param name="enclosingGeneratedTypeNames">A path of type names to wrap the generated types. The generated types are then generated as nested types.</param>
member AddNestedTypes : types : ProvidedTypeDefinition list * enclosingGeneratedTypeNames: string list -> unit

#if FX_NO_LOCAL_FILESYSTEM
Expand Down

0 comments on commit 72374ca

Please sign in to comment.