jmecosta / sonar-fsharp-plugin

F# SonarQube (TM) plugin - support for F#
GNU Lesser General Public License v3.0
52 stars 14 forks source link

Replace URI with absolute path for files to analyze #77

Closed milbrandt closed 5 years ago

milbrandt commented 5 years ago

comment on PR #73 to URI hack

works now, however the hack sonar-fsharp-plugin/FsSonarRunner/FsSonarRunner/Program.fs

     Line 70
       |> Seq.iter (fun file -> handleFileToAnalyse(file.Replace("file:///", ""))) 

that ive made now is cutting one extra /, so it can find any file. Do u know how to pass absolute path from java side directly? the hack was done originally because i was not able to find a way to pass absolute path from java side since they change quite a bit the api.

SonarQube gves the hint, it might be not an file URI. But otherwise, a not so elegant solution would be

      Paths.get(file.uri()).toAbsolutePath()