[ANN]: v2.0 of 4D v14/v15 Code Analysis Component Released

I have released v2.0 of the CodeAnalysis component. Please take a look at the release notes below for more detail.

MY COMMITMENT - ALWAYS WILL BE FREE

This component is free and will always be free for any 4D developer’s personal use. I am doing this because I have benefited from the 4D community and this is my way of saying “thanks” and giving back.

WHAT IS IT?

Code Analysis is easy to use and offers the following features:

  • Can perform analysis on “all” stored methods in the structure including project methods, project form/object methods, table form/object methods, database methods and trigger methods.
  • Can perform analysis of the code to see which fields are used in a query and report if they are indexed or not
  • Gathers stats on line counts, comment line counts, blank line counts, code line counts, and cyclomatic complexity.
  • Can export, as disk files, every method in the structure. Can be used for archiving, backups, and source code management.
  • Can export, as JSON files, every available form and form object property in the structure. Can be used for archiving, backups, and source code management.
  • Can export, as JSON files, every available table and field property in the structure. Can be used for archiving, backups, and source code management.
  • Can create HTML documentation of the methods in the structure. The HTML docs can be limited to only those methods that have been marked as shared with host. This gives 4D developers to easily produce documentation for components that they share.
  • Can create a docset for the shared methods. Third party Docset viewers are available on many platforms.
  • Can manage 4D Project Method Comments

Please feel free to drop me a note on suggestions and feature requests. I do plan to do some more tweaks and add new features in the future.

HOW TO GET IT

Go to http://openroaddevelopment.com/projects_4dComponent_CodeAnalysis.html to get more information and download the component.

Code Analysis v2.0 - Mar 7, 2017

General

  • Minor adjustments to the user interface. Some buttons converted to icons to condense the amount of space that the UI takes on the various pages.
  • Optimized the code used for doing the analysis. Performance improved by 20-30% when testing against my own code.
  • Added menu items for the main analysis window and the new explorer window.
  • Fixed bug that caused the Quick launcher window to ignore the floating preference setting.

Explorer Window

  • Created a new explorer window that shows all the information that the component has on the methods in the structure. From this window a user can open a method, filter visible methods and export the information shown in the grid.
  • Exposed a new shared “CA_ShowExplorer” method that opens the explorer.
  • Added a new Code Review window that is accessible from right clicking a method in the explorer window. The code review window parses the method and for variables that are used. You can select a particular variable and easily see all the lines of code that use the variable.

Code Analysis Window: Complexity Analysis

  • Complexity analysis no longer counts “If (True)” and “If (False)” as a point of complexity since there is only one way to execute that decision point.
  • Added a new graph under the “View Graphs” button that provides a break down of the methods by the maximum number of nested levels of control (if, for, case, while) statements.
  • Added a button to open the explorer window.

Code Analysis Window: Index Analysis

  • Fixed a range error bug that could occasionally occurs when exporting detailed reports on the indexes.
  • Made some internal optimizations that make the detection of field and table usage easier.

Dani Beaubien
dbeaubien@openroaddevelopment.com
Open Road Development, Inc.