Spyglass for 4D Code improves even more
Dani Beaubien has released v1.5.1 of the CodeAnalysis component.
There are three main features in this release:
- #1 – You can now view method differences vertically as well as the currently supported side by side. The vertical view will be familiar to github users.
- #2 – Folders that are beside the structure file can now be included as part of the method export. You can also do comparisons for differences on previous exports of the folders as well.
- #3 – The component has been released for 4D v13 and 4D v14. Right now the two versions have identical functionality.
What is ‘Code Analysis’?
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.
- 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.
Please feel free to drop Dani Beaubien a note on suggestions and feature requests, Dani plans to do some more tweaks and add new features in the future.
Download the component directly from Open Road Development, Inc. website.
VERSION 1.5 & 1.5.1 CHANGES
- Fixed CodeAnalysis v1.5 bug that could cause the json files to be empty.
- Renamed the tabs and added “folders” tab.
- Combined the “Difference” tab into the “Methods” tab.
- Added ability to specify one or more extra folders to be included as part of the method export. This is set from the “Folders” tab on the preferences dialog.
Code Analysis Window
- Renamed the “Differences” tab to “Method DIFF”.
- Added “Folder DIFF” tab that shows the differences between the local copy of the extra folder(s) and the remotely exported copy.
- Extended the exporting of methods as text to also copy any specified extra folders.
Code Differences Window
- Added a 2nd view of the method differences. The differences can now be viewed so that they appear vertically one after another (like shown on github) or horizontally. Use Command 1 and 2 to switch the views (control 1/2 on windows). The view is persisted in the preferences.