Skip to content

Commit

Permalink
Add a diagnostics hint to the validation failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
zvirja committed Jun 4, 2018
1 parent 5373c6e commit 4616048
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Build.fsx
Expand Up @@ -202,7 +202,17 @@ Target "EnableSourceLinkGeneration" (fun _ ->
enableSourceLink <- true
)

Target "VerifyOnly" (fun _ -> rebuild "Verify")
Target "VerifyOnly" (fun _ ->
try
rebuild "Verify"
with
| BuildException (msg, errors) ->
let msg = sprintf
"%s\r\nHINT: To simplify the fix process it's recommended to switch to the 'Verify' configuration \
in the IDE. This way you will get Roslyn quick fixes for the violated rules."
msg
raise (BuildException(msg, errors))
)

Target "BuildOnly" (fun _ -> rebuild configuration)
Target "TestOnly" (fun _ ->
Expand Down Expand Up @@ -449,4 +459,4 @@ if buildServer = BuildServer.AppVeyor
ActivateFinalTarget "AppVeyor_UpdateVersion"

// ========= ENTRY POINT =========
RunTargetOrDefault "CompleteBuild"
RunTargetOrDefault "CompleteBuild"

0 comments on commit 4616048

Please sign in to comment.