integrated-application-development / delphilint

Delphi IDE package providing on-the-fly code analysis and linting, powered by SonarDelphi
GNU Lesser General Public License v3.0
79 stars 9 forks source link

Unable to read from network shares #17

Closed Holmes70 closed 4 months ago

Holmes70 commented 5 months ago

Prerequisites

Delphi IDE version

12

DelphiLint version

1.0.1

SonarDelphi version

1.3.0

SonarQube version

No response

Issue description

When analyzing a project on a network share or more specifically on a Parallels share from a Windows VM on a Mac. The system fails with the following error message: [Window Title] Warnung

[Main Instruction] DelphiLint encountered a problem during analysis.

[Content] An error was raised (au.com.integradev.delphi.file.DelphiFile$DelphiFileConstructionException: Failed to construct DelphiFile (C:\Home\Documents\Embarcadero\Studio\Projekte\Unit41.pas (Das System kann den angegebenen Pfad nicht finden)) ).

[OK]

The files are in fact located at \Mac\Home\Documents\Embarcadero\Studio\Projekte.

Steps to reproduce

Try analyzing a file on a network share via UNC path.

Minimal Delphi code exhibiting the issue

No response

fourls commented 5 months ago

Hi, thanks for raising this issue. I've reproduced and am looking into the cause now.

As a short-term workaround, you can map a network drive to your UNC path. According to the Parallels docs this should work fine within your VM.

fourls commented 5 months ago

This turned out to be an upstream bug with SonarDelphi - I've raised integrated-application-development/sonar-delphi#208 to fix it.

Once a new SonarDelphi release comes out containing this fix:

fourls commented 4 months ago

SonarDelphi 1.4.0 is now out containing a fix to this issue.

To resolve this issue, you can either: