Static code analyser using #ollama and #github_action for zero cost

how to automate the static code quality check Using ollama and github action for zero cost.

Step 1 : We created a boiler template angular project in github.

Step 2 : Add a github action, which execute below steps on every pull requests created, updated or re opened.

Setup ollama CI environment and analyse,

Checkout repository and branches,

extract the pull request changes using git diff,

and Prompt the pull request changes to ollama model to review the code based on coding best practices, improve readability, and maintainability.

Step 3 : Lets add a code piece, where we miss few best practices : example : Hardcode styles, which is not suited for production code, Hard code text, Button without attributes, etc..

Step 4 : Lets commit these changes and create a pull request.

Step 5 : Wait for Code Review comments from ollama.