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

DelphiLint

Build Format

DelphiLint is an IDE package for RAD Studio that provides on-the-fly code analysis and linting, powered by SonarDelphi.

Features

Installation

System requirements:

Installation steps:

  1. Download the packaged zip for your Delphi version from the latest release, or build from source.
  2. Unzip the folder and run the included install.bat script.
  3. Done!

[!NOTE] Using the precompiled BPLs in different minor versions from which they were compiled can cause compatibility problems in some circumstances. If you encounter issues, please build from source.

Installing the VS Code companion

  1. Download the .vsix extension file from the latest release, or build from source.
  2. Run code --install-extension <vsix> to install the extension.

[!IMPORTANT] For the companion to work, a DelphiLint installation of the same version must be installed.

The VS Code companion is not required for the Delphi IDE plugin to function.

Usage

To analyze a file:

  1. Open a Delphi project in the IDE.
  2. Open the Delphi source file you want to analyze.
  3. Click the DelphiLint > Analyze This File menu option.

It's as easy as that! The DelphiLint window will then pop up, showing the current state of analysis and any issues that are raised. Please note that when the file has a lot of imports the analysis could take thirty seconds or so.

For more information:

Gallery

Building from source

Prerequisites:

To build DelphiLint, use scripts/build.ps1:

This creates a target/DelphiLint-<version>- folder containing all built artifacts.

[!NOTE] build.ps1 looks for a Delphi installation in the default location for the given version. If your installation is elsewhere, supply the location as part of the version parameter, e.g. scripts/build.ps1 280=/my/custom/location.

Contributing

DelphiLint is open for contributions - please read the contributing guide for more information.

License

Licensed under the GNU Lesser General Public License, Version 3.0.