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…

27
[favorite_button]
Declare HN: A CLI application that analyzes with PMD and posts findings as GitHub feedback
Hello reader! Welcome, let's start-

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

Advertisements
Charlie
WRITEN BY

Charlie

Fill your life with experiences so you always have a great story to tell
Get Connected!
One of the Biggest Social Platform for Entrepreneurs, College Students and all. Come and join our community. Expand your network and get to know new people!

Discussion(s)

No comments yet

🌟 Latest Members

Knowasiak We would like to show you notifications so you don't miss chats & status updates.
Dismiss
Allow Notifications