Initial Release
The CodeInspector program validates packages and classes based on predefined rules. It processes the provided packages, identifies associated classes, and applies validations while ignoring specified packages and classes. The results can be displayed in the console or returned as structured JSON.
The motivation behind CodeInspector is to create a tool that is easy to implement, allowing teams to define their own rules and adapt the tool to their business needs. By offering flexibility and simplicity, teams can ensure code quality while addressing specific requirements within their development process.
The Shift team is developing our own tools, as we haven’t found any that fit our specific business needs. To address this demand, I created a tool that is flexible and easy to implement, allowing any team member to create new rules without complications.
I faced some challenges using ZPM, largely due to my limited familiarity with the tool.
Ensure you have the following installed:
Clone or pull the repository into a local directory:
$ git clone git@github.com:rodoctor/iris-dev-codeinspector.git
Navigate to the directory and run:
$ docker-compose up -d
Open IRIS installation with IPM client installed:
IRISAPP>zpm "install codeinspector"
The management portal is available at:
Management portal
The API is available at http://localhost:9091/codeinspector/ and accepts the following parameters:
You can find an export of the Postman Collection for testing the available API in the collectionPostman
folder of this project.
Import into Postman to run tests.
classDiagram class `codeInspector.rules.BaseRule` { +Execute() : void +IncrementStatusError() : void }
class
codeInspector.rules.[package].[className]
{
+Execute() : void
}
codeInspector.rules.[package].[className]
--|>codeInspector.rules.BaseRule
Set type = "Interdependency"
Set errorDescription = "A call to a BusinessOperation has been found within another BusinessOperation."
Do ..IncrementStatusError(.pArrayErrors,pIdMethod,type,pMethodContent,errorDescription)
I appreciate any and all contributions! Feel free to fork the repository, make improvements or suggest changes, and submit a pull request.