Giter Club home page Giter Club logo

imhotep_pmd's Introduction

imhotep_pmd

Code style: black pre-commit CodeQL

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

  1. Install Imhotep itself from PyPI, since imhotep_pmd is merely a binding/plugin for Imhotep:
    pip install imhotep
  2. Install imhotep_pmd from PyPI:
    pip install imhotep_pmd
  3. Install PMD. Please refer to their website for instructions.

Unless you've unzipped the PMD archive file to ~/bin/pmd-bin-6.44.0/, you'll have to tell imhotep_pmd where to find the executable. This can be achieved by providing a imhotep_pmd.toml at the root directory of the repo you want to run PMD against. The file should contain this line that specifies the command used to invoke PMD:

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

Usage

To use the plugin, you'll have to pass a path to the linter in question to the imhotep runtime.

imhotep --linter imhotep_pmd.plugin:PmdLinter

Demo

Let's take #1 as an example.

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

Screenshots:

Before After
Screen Shot 2022-04-03 at 14 04 45 Screen Shot 2022-04-03 at 14 27 11

imhotep_pmd's People

Contributors

tslmy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.