Samsung / Dexter

Dexter is a static analysis platform to find and remove defects efficiently and immediately during the coding-time.
BSD 2-Clause "Simplified" License
57 stars 33 forks source link

Dexter

The DEfect eXTERminator

Dexter is a static analysis tool for detecting and removing defects and improving code quality even before a third party review. In addition, Dexter allows storing the analysis results on Dexter Server and using customized checkers as plugins. You can code safely now!

Table of contents
  • How does it work?
  • Defects? Same as IDE hints?
  • Ok, but do YOU need Dexter?
  • What IDEs does Dexter support?
  • Where can I find more?
  • Download Dexter now!
  • Disclaimer GitHub no longer supports Internet Explorer, neither does this page. If anything is displayed incorrectly, illegibly, not at all etc. please make sure that you are using one of the supported browsers.

    How does it work?

    Whenever you commission the scrutiny (manually or after saving the file - it's configurable) Dexter performs the analysis on a scope of a file, project or solution. It checks only the appropriate files (e.g. *.cs for C#) and shows you directly in code where the defects may appear.

    Psst! If you've already found the mistake in the code above, perhaps you should think of contributing to Dexter?

    Defects? Same as IDE hints?

    Not exactly. What Dexter finds are not the obvious errors that any IDE can find. It looks for defects as trivial as possible "array index out of bounds" up to less anticipated like "usleep misuse" (see the full list of checkers here).

    Ok, but do YOU need Dexter?

    You would definitely benefit from having Dexter if you fall into any of the categories:

    However, you do not need Dexter if you are a developer and you find yourself in one of these groups:

    What IDEs does Dexter support?

    Dexter supports the most popular programming Environments and also provides a CLI version for you to use!

    See which ones! **Eclipse** IDE for Java (Kepler 4.3 and highers) **Microsoft Visual Studio** (2017 and higher) for C# **Source Insight** for C/C++ (3.50.0072+) **CLI** - yes, command-line interface is not an IDE, but you can also execute Dexter from it (Jenkins, other editors)

    Where can I find more?

    There are two ways to find out more about Dexter... For much more detailed information and a rich Dexter resource please refer to Dexter Wiki at Atlassian: - [Dexter Wiki (How to install/Use)](https://dexter.atlassian.net) ...and in the mean time check out the (old but gold) video about Dexter! - [Dexter Introduction Video (4min)](https://youtu.be/86exIHcwi6c)

    Download Dexter now!

    Latest Version 0.10.6 (20. Oct. 2016) #### Eclipse Update Site ##### Eclipse JAVA+CPP - Win [32bit](http://dl.bintray.com/minho/dexter-eclipse-32) / [64bit](http://dl.bintray.com/minho/dexter-eclipse-64) ##### Eclipse JAVA - Win [32bit](http://dl.bintray.com/minho/dexter-eclipse-java-32) / [64bit](http://dl.bintray.com/minho/dexter-eclipse-java-64) ##### Eclipse C/C++ - Win [32bit](http://dl.bintray.com/minho/dexter-eclipse-cpp-32) /[64bit](http://dl.bintray.com/minho/dexter-eclipse-cpp-64) ##### Tizen SDK - Win [32bit](http://dl.bintray.com/minho/dexter-tizen-sdk-32) / [64bit](http://dl.bintray.com/minho/dexter-tizen-sdk-64) #### Dexter Daemon for Source Insight - Win [32bit](https://dexter.atlassian.net/wiki/download/attachments/6258746/dexter-daemon_0.10.6_32.zip?api=v2) / [64bit](https://dexter.atlassian.net/wiki/download/attachments/6258746/dexter-daemon_0.10.6_64.zip?api=v2) #### Dexter CLI - Win/Linux/Mac [32bit](https://dexter.atlassian.net/wiki/download/attachments/6258746/dexter-cli_0.10.6_32.zip?api=v2) / [64bit](https://dexter.atlassian.net/wiki/download/attachments/6258746/dexter-cli_0.10.6_64.zip?api=v2) #### Dexter Server - [Win/Linux/Mac](https://dexter.atlassian.net/wiki/download/attachments/6258746/dexter-server_0.10.6.zip?api=v2) #### Dexter Monitor - [Win/Linux/Mac](https://dexter.atlassian.net/wiki/download/attachments/6258746/dexter-monitor_0.10.6.zip?api=v2)

    Contribution

    Dexter is fully open source so do not hesitate to explore the deepest guts of it and we heartfully invite you to contribute. Simply check the "How to build" below and setup your first self-made instance of Dexter.

    Then - if you are feeling brave and creative - just hit us with a clever GitHub Pull Request!

    How to build

    For mighty developers!

    Check out the detailed document at https://github.com/Samsung/Dexter/blob/master/doc/Dexter_Build_Guide.pdf

    ... or see the general steps! ## Prerequisites - Install JDK 7 update 40+ - Install Gradle (http://gradle.org) - Install NodeJS v4.4.2+ (https://nodejs.org) - Download Eclipse RCP/RAP Kepler + (http://www.eclipse.org/downloads/packages/release/Kepler/sr2) - Download Dexter Source Codes (https://github.com/Samsung/Dexter) ## Import Dexter Projects into Eclipse - run with sufficient memory (in eclipse.ini) : -Xmx1024m --launcher.XXMaxPermSize256m - make sure your text file encoding setting is 'UTF-8' : Eclipse > Preferences > General > Workspace - import Dexter Projects that you already downloaded except dexter-server project - use 'gradle build' command in a command line console : '/project' folder - refresh all projects in eclipse, then all errors should disapear ## Build Dexter CLI - use ant script on build-install.xml file in dexter-executor project - you can see the 'dexter-cli_#.#.#_bit.zip file in dexter-executor/install folder - after unzipping this file, you can run dexter in a command line: unzip-folder/bin/dexter.bat or dexter.sh - before running dexter.bat file, you have to set dexter_cfg.json file to set the scope of analysis (refer to dexter_cfg.json.help file) ## Build Dexter Daemon for source insight - open dexter-daemon.product file in dexter-daemon project - click 'Eclipse Product export wizard' link on the 'Exporting' tab in a editor - set the fields - Root directory:dexter-daemon Destination/Directory: your directory - click "Finish" button - check export folder, it should contain dexter-daemon folder - run dexter.exe, then you can see the login dialog - check 'Run in Standalone mode' (running Dexter without Dexter Server) - run Source Insight, and open 'Base' project - add 'project/script/dexter.em' macro file to 'Base' project - after editing and saving your source file, you will see the result of analysis in your editor and Dexter Daemon ## Build Dexter Eclipse Plugins - create a Feature project in Eclipse - include all of Dexter projects without dexter-daemon and dexter-cppcheck projects - create update site on the feature.xml file - include your feature and build all, then you will see the feature and plugins folders in you update project - you can make an update site or just copy plugin folder into your new Eclipse - then, you can use Dexter ## Build Dexter Visual Studio Plugin In order to build a plugin for Visual Studio you need what follows: - Microsoft Visual Studio 2013 or newer - Microsoft Visual Studio SDK (2013 or newer) - (Optionally) NUnit3 Test Adapter (Visual Studio Extension) - for executing unit tests To build a plugin: - open a solution file "dexter-vs.sln" located in project/dexter-vs directory - right click on "Build/Rebuild dexter-vs". NuGet will download all required dependencies and Visual Studio will rebuild you project - after this, you should have a self-installing extension file "dexter.vsix" located in "dexter-vs/bin/{ConfigurationName}" - you can install an extension by double clicking it The most convenient way to debug this plugin is to use an Experimental Instance of Visual Studio - go to the "Project/dexter-vs Properties..." and then go to the "Debug" tab - select "Start external program:" and provide path to Visual Studio executable (devenv.exe) - enter "/RootSuffix Exp" in "Command line arguments" - save your changes - run a project (F5) - it should start Visual Studio Experimental Instance with dexter-vs installed as an extension However, if you decide to test the extension by installing it from the .vsix file (generated in the Debug folder), remember to **disable the Visual Studio "automatic extension update"** (Options->Environment->Extensions and Update->Automatically update extensions). The automatic update will change the plugin to the most recent version on the Marketplace, i.e. get rid of all the development changes.

    How to open API documentation in Swagger

    You can use Swagger to know more about Dexter API Web page with Dexter API documentation in Swagger will be available during Dexter server running on the same host and post as Dexter server. You can find it under [host]:[port]/api/api-docs address.

    Future plans

    License

    Dexter is fully open source and BSD-licensed. See the full license (it's really short, even we've read it).