Skip to content

Commit 34005bb

Browse files
author
Ruben Schmidmeister
authored
Merge pull request #54 from messerli-informatik-ag/fsharp-fix
Only enable nullability warnings as errors in C#
2 parents d607b42 + 8b06cda commit 34005bb

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

CodeStyle.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ EndProjectSection
1919
EndProject
2020
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sandbox", "Sandbox\Sandbox.csproj", "{507A6B2B-4AED-4071-AA38-6EDAF39FDC13}"
2121
EndProject
22+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Sandbox.Fsharp", "Sandbox.Fsharp\Sandbox.Fsharp.fsproj", "{971C7344-5A4B-4A76-BFE0-E7611F5FA159}"
23+
EndProject
2224
Global
2325
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2426
Debug|Any CPU = Debug|Any CPU
@@ -56,5 +58,17 @@ Global
5658
{507A6B2B-4AED-4071-AA38-6EDAF39FDC13}.Release|x64.Build.0 = Release|Any CPU
5759
{507A6B2B-4AED-4071-AA38-6EDAF39FDC13}.Release|x86.ActiveCfg = Release|Any CPU
5860
{507A6B2B-4AED-4071-AA38-6EDAF39FDC13}.Release|x86.Build.0 = Release|Any CPU
61+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
62+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Debug|Any CPU.Build.0 = Debug|Any CPU
63+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Debug|x64.ActiveCfg = Debug|Any CPU
64+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Debug|x64.Build.0 = Debug|Any CPU
65+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Debug|x86.ActiveCfg = Debug|Any CPU
66+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Debug|x86.Build.0 = Debug|Any CPU
67+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Release|Any CPU.ActiveCfg = Release|Any CPU
68+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Release|Any CPU.Build.0 = Release|Any CPU
69+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Release|x64.ActiveCfg = Release|Any CPU
70+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Release|x64.Build.0 = Release|Any CPU
71+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Release|x86.ActiveCfg = Release|Any CPU
72+
{971C7344-5A4B-4A76-BFE0-E7611F5FA159}.Release|x86.Build.0 = Release|Any CPU
5973
EndGlobalSection
6074
EndGlobal

CodeStyle/build/Messerli.CodeStyle.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Default.ruleset</CodeAnalysisRuleSet>
5-
<WarningsAsErrors>$(WarningsAsErrors);nullable</WarningsAsErrors>
5+
<WarningsAsErrors Condition="'$(MSBuildProjectExtension)' == '.csproj'">$(WarningsAsErrors);nullable</WarningsAsErrors>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile><!-- This is needed so that analyzers can inspect XML comments. Enforced by SA0001. -->
77
</PropertyGroup>
88
<ItemGroup>

Sandbox.Fsharp/Library.fs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
namespace Sandbox.Fsharp
2+
3+
module Say =
4+
let hello name =
5+
printfn "Hello %s" name

Sandbox.Fsharp/Sandbox.Fsharp.fsproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net5.0</TargetFramework>
5+
<IsPackable>false</IsPackable>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<Compile Include="Library.fs"/>
10+
</ItemGroup>
11+
12+
</Project>

0 commit comments

Comments
 (0)