Declare HN: A CLI application that analyzes with PMD and posts findings as GitHub feedback

An Imhotep plugin for PMD, the static analyzer. PMD talk to Imhotep via the Static Analysis Results Interchange Format (sarif), which is simply a JSON with a specific schema. Installation Install Imhotep itself from PyPI, since imhotep_pmd is merely a binding/plugin for Imhotep: Install imhotep_pmd from PyPI: Install PMD. Please refer to their website for…

78
Declare HN: A CLI application that analyzes with PMD and posts findings as GitHub feedback

Code style: black
pre-commit
CodeQL

An Imhotep plugin for PMD, the static analyzer.

PMD check with Imhotep by strategy of the Static Analysis Results Interchange Structure (sarif), which is merely a JSON with a selected schema.

Installation

  1. Set up Imhotep itself from PyPI, since imhotep_pmd is merely a binding/plugin for Imhotep:
  2. Set up imhotep_pmd from PyPI:
  3. Set up PMD. Please consult with their online net page for directions.

Until it’s seemingly you’ll maybe additionally like got unzipped the PMD archive file to ~/bin/pmd-bin-6.44.0/, it’s seemingly you’ll maybe wish to declare imhotep_pmd where to hunt out the executable. This would possibly per chance maybe also be carried out by offering a imhotep_pmd.toml at the foundation checklist of the repo that you have to to glide PMD against. The file would possibly maybe maybe additionally quiet dangle this line that specifies the uncover old to invoke PMD:

pmd_command="~/bin/pmd-bin-6.44.0/bin/glide.sh pmd"

Utilization

To make use of the plugin, it’s seemingly you’ll maybe wish to wander a course to the linter in quiz to the imhotep runtime.

imhotep --linter imhotep_pmd.plugin:PmdLinter

Demo

Let’s pick #1 for instance.

$ imhotep 
   --repo_name="tslmy/imhotep_pmd" 
   --github-username="tslmy" 
   --github-password="$GITHUB_PASSWORD" 
   --pr-quantity=1 
   --linter imhotep_pmd.plugin:PmdLinter

Screenshots:

Read More

Charlie Layers
WRITTEN BY

Charlie Layers

Fill your life with experiences so you always have a great story to tellBio: About: