====== Hammurapi ====== This is the home page of Hammurapi 6. The previous version of Hammurapi - 5.7.0 - is [[http://www.hammurapi.biz/hammurapi-biz/ef/xmenu/hammurapi-group/products/hammurapi/index.html|here]]. ===== Version ===== [[http://www.hammurapi.com/mantis/changelog_page.php?project_id=8|6.3.0]] This release features core API, configuration editors and reporters. It doesn't contain language modules and inspector sets. The "out-of-the-box" release cannot be used for automated reviews, it is intended to be used by language module developers. ===== License ===== * [[wp>LGPL]] ===== Value proposition ===== Automated code quality governance reduces TCO for software intensive systems by enforcing development guidelines and detecting potential problems with minimal overhead for the development organization. ===== Resources ===== * [[http://www.hammurapi.com/products/review/com.hammurapi.review.zip|Jar files]]. * [[http://www.hammurapi.com/products/review/lib/com.hammurapi.review.jar]] - Jar file URL for [[products:config:bootstrap|bootstrap]] codebase. * [[http://www.hammurapi.com/products/review/com.hammurapi.review-src.zip|Sources]], includes Javadoc, model documentation, and jar files. * [[http://www.hammurapi.com/products/review/doc/model/index.html|Review model documentation]]. The model extends [[products:config:start]] model. * [[http://www.hammurapi.com/products/review/doc/api/index.html|Javadoc]]. * [[products:update_site:start]] - Editor installation. * [[http://www.hammurapi.com/bb/viewforum.php?f=3|Discussion forum]] * [[http://www.hammurapi.com/mantis/|Issue tracking]] * [[http://www.hammurapi.com/mantis/roadmap_page.php?project_id=8|Roadmap]] * [[products:hammurapi:language_modules:development_guide|Language modules development guide]] * [[Community driven code quality process]] ===== Concepts ===== {{:products:hammurapi:code_reviews.gif|}} Hammurapi is a code review framework, which allows to build different [[Embodiments|code review solutions]]. ''Code'' is not necessary a source file written in some programming language, it can be anything that can be represented as an object model - database schema obtained from JDBC connection metadata, XML files, JMS or J2EE server configuration obtained through administration API, ... you name it. The picture above shows steps in the code review process. The process takes source code as input and produces a code quality report as output. Sections below describe each step in the process. ==== Parse ==== This step in the process takes source code (e.g. .java files) and constructs object model (e.g. [[wp>Abstract_semantic_graph|abstract semantic graph]] in the case of Java) which is more suitable for analysis than "raw" sources. Parsing is performed by [[products:hammurapi:language_modules:start]]. Language module is a Java library. ==== Review ==== During the review step the source model is traversed and individual model elements are inspected for compliance with development guidelines. Inspection is performed by Java classes called inspectors. Inspectors are organized into inspector sets. Inspectors report observations. There are four types of observations: * Annotation - HTML fragment which is included into model element's report page. * Measurement - Name value pair, e.g. ''cyclomatic complexity'' = ''10'' * Violation - (Potential) problem with the code. E.g. empty catch block. * Warning - A problem with executing the review, e.g. misconfiguration, or exception. ==== Render ==== During this step the model, inspector set, and observations are rendered by [[Reporters]] to produce a report. In the standalone embodiment the report produced in HTML format, in the plug-in embodiment some observations types (Violations and Warnings) are reported using IDE API's. ===== Solution components ===== * [[products:hammurapi:language_modules:start]] parse sources into a model for review. * Inspectors and [[Inspector sets|inspector sets]] review the model. * [[Reporters]] produce reports. * Component configuration file defines review configuration - modules, inspector sets for modules, and reporters. * Hammurapi Core API defines configuration model and interfaces to assemble different review configurations. ===== Process ===== * Create/reuse language module. * Create inspectors and inspector set. * Create component configuration - use Hammurapi Review Model editor with Component root object. * [[Execute review]].