GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pixee/codemodder-java: a framework for building java codemods

BranchesTags
Open more actions menu

Latest commit

 

History

746 Commits
746 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
community-codemods
community-codemods
 
 
core-codemods
core-codemods
 
 
framework
framework
 
 
gradle
gradle
 
 
img
img
 
 
plugins
plugins
 
 
sonar-api-model
sonar-api-model
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle.kts
build.gradle.kts
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
renovate.json
renovate.json
 
 
settings.gradle.kts
settings.gradle.kts
 
 

Repository files navigation

Pixee Logo

codemodder-java

This is the Java version of the Codemodder Framework, which builds on traditional codemod frameworks by providing codemods with additional context and services. Codemodder plugins inject codemods with the context and services they need to perform complex transforms.

Pluggability and the complex transforms they enable distinguish codemodder codemods from traditional codemods.

For directions on how to write your own codemods, visit the Codemodder documentation site.

Codemodder is sponsored by pixee.ai.

Developing

Follow these instructions if you intend to modify and build this project from source.

First Time Set Up

  1. Install JDK 17 for building this project. We recommend Eclipse Adoptium

  2. Install Semgrep CLI. See here for instructions. It can usually be done via pip:

    pip install semgrep==1.84.1

If your python library paths contain your home directory as a root folder (i.e. due to the use of the $HOME environment variable), you may need to manually set up your PYTHONPATH for tests:

PYTHONPATH=$HOME/<subpath-to-python-libs-folder> ./gradlew check

You can check your python paths with:

python -m site

Building

./gradlew assemble

Running Tests

./gradlew check

You need to be able to run Docker for some tests. Make sure you have it installed and have the necessary permissions to run with your user.

OpenAI Integration Tests

Some tests integrate with the OpenAI platform. To run these tests, configure an OpenAI key in the Gradle property codemodderOpenAIKey. When no API key is configured, the tests will be skipped.

You can add the Gradle property to your ~/.gradle/gradle.properties file:

codemodderOpenAIKey=your-openai-key

Run the Core Codemods

You can download and run the latest release from this repository in order to run the core codemods as a CLI:

$ unzip codemodder-java-codemods-<VERSION>.zip
$ sh core-codemods-<VERSION>/bin/core-codemods

In order to run them during active development from Gradle, you can use the run task:

./gradlew :core-codemods:run --args='--output /path/to/my.codetf --dry-run /path/to/project/'

About

a framework for building java codemods

codemodder.io

Topics

codemodsframeworkjavalibraryqualitysecuritystatic-analysis

Resources

Readme
AGPL-3.0 license
Activity
Custom properties

Stars

42 stars

Watchers

8 watching

Forks

7 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.