-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add codemodder framework and replace 1 codemod #24
Conversation
… trying to get 1 codemod to run side by side
@@ -16,9 +15,6 @@ public interface FileWeavingContext { | |||
|
|||
boolean madeWeaves(); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took out this tight coupling to JavaParser as this class is intended to be used generally.
languages/codemodder-framework-java/src/main/java/io/codemodder/CodemodInvoker.java
Outdated
Show resolved
Hide resolved
...es/codemodder-default-codemods/src/main/java/io/codemodder/codemods/SecureRandomCodemod.java
Outdated
Show resolved
Hide resolved
...es/codemodder-default-codemods/src/main/java/io/codemodder/codemods/SecureRandomCodemod.java
Outdated
Show resolved
Hide resolved
...es/codemodder-default-codemods/src/main/java/io/codemodder/codemods/SecureRandomCodemod.java
Outdated
Show resolved
Hide resolved
languages/codemodder-default-codemods/src/main/resources/secure-random.semgrep
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I focused my review on the framework and mostly skipped over changes to existing codetl stuff.
id("io.openpixee.codetl.base") | ||
id("io.openpixee.codetl.java-library") | ||
id("io.openpixee.codetl.maven-publish") | ||
id("application") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unusual to have the application
and java-library
plugins in a project. Do we need the application
plugin? I understand this is a library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand these so I just copied them all from the root to every new project. 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.openpixee.codetl.base
is our conventions on top of Gradle's base plugin. It defines things constant to all buildscripts like buildscript formatting. It's usually implied by other plugins e.g.java-library
: I can't recall if that's the case here.io.openpixee.codetl.java-library
is our conventions on top of Gradle's java library plugin. It's used to define a library used by other Java projects.application
is Gradle's application plugin. We don't have conventions for this one, I don't think we use it I can't remember.io.openpixee.codetl.maven-publish
is our conventions on top of Gradle's maven publish plugin. It's for publishing artifacts to a Maven repository. We only include it if we need to publish the artifact to a Maven repository.
} | ||
} | ||
|
||
spotless { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't doing anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I can delete all the spotless
kotlins from the new projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, the formatting is being applied by the plugins at the top of this build script.
This PR adds a new codemodder framework, including an example provider, and a single codemod replacing the old way of doing things.