Skip to content

Commit

Permalink
Merge pull request #30 from milbrandt/netSdkProjectFormat
Browse files Browse the repository at this point in the history
Update to net472 and net.sdk
  • Loading branch information
milbrandt authored Jun 30, 2019
2 parents 006fd6a + c8db981 commit 54546e6
Show file tree
Hide file tree
Showing 60 changed files with 690 additions and 1,345 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ packages/
/FsSonarRunner/.clang-tidy
/FsSonarRunner/compile_commands.json
**/.vs/**
**/.vscode/**
50 changes: 25 additions & 25 deletions FsSonarRunner/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
###############################
# Core EditorConfig Options #
###############################
# All files
[*]
indent_style = space
# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = true
charset = utf-8-bom
###############################
# .NET Coding Conventions #
###############################
[*.{cs,vb}]
# Organize usings
dotnet_sort_system_directives_first = true
# this. preferences
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent
###############################
# Core EditorConfig Options #
###############################
# All files
[*]
indent_style = space
# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = true
charset = utf-8-bom
###############################
# .NET Coding Conventions #
###############################
[*.{cs,vb}]
# Organize usings
dotnet_sort_system_directives_first = true
# this. preferences
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent
9 changes: 9 additions & 0 deletions FsSonarRunner/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<Copyright>Copyright © 2015, 2019</Copyright>
<Product>Sonar F# Plugin</Product>
<Description>The plugin enables analysis of F# within SonarQube.</Description>
<Version>0.0.0.1</Version>
<Company>jmecsoftware</Company>
</PropertyGroup>
</Project>
21 changes: 14 additions & 7 deletions FsSonarRunner/FsSonarRunner.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsSonarRunner", "FsSonarRunner\FsSonarRunner.fsproj", "{504F4169-B41D-431F-B31E-E72E0FE2495C}"
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F371E939-13DA-493F-8FD5-BDBD343FF4EB}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsSonarRunnerCore", "FsSonarRunnerCore\FsSonarRunnerCore.fsproj", "{584F069C-DB4C-4561-9402-5B9B703F15A8}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsSonarRunner", "FsSonarRunner\FsSonarRunner.fsproj", "{504F4169-B41D-431F-B31E-E72E0FE2495C}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsSonarRunnerCore.Test", "FsSonarRunnerCore.Test\FsSonarRunnerCore.Test.fsproj", "{97E76AE8-D602-400E-8F4B-0F82204C6A84}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsSonarRunnerCore", "FsSonarRunnerCore\FsSonarRunnerCore.fsproj", "{584F069C-DB4C-4561-9402-5B9B703F15A8}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsSonarRunnerCore.Test", "FsSonarRunnerCore.Test\FsSonarRunnerCore.Test.fsproj", "{97E76AE8-D602-400E-8F4B-0F82204C6A84}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -32,6 +39,6 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {729302B8-D2E6-48F9-8B0F-6AB5E8700AA3}
SolutionGuid = {A2DB7BED-E2B7-4A83-BCFF-5B0388F4C2D9}
EndGlobalSection
EndGlobal
18 changes: 0 additions & 18 deletions FsSonarRunner/FsSonarRunner/App.config

This file was deleted.

40 changes: 0 additions & 40 deletions FsSonarRunner/FsSonarRunner/AssemblyInfo.fs

This file was deleted.

135 changes: 20 additions & 115 deletions FsSonarRunner/FsSonarRunner/FsSonarRunner.fsproj
Original file line number Diff line number Diff line change
@@ -1,124 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>504f4169-b41d-431f-b31e-e72e0fe2495c</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>FsSonarRunner</RootNamespace>
<AssemblyName>FsSonarRunner</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<Name>FsSonarRunner</Name>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Debug\FsSonarRunner.XML</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
<StartArguments>/f E:\Development\SonarQube\dotnet\sonar-fsharp\FsSonarRunner\FsSonarRunnerCore\FsLintRunner.fs</StartArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Release\FsSonarRunner.XML</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
<TargetFramework>net472</TargetFramework>
<ProjectGuid>504f4169-b41d-431f-b31e-e72e0fe2495c</ProjectGuid>
<RunPostBuildEvent>1</RunPostBuildEvent>
</PropertyGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '11.0'">
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Import Project="$(FSharpTargetsPath)" />

<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="XmlHelper.fs" />
<Compile Include="Program.fs" />
<None Include="App.config" />
<Content Include="packages.config" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FSharp.Data" Version="3.1.1" />
<PackageReference Include="FSharpLint.Core" Version="0.12.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FsSonarRunnerCore\FsSonarRunnerCore.fsproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="FParsec">
<HintPath>..\packages\FParsec.1.0.2\lib\net40-client\FParsec.dll</HintPath>
</Reference>
<Reference Include="FParsecCS">
<HintPath>..\packages\FParsec.1.0.2\lib\net40-client\FParsecCS.dll</HintPath>
</Reference>
<Reference Include="FSharp.Compiler.Service">
<HintPath>..\packages\FSharp.Compiler.Service.13.0.0\lib\net45\FSharp.Compiler.Service.dll</HintPath>
</Reference>
<Reference Include="FSharp.Compiler.Service.ProjectCracker">
<HintPath>..\packages\FSharp.Compiler.Service.ProjectCracker.13.0.0\lib\net45\FSharp.Compiler.Service.ProjectCracker.dll</HintPath>
</Reference>
<Reference Include="FSharp.Data">
<HintPath>..\packages\FSharp.Data.2.3.3\lib\net40\FSharp.Data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharpLint.Core">
<HintPath>..\packages\FSharpLint.Core.0.7.6\lib\net45\FSharpLint.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Framework">
<Private>True</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.3.7.1\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable">
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Reflection.Metadata">
<HintPath>..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<ProjectReference Include="..\FsSonarRunnerCore\FsSonarRunnerCore.fsproj">
<Name>FsSonarRunnerCore</Name>
<Project>{584f069c-db4c-4561-9402-5b9b703f15a8}</Project>
<Private>True</Private>
</ProjectReference>
<PackageReference Update="FSharp.Core" Version="4.6.2" />
<PackageReference Update="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
<Import Project="..\packages\FSharp.Compiler.Service.ProjectCracker.13.0.0\build\net45\FSharp.Compiler.Service.ProjectCracker.targets" Condition="Exists('..\packages\FSharp.Compiler.Service.ProjectCracker.13.0.0\build\net45\FSharp.Compiler.Service.ProjectCracker.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\FSharp.Compiler.Service.ProjectCracker.13.0.0\build\net45\FSharp.Compiler.Service.ProjectCracker.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\FSharp.Compiler.Service.ProjectCracker.13.0.0\build\net45\FSharp.Compiler.Service.ProjectCracker.targets'))" />
</Target>
</Project>

</Project>
2 changes: 1 addition & 1 deletion FsSonarRunner/FsSonarRunner/XmlHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type InputXml = XmlProvider<"""
// parse command using regex
// if matched, return (command name, command value) as a tuple
let (|Command|_|) (s:string) =
let r = new Regex(@"^(?:-{1,2}|\/)(?<command>\w+)[=:]*(?<value>.*)$",RegexOptions.IgnoreCase)
let r = Regex(@"^(?:-{1,2}|\/)(?<command>\w+)[=:]*(?<value>.*)$", RegexOptions.IgnoreCase)
let m = r.Match(s)
if m.Success then
Some(m.Groups.["command"].Value.ToLower(), m.Groups.["value"].Value)
Expand Down
10 changes: 0 additions & 10 deletions FsSonarRunner/FsSonarRunner/packages.config

This file was deleted.

40 changes: 0 additions & 40 deletions FsSonarRunner/FsSonarRunnerCore.Test/AssemblyInfo.fs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ type DuptokenTest() =
Assert.That(duptokens.[1].Line, Is.EqualTo(3))
Assert.That(duptokens.[1].Content, Is.EqualTo("hello"))
Assert.That(duptokens.[6].Line, Is.EqualTo(4))
Assert.That(duptokens.[6].Content, Is.EqualTo("\"\""))
Assert.That(duptokens.[6].Content, Is.EqualTo("\"\""))
Loading

0 comments on commit 54546e6

Please sign in to comment.