From 7dc69fe1b2450f71407db00998d6eb79e1f93829 Mon Sep 17 00:00:00 2001 From: dawe Date: Thu, 24 Aug 2023 09:25:46 +0200 Subject: [PATCH 1/3] silence warnings during compilation --- .../files/AttributesTestLib/Attributes.fs | 12 ++++++------ .../FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs b/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs index 3b29d88be..624f56e31 100644 --- a/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs +++ b/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs @@ -9,19 +9,19 @@ type TestAttribute(?int: int, ?string: string, ?array: string array) = member val Int = defaultArg int 0 with get, set member val Array = defaultArg array [||] with get, set -type IntTestAttribute(int: int) = +type IntTestAttribute(_int: int) = inherit Attribute() -type BoolTestAttribute(bool: bool) = +type BoolTestAttribute(_bool: bool) = inherit Attribute() -type StringTestAttribute(string: string) = +type StringTestAttribute(_string: string) = inherit Attribute() -type ArrayTestAttribute(array: string array) = +type ArrayTestAttribute(_array: string array) = inherit Attribute() -type MultipleTestAttribute(string: string, int: int, array: int array) = +type MultipleTestAttribute(_string: string, _int: int, _array: int array) = inherit Attribute() [] @@ -50,7 +50,7 @@ type AttributeInterface = [] type AttributeClass() = [] - new(i: int) = AttributeClass() + new(_i: int) = AttributeClass() [] member _.TestMember = 1 diff --git a/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs b/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs index d74a147ae..9946ca97f 100644 --- a/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs +++ b/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs @@ -67,7 +67,7 @@ type Test_Issue287() = /// Function Foo! abstract member Foo: int -> unit /// Empty function for signature - default x.Foo a = () + default x.Foo _a = () [] module Test_Issue472_R = @@ -88,11 +88,11 @@ module Test_Issue472 = type Test_Issue472_T() = /// Function MultPartial! - member x.MultPartial (arg1: int) (arg2: int) = () + member x.MultPartial (_arg1: int) (_arg2: int) = () /// Function MultArg! - member x.MultArg(arg1: int, arg2: int) = () + member x.MultArg(_arg1: int, _arg2: int) = () /// Function MultArgTupled! - member x.MultArgTupled(arg: (int * int)) = () + member x.MultArgTupled(_arg: (int * int)) = () (* type ITestInterface = @@ -117,16 +117,16 @@ module Test_Issue201Extensions = /// [omit] type Test_Omit() = /// This Should not be displayed - member x.Foo a = () + member x.Foo _a = () /// Test ` ` test type Test_Empty_Code_Block() = - let empty = () + let _empty = () module ``Space-Missing`` = /// Implicit cast operator test - type ``Implicit-Cast``(value: int) = + type ``Implicit-Cast``(_value: int) = class end From 943537f1c0abe2c14ed98291445f7c1f8e924a1d Mon Sep 17 00:00:00 2001 From: dawe Date: Thu, 24 Aug 2023 19:03:09 +0200 Subject: [PATCH 2/3] Revert "silence warnings during compilation" This reverts commit 7dc69fe1b2450f71407db00998d6eb79e1f93829. --- .../files/AttributesTestLib/Attributes.fs | 12 ++++++------ .../FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs b/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs index 624f56e31..3b29d88be 100644 --- a/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs +++ b/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs @@ -9,19 +9,19 @@ type TestAttribute(?int: int, ?string: string, ?array: string array) = member val Int = defaultArg int 0 with get, set member val Array = defaultArg array [||] with get, set -type IntTestAttribute(_int: int) = +type IntTestAttribute(int: int) = inherit Attribute() -type BoolTestAttribute(_bool: bool) = +type BoolTestAttribute(bool: bool) = inherit Attribute() -type StringTestAttribute(_string: string) = +type StringTestAttribute(string: string) = inherit Attribute() -type ArrayTestAttribute(_array: string array) = +type ArrayTestAttribute(array: string array) = inherit Attribute() -type MultipleTestAttribute(_string: string, _int: int, _array: int array) = +type MultipleTestAttribute(string: string, int: int, array: int array) = inherit Attribute() [] @@ -50,7 +50,7 @@ type AttributeInterface = [] type AttributeClass() = [] - new(_i: int) = AttributeClass() + new(i: int) = AttributeClass() [] member _.TestMember = 1 diff --git a/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs b/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs index 9946ca97f..d74a147ae 100644 --- a/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs +++ b/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs @@ -67,7 +67,7 @@ type Test_Issue287() = /// Function Foo! abstract member Foo: int -> unit /// Empty function for signature - default x.Foo _a = () + default x.Foo a = () [] module Test_Issue472_R = @@ -88,11 +88,11 @@ module Test_Issue472 = type Test_Issue472_T() = /// Function MultPartial! - member x.MultPartial (_arg1: int) (_arg2: int) = () + member x.MultPartial (arg1: int) (arg2: int) = () /// Function MultArg! - member x.MultArg(_arg1: int, _arg2: int) = () + member x.MultArg(arg1: int, arg2: int) = () /// Function MultArgTupled! - member x.MultArgTupled(_arg: (int * int)) = () + member x.MultArgTupled(arg: (int * int)) = () (* type ITestInterface = @@ -117,16 +117,16 @@ module Test_Issue201Extensions = /// [omit] type Test_Omit() = /// This Should not be displayed - member x.Foo _a = () + member x.Foo a = () /// Test ` ` test type Test_Empty_Code_Block() = - let _empty = () + let empty = () module ``Space-Missing`` = /// Implicit cast operator test - type ``Implicit-Cast``(_value: int) = + type ``Implicit-Cast``(value: int) = class end From ad01a2eff5ddaad050941ec95e7ba108a9347237 Mon Sep 17 00:00:00 2001 From: dawe Date: Thu, 24 Aug 2023 19:05:05 +0200 Subject: [PATCH 3/3] add NoWarn to test projects to silence warnings about unused values --- .../files/AttributesTestLib/AttributesTestLib.fsproj | 1 + tests/FSharp.ApiDocs.Tests/files/FsLib2/FsLib2.fsproj | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/AttributesTestLib.fsproj b/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/AttributesTestLib.fsproj index 985c73ba6..c2c78bec1 100644 --- a/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/AttributesTestLib.fsproj +++ b/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/AttributesTestLib.fsproj @@ -3,6 +3,7 @@ netstandard2.1 ..\bin\$(Configuration) + FS1182 diff --git a/tests/FSharp.ApiDocs.Tests/files/FsLib2/FsLib2.fsproj b/tests/FSharp.ApiDocs.Tests/files/FsLib2/FsLib2.fsproj index 54538c069..c675160ae 100644 --- a/tests/FSharp.ApiDocs.Tests/files/FsLib2/FsLib2.fsproj +++ b/tests/FSharp.ApiDocs.Tests/files/FsLib2/FsLib2.fsproj @@ -3,6 +3,7 @@ netstandard2.1 ..\bin\$(Configuration) + FS1182