Giter Club home page Giter Club logo

sonar-delphi's Introduction

SonarDelphi

quality gate format build

SonarDelphi is a modern, performant, and fully-featured community code analyzer for the Delphi language. As a plugin for the SonarQube code analysis platform, it can be easily integrated into existing workflows.

This project has three primary goals:

  • Correctness: All valid Delphi code should be accepted and understood correctly.
  • Utility: Analysis results should be easily understandable and immediately actionable.
  • Extensibility: New rules should be trivial to add and have access to the full power of the analyzer.

This project aims to follow the conventions and best practices of SonarQube's official analyzers. It is actively maintained by a core team and is open for community contributions.

Features

With SonarDelphi, you can:

  • Analyze Delphi code, identifying issues from more than 120 rules
  • Create custom rules in the SonarQube UI from templates
  • Import NUnit test reports (compatible with DUnitX)
  • Import test coverage reports (compatible with DelphiCodeCoverage)

Semantic analysis

SonarDelphi understands what your code means, paving the way for powerful rules such as:

Dead code analysis

Using semantic analysis, SonarDelphi can identify unused code in your project, including:

Advanced custom rules

In addition to template rules, SonarDelphi can be extended with custom rules plugins:

  • Leverage the full power of the analysis engine with the SonarDelphi rules API.
  • For more details, refer to Custom Rules 101.

Usage

  1. Install the following:

  2. Install the plugin:

    1. Download the SonarDelphi plugin from Releases.
    2. Install the plugin on the SonarQube server.
  3. Run analysis on your Delphi project:

    • Configure your sonar.delphi.installationPath.
    • Execute sonar-scanner in your project's directory.
  4. View analysis results:

    • Visit the link provided at the end of the scan to view analysis results on SonarQube.

Warning

Unfortunately, Delphi Community Edition is not supported.

SonarDelphi requires source code for all dependencies, including the standard library.

Configuration

You can configure SonarDelphi analysis parameters on the SonarQube server at Administration > General Settings > Delphi.

For the full list, see Language-specific properties.

Important

sonar.delphi.installationPath must point to a valid Delphi installation for the scan to succeed.

Contributing

SonarDelphi is open for contributions, from bug reports to new features. For more details, please read the contributing guide.

Development

SonarDelphi can be built with JDK 11+ using Maven.

To build the project and run unit tests, execute the following command from the project's root directory:

mvn clean install

After building, the plugin jar can be found in sonar-delphi-plugin/target.

History

In 2012, Sabre Airline Solutions released SonarDelphi as an open source project. Over the years, it has been forked and iterated on by various maintainers.

In 2018, it was picked up as a Monash University student project for IntegraDev. Since 2019, the project has been actively developed and extensively rewritten by IntegraDev.

License

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

sonar-delphi's People

Contributors

cirras avatar alecfn avatar fourls avatar fabriciocolombo avatar ekot1 avatar jkfar4 avatar michieli avatar przemyslawkociolek avatar zaneduffield avatar mayankadlakha avatar nikhilsharma66 avatar sandroluck avatar croach1337 avatar godin avatar jgardn3r avatar huanruan avatar teloah avatar ehartmann avatar raphaelnguyen avatar bellingard avatar qgppl avatar juris-greitans avatar darianmiller avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.