From cc706c4e074f618e63ae19d4f94c746eac8b4e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sat, 10 Jun 2017 15:59:41 +0200 Subject: [PATCH 1/5] SonarQube migration --- build.fsx | 3 +- src/Fake-netcore.sln | 15 +++ .../Fake.Testing.SonarQube/AssemblyInfo.fs | 17 +++ .../Fake.Testing.SonarQube.fsproj | 41 +++++++ src/app/Fake.Testing.SonarQube/SonarQube.fs | 111 ++++++++++++++++++ .../Fake.Testing.SonarQube/paket.references | 4 + src/app/FakeLib/FakeLib.fsproj | 3 + src/app/FakeLib/SonarQubeHelper.fs | 7 ++ 8 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 src/app/Fake.Testing.SonarQube/AssemblyInfo.fs create mode 100644 src/app/Fake.Testing.SonarQube/Fake.Testing.SonarQube.fsproj create mode 100644 src/app/Fake.Testing.SonarQube/SonarQube.fs create mode 100644 src/app/Fake.Testing.SonarQube/paket.references diff --git a/build.fsx b/build.fsx index 13f534735fc..a69b936a464 100644 --- a/build.fsx +++ b/build.fsx @@ -202,7 +202,8 @@ let dotnetAssemblyInfos = "Fake.Tools.Git", "Running git commands" "Fake.Testing.Common", "Common testing data types" "Fake.Tracing.NAntXml", "NAntXml" - "Fake.Windows.Chocolatey", "Running and packaging with Chocolatey" ] + "Fake.Windows.Chocolatey", "Running and packaging with Chocolatey" + "Fake.Testing.SonarQube", "Analizing your project with SOnarQube" ] let assemblyInfos = [ "./src/app/FAKE/AssemblyInfo.fs", diff --git a/src/Fake-netcore.sln b/src/Fake-netcore.sln index f99043c8f8c..174cd207fa2 100644 --- a/src/Fake-netcore.sln +++ b/src/Fake-netcore.sln @@ -61,6 +61,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.DotNet.Paket", "app\Fa EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.netcore", "app\Fake.netcore\Fake.netcore.fsproj", "{6B339DA3-8DED-4262-A427-3C4CCDD00650}" EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.Testing.SonarQube", "app\Fake.Testing.SonarQube\Fake.Testing.SonarQube.fsproj", "{2A985028-4410-40F7-992C-5397DC1ED116}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -410,6 +412,18 @@ Global {CDFB2B10-050A-4188-8F72-2BCC61E9814F}.Release|x64.Build.0 = Release|x64 {CDFB2B10-050A-4188-8F72-2BCC61E9814F}.Release|x86.ActiveCfg = Release|x86 {CDFB2B10-050A-4188-8F72-2BCC61E9814F}.Release|x86.Build.0 = Release|x86 + {2A985028-4410-40F7-992C-5397DC1ED116}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A985028-4410-40F7-992C-5397DC1ED116}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A985028-4410-40F7-992C-5397DC1ED116}.Debug|x64.ActiveCfg = Debug|x64 + {2A985028-4410-40F7-992C-5397DC1ED116}.Debug|x64.Build.0 = Debug|x64 + {2A985028-4410-40F7-992C-5397DC1ED116}.Debug|x86.ActiveCfg = Debug|x86 + {2A985028-4410-40F7-992C-5397DC1ED116}.Debug|x86.Build.0 = Debug|x86 + {2A985028-4410-40F7-992C-5397DC1ED116}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A985028-4410-40F7-992C-5397DC1ED116}.Release|Any CPU.Build.0 = Release|Any CPU + {2A985028-4410-40F7-992C-5397DC1ED116}.Release|x64.ActiveCfg = Release|x64 + {2A985028-4410-40F7-992C-5397DC1ED116}.Release|x64.Build.0 = Release|x64 + {2A985028-4410-40F7-992C-5397DC1ED116}.Release|x86.ActiveCfg = Release|x86 + {2A985028-4410-40F7-992C-5397DC1ED116}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(NestedProjects) = preSolution {E2CF8635-E7C4-4470-92DD-F706F052BF7B} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} @@ -440,5 +454,6 @@ Global {E32B2631-476A-4C2D-AE18-275ED7A22F10} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {80314941-78D5-4928-B943-93FC945E050F} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {CDFB2B10-050A-4188-8F72-2BCC61E9814F} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} + {2A985028-4410-40F7-992C-5397DC1ED116} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} EndGlobalSection EndGlobal diff --git a/src/app/Fake.Testing.SonarQube/AssemblyInfo.fs b/src/app/Fake.Testing.SonarQube/AssemblyInfo.fs new file mode 100644 index 00000000000..26fa39bb774 --- /dev/null +++ b/src/app/Fake.Testing.SonarQube/AssemblyInfo.fs @@ -0,0 +1,17 @@ +// Auto-Generated by FAKE; do not edit +namespace System +open System.Reflection + +[] +[] +[] +[] +[] +do () + +module internal AssemblyVersionInformation = + let [] AssemblyTitle = "FAKE - F# Make Analizing your project with SOnarQube" + let [] AssemblyProduct = "FAKE - F# Make" + let [] AssemblyVersion = "5.0.0" + let [] AssemblyInformationalVersion = "5.0.0" + let [] AssemblyFileVersion = "5.0.0" diff --git a/src/app/Fake.Testing.SonarQube/Fake.Testing.SonarQube.fsproj b/src/app/Fake.Testing.SonarQube/Fake.Testing.SonarQube.fsproj new file mode 100644 index 00000000000..89fb9d73154 --- /dev/null +++ b/src/app/Fake.Testing.SonarQube/Fake.Testing.SonarQube.fsproj @@ -0,0 +1,41 @@ + + + 1.0.0-alpha-10 + netstandard1.6 + $(DefineConstants);NO_DOTNETCORE_BOOTSTRAP + pdbonly + true + Fake.Testing.SonarQube + Library + $(PackageTargetFallback);portable-net45+win8;dnxcore50 + + + $(DefineConstants);NETSTANDARD;USE_HTTPCLIENT + + + $(DefineConstants);RELEASE + + + + + + + + + + + + + + + + true + + + + + 1.0.0-preview2-020000 + + + + diff --git a/src/app/Fake.Testing.SonarQube/SonarQube.fs b/src/app/Fake.Testing.SonarQube/SonarQube.fs new file mode 100644 index 00000000000..9fc8f2424b8 --- /dev/null +++ b/src/app/Fake.Testing.SonarQube/SonarQube.fs @@ -0,0 +1,111 @@ +/// Contains a task to run the msbuild runner of [SonarQube analyzer](http://sonarqube.org). +module Fake.Testing.SonarQube + + open System + open System.Collections.Generic + open System.Diagnostics + open System.Text; + open System.IO + open System.Xml.Linq + open Fake.Core.Tracing + open Fake.DotNet.NuGet.NuGet + open Fake.Core + open Fake.Core.Environment + open Fake.Core.String + open Fake.Core.Process + open Fake.IO.FileSystem + open Fake.IO.FileSystem.Operators + + /// [omit] + /// The supported commands of SonarQube. It is called with Begin before compilation, and End after compilation. + type private SonarQubeCall = Begin | End + + /// Parameter type to configure the SonarQube runner. + type SonarQubeParams = { + /// FileName of the SonarQube runner exe. + ToolsPath : string + /// Key to identify the SonarQube project + Key : string + /// Name of the project + Name : string + /// Version number of the project + Version : string + /// Individual global settings for SonarQube + Settings : List + /// Read settings from configuration file + Config : string option + } + + /// SonarQube default parameters - tries to locate MSBuild.SonarQube.exe in any subfolder. + let SonarQubeDefaults = + { ToolsPath = findToolInSubPath "MSBuild.SonarQube.Runner.exe" (currentDirectory @@ "tools" @@ "SonarQube") + Key = null + Name = null + Version = "1.0" + Settings = [] + Config = None } + + /// [omit] + /// Execute the external msbuild runner of SonarQube. Parameters are given to the command line tool as required. + let private SonarQubeCall (call: SonarQubeCall) (parameters : SonarQubeParams) = + let sonarPath = parameters.ToolsPath + let setArgs = parameters.Settings |> List.fold (fun acc x -> acc + "/d:" + x + " ") "" + + let cfgArgs = + match parameters.Config with + | Some(x) -> (" /s:"+x) + | None -> "" + + let args = + match call with + | Begin -> "begin /k:\"" + parameters.Key + "\" /n:\"" + parameters.Name + "\" /v:\"" + parameters.Version + "\" " + setArgs + cfgArgs + | End -> "end " + setArgs + cfgArgs + + let result = + ExecProcess (fun info -> + info.FileName <- sonarPath + info.Arguments <- args) System.TimeSpan.MaxValue + if result <> 0 then failwithf "Error during sonar qube call %s" (call.ToString()) + + /// This task to can be used to run the begin command of [Sonar Qube](http://sonarqube.org/) on a project. + /// ## Parameters + /// + /// - `setParams` - Function used to overwrite the SonarQube default parameters. + /// + /// ## Sample + + /// Begin (fun p -> + /// {p with + /// Key = "MyProject" + /// Name = "MainTool" + /// Version = "1.0 }) + /// + let Begin setParams = + use __ = Trace.traceStartTaskUsing "SonarQube Begin" + let parameters = setParams SonarQubeDefaults + SonarQubeCall Begin parameters + + /// This task to can be used to run the end command of [Sonar Qube](http://sonarqube.org/) on a project. + /// ## Parameters + /// + /// - `setParams` - Function used to overwrite the SonarQube default parameters. + /// + /// ## Sample + + /// End (fun p -> + /// {p with + /// Settings = ["sonar.login=login", "sonar.password=password"] }) + /// + let End setParams = + use __ = Trace.traceStartTaskUsing "SonarQube End" + let parameters = setParams SonarQubeDefaults + SonarQubeCall End parameters + + /// This task can be used to run the end command of [Sonar Qube](http://sonarqube.org/) on a project. + /// + /// ## Sample + + /// End + /// + let End() = + End (fun p -> { p with Settings = [] }) diff --git a/src/app/Fake.Testing.SonarQube/paket.references b/src/app/Fake.Testing.SonarQube/paket.references new file mode 100644 index 00000000000..95d3ffa1cb7 --- /dev/null +++ b/src/app/Fake.Testing.SonarQube/paket.references @@ -0,0 +1,4 @@ +group netcore +FSharp.NET.Sdk +FSharp.Core +NETStandard.Library \ No newline at end of file diff --git a/src/app/FakeLib/FakeLib.fsproj b/src/app/FakeLib/FakeLib.fsproj index 619bc805261..589a1f1f819 100644 --- a/src/app/FakeLib/FakeLib.fsproj +++ b/src/app/FakeLib/FakeLib.fsproj @@ -254,6 +254,9 @@ Fake.DotNet.Paket/PaketTemplate.fs + + Fake.Testing.SonarQube/SonarQube.fs + diff --git a/src/app/FakeLib/SonarQubeHelper.fs b/src/app/FakeLib/SonarQubeHelper.fs index e7d06eba1d6..68c89e88b55 100644 --- a/src/app/FakeLib/SonarQubeHelper.fs +++ b/src/app/FakeLib/SonarQubeHelper.fs @@ -1,10 +1,13 @@ /// Contains a task to run the msbuild runner of [Sonar Qube analyzer](http://sonarqube.org). +[] module Fake.SonarQubeHelper open TraceHelper /// The supported commands of Sonar Qube. It is called with Begin before compilation, and End after compilation. +[] type SonarQubeCall = Begin | End +[] /// Parameter type to configure the sonar qube runner. [] type SonarQubeParams = @@ -22,6 +25,7 @@ type SonarQubeParams = Config : string option } +[] /// SonarQube default parameters - tries to locate MSBuild.SonarQube.exe in any subfolder. let SonarQubeDefaults = { ToolsPath = findToolInSubPath "MSBuild.SonarQube.Runner.exe" (currentDirectory @@ "tools" @@ "SonarQube") @@ -31,6 +35,7 @@ let SonarQubeDefaults = Settings = [] Config = None } +[] /// Execute the external msbuild runner of Sonar Qube. Parameters are fiven to the command line tool as required. let SonarQubeCall (call: SonarQubeCall) (parameters : SonarQubeParams) = let sonarPath = parameters.ToolsPath @@ -66,6 +71,7 @@ let SonarQubeCall (call: SonarQubeCall) (parameters : SonarQubeParams) = /// Name = "MainTool" /// Version = "1.0 }) /// +[] let SonarQube (call: SonarQubeCall) setParams = use __ = traceStartTaskUsing "SonarQube" (call.ToString()) let parameters = setParams SonarQubeDefaults @@ -77,5 +83,6 @@ let SonarQube (call: SonarQubeCall) setParams = /// SonarQubeEnd /// +[] let SonarQubeEnd() = SonarQube End (fun p -> { p with Settings = [] }) From 1580e9e32b8fcf6700ad7c49888dfc16442fc459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sat, 10 Jun 2017 16:41:34 +0200 Subject: [PATCH 2/5] Fix some compilation errors --- src/app/Fake.Testing.SonarQube/SonarQube.fs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/Fake.Testing.SonarQube/SonarQube.fs b/src/app/Fake.Testing.SonarQube/SonarQube.fs index 9fc8f2424b8..89102ba6e61 100644 --- a/src/app/Fake.Testing.SonarQube/SonarQube.fs +++ b/src/app/Fake.Testing.SonarQube/SonarQube.fs @@ -7,11 +7,12 @@ module Fake.Testing.SonarQube open System.Text; open System.IO open System.Xml.Linq - open Fake.Core.Tracing open Fake.DotNet.NuGet.NuGet open Fake.Core open Fake.Core.Environment + open Fake.Core.Globbing open Fake.Core.String + open Fake.Core.Tracing open Fake.Core.Process open Fake.IO.FileSystem open Fake.IO.FileSystem.Operators @@ -31,14 +32,14 @@ module Fake.Testing.SonarQube /// Version number of the project Version : string /// Individual global settings for SonarQube - Settings : List + Settings : string list /// Read settings from configuration file Config : string option } /// SonarQube default parameters - tries to locate MSBuild.SonarQube.exe in any subfolder. let SonarQubeDefaults = - { ToolsPath = findToolInSubPath "MSBuild.SonarQube.Runner.exe" (currentDirectory @@ "tools" @@ "SonarQube") + { ToolsPath = Tools.findToolInSubPath "MSBuild.SonarQube.Runner.exe" (Directory.GetCurrentDirectory() @@ "tools" @@ "SonarQube") Key = null Name = null Version = "1.0" @@ -81,7 +82,7 @@ module Fake.Testing.SonarQube /// Version = "1.0 }) /// let Begin setParams = - use __ = Trace.traceStartTaskUsing "SonarQube Begin" + use __ = Trace.traceTask "SonarQube" "Begin" let parameters = setParams SonarQubeDefaults SonarQubeCall Begin parameters @@ -97,7 +98,7 @@ module Fake.Testing.SonarQube /// Settings = ["sonar.login=login", "sonar.password=password"] }) /// let End setParams = - use __ = Trace.traceStartTaskUsing "SonarQube End" + use __ = Trace.traceTask "SonarQube" "End" let parameters = setParams SonarQubeDefaults SonarQubeCall End parameters From 6d0fb365efd84408749f360c8d634196d0e211e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sat, 10 Jun 2017 16:41:44 +0200 Subject: [PATCH 3/5] docs migration --- FAKE.sln | 1 - .../{todo-sonarcube.md => testing-sonarqube.md} | 10 ++++------ help/templates/template.cshtml | 7 ++++++- 3 files changed, 10 insertions(+), 8 deletions(-) rename help/markdown/{todo-sonarcube.md => testing-sonarqube.md} (89%) diff --git a/FAKE.sln b/FAKE.sln index e8ce2b4e63b..da17813a32c 100644 --- a/FAKE.sln +++ b/FAKE.sln @@ -66,7 +66,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "help", "help", "{564BD198-0 help\nuget.md = help\nuget.md help\octopusdeploy.md = help\octopusdeploy.md help\slacknotification.md = help\slacknotification.md - help\sonarcube.md = help\sonarcube.md help\specifictargets.md = help\specifictargets.md help\teamcity.md = help\teamcity.md help\typescript.md = help\typescript.md diff --git a/help/markdown/todo-sonarcube.md b/help/markdown/testing-sonarqube.md similarity index 89% rename from help/markdown/todo-sonarcube.md rename to help/markdown/testing-sonarqube.md index bb65e5ac906..46a5908e2ff 100644 --- a/help/markdown/todo-sonarcube.md +++ b/help/markdown/testing-sonarqube.md @@ -1,7 +1,5 @@ # Analyze your code with SonarQube -**Note: This documentation is for FAKE.exe before version 5 (or the non-netcore version). The documentation needs te be updated, please help! ** - From the [web page](http://sonarqube.org): "The SonarQube® platform is an open source quality management platform, dedicated to continuously analyzing and measuring the technical quality of source code, from project portfolio down to the method level" @@ -17,7 +15,7 @@ compilation has finished. The result is then collected and sent to the SonarQube ## Minimal working example Target "BeginSonarQube" (fun _ -> - SonarQube Begin (fun p -> + SonarQube.Begin (fun p -> {p with Key = "MyProject" Name = "Main solution" @@ -26,7 +24,7 @@ compilation has finished. The result is then collected and sent to the SonarQube ) Target "EndSonarQube" (fun _ -> - SonarQubeEnd() + SonarQube.End() ) Target "Default" DoNothing @@ -49,7 +47,7 @@ By default, the SonarQube module looks for the MSBuild runner in the 'tools/Sona * You can send additional global settings to the server with the '/d:' parameter. In the SonarQubeParams, this is the new field Settings: - SonarQube Begin (fun p -> + SonarQube.Begin (fun p -> {p with Key = "MyProject" Name = "Main solution" @@ -60,7 +58,7 @@ In the SonarQubeParams, this is the new field Settings: * Configuration can also be read from a configuration file. This is the '/s:' parameter. This can be done with the new field Config: - SonarQube Begin (fun p -> + SonarQube.Begin (fun p -> {p with Key = "MyProject" Name = "Main solution" diff --git a/help/templates/template.cshtml b/help/templates/template.cshtml index 55977b50ca2..c0fef50d54b 100644 --- a/help/templates/template.cshtml +++ b/help/templates/template.cshtml @@ -110,6 +110,12 @@
  • Chocolatey
  • +
  • + Testing + +
  • Legacy / Not Migrated
      @@ -119,7 +125,6 @@
    • Windows.WiX
    • API.Slack
    • API.MsTeams
    • -
    • Testing.SonarQube
    • DotNet.StyleCop
    • Fake.Deploy
    • ?.?.IIS
    • From dfcd4d6decd7ada29a48a3034bd15972b4b50a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sun, 11 Jun 2017 08:26:38 +0200 Subject: [PATCH 4/5] Fix wrong references --- help/markdown/testing-sonarqube.md | 4 ++- .../Fake.Testing.SonarQube.fsproj | 7 ---- src/app/Fake.Testing.SonarQube/SonarQube.fs | 35 +++++++------------ 3 files changed, 15 insertions(+), 31 deletions(-) diff --git a/help/markdown/testing-sonarqube.md b/help/markdown/testing-sonarqube.md index 46a5908e2ff..c2ebe755784 100644 --- a/help/markdown/testing-sonarqube.md +++ b/help/markdown/testing-sonarqube.md @@ -14,6 +14,8 @@ compilation has finished. The result is then collected and sent to the SonarQube ## Minimal working example + open Fake.Testing + Target "BeginSonarQube" (fun _ -> SonarQube.Begin (fun p -> {p with @@ -24,7 +26,7 @@ compilation has finished. The result is then collected and sent to the SonarQube ) Target "EndSonarQube" (fun _ -> - SonarQube.End() + SonarQube.End None ) Target "Default" DoNothing diff --git a/src/app/Fake.Testing.SonarQube/Fake.Testing.SonarQube.fsproj b/src/app/Fake.Testing.SonarQube/Fake.Testing.SonarQube.fsproj index 89fb9d73154..e611a9a12a6 100644 --- a/src/app/Fake.Testing.SonarQube/Fake.Testing.SonarQube.fsproj +++ b/src/app/Fake.Testing.SonarQube/Fake.Testing.SonarQube.fsproj @@ -20,17 +20,10 @@ - - - - - - true - diff --git a/src/app/Fake.Testing.SonarQube/SonarQube.fs b/src/app/Fake.Testing.SonarQube/SonarQube.fs index 89102ba6e61..cd9bfaccfaf 100644 --- a/src/app/Fake.Testing.SonarQube/SonarQube.fs +++ b/src/app/Fake.Testing.SonarQube/SonarQube.fs @@ -1,20 +1,10 @@ /// Contains a task to run the msbuild runner of [SonarQube analyzer](http://sonarqube.org). module Fake.Testing.SonarQube - open System - open System.Collections.Generic - open System.Diagnostics - open System.Text; open System.IO - open System.Xml.Linq - open Fake.DotNet.NuGet.NuGet open Fake.Core - open Fake.Core.Environment open Fake.Core.Globbing - open Fake.Core.String - open Fake.Core.Tracing open Fake.Core.Process - open Fake.IO.FileSystem open Fake.IO.FileSystem.Operators /// [omit] @@ -75,7 +65,9 @@ module Fake.Testing.SonarQube /// /// ## Sample - /// Begin (fun p -> + /// open Fake.Testing + /// + /// SonarQube.Begin (fun p -> /// {p with /// Key = "MyProject" /// Name = "MainTool" @@ -92,21 +84,18 @@ module Fake.Testing.SonarQube /// - `setParams` - Function used to overwrite the SonarQube default parameters. /// /// ## Sample - - /// End (fun p -> + + /// open Fake.Testing + /// + /// SonarQube.End None + /// + /// SonarQube.End (fun p -> /// {p with /// Settings = ["sonar.login=login", "sonar.password=password"] }) /// let End setParams = use __ = Trace.traceTask "SonarQube" "End" - let parameters = setParams SonarQubeDefaults + let parameters = match setParams with + | Some setParams -> setParams SonarQubeDefaults + | None -> (fun p -> { p with Settings = [] }) SonarQubeDefaults SonarQubeCall End parameters - - /// This task can be used to run the end command of [Sonar Qube](http://sonarqube.org/) on a project. - /// - /// ## Sample - - /// End - /// - let End() = - End (fun p -> { p with Settings = [] }) From e0d65385ca89e3f33735debde14aaad8baf765a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sun, 11 Jun 2017 08:56:52 +0200 Subject: [PATCH 5/5] fix type / add details on obsolete messages --- build.fsx | 2 +- src/app/FakeLib/SonarQubeHelper.fs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build.fsx b/build.fsx index a69b936a464..4a0717bb1a0 100644 --- a/build.fsx +++ b/build.fsx @@ -203,7 +203,7 @@ let dotnetAssemblyInfos = "Fake.Testing.Common", "Common testing data types" "Fake.Tracing.NAntXml", "NAntXml" "Fake.Windows.Chocolatey", "Running and packaging with Chocolatey" - "Fake.Testing.SonarQube", "Analizing your project with SOnarQube" ] + "Fake.Testing.SonarQube", "Analyzing your project with SonarQube" ] let assemblyInfos = [ "./src/app/FAKE/AssemblyInfo.fs", diff --git a/src/app/FakeLib/SonarQubeHelper.fs b/src/app/FakeLib/SonarQubeHelper.fs index 68c89e88b55..2eb8b938032 100644 --- a/src/app/FakeLib/SonarQubeHelper.fs +++ b/src/app/FakeLib/SonarQubeHelper.fs @@ -1,13 +1,13 @@ /// Contains a task to run the msbuild runner of [Sonar Qube analyzer](http://sonarqube.org). -[] +[] module Fake.SonarQubeHelper open TraceHelper /// The supported commands of Sonar Qube. It is called with Begin before compilation, and End after compilation. -[] +[] type SonarQubeCall = Begin | End -[] +[] /// Parameter type to configure the sonar qube runner. [] type SonarQubeParams = @@ -25,7 +25,7 @@ type SonarQubeParams = Config : string option } -[] +[] /// SonarQube default parameters - tries to locate MSBuild.SonarQube.exe in any subfolder. let SonarQubeDefaults = { ToolsPath = findToolInSubPath "MSBuild.SonarQube.Runner.exe" (currentDirectory @@ "tools" @@ "SonarQube") @@ -35,7 +35,7 @@ let SonarQubeDefaults = Settings = [] Config = None } -[] +[] /// Execute the external msbuild runner of Sonar Qube. Parameters are fiven to the command line tool as required. let SonarQubeCall (call: SonarQubeCall) (parameters : SonarQubeParams) = let sonarPath = parameters.ToolsPath @@ -71,7 +71,7 @@ let SonarQubeCall (call: SonarQubeCall) (parameters : SonarQubeParams) = /// Name = "MainTool" /// Version = "1.0 }) /// -[] +[] let SonarQube (call: SonarQubeCall) setParams = use __ = traceStartTaskUsing "SonarQube" (call.ToString()) let parameters = setParams SonarQubeDefaults @@ -83,6 +83,6 @@ let SonarQube (call: SonarQubeCall) setParams = /// SonarQubeEnd /// -[] +[] let SonarQubeEnd() = SonarQube End (fun p -> { p with Settings = [] })