Giter Site home page Giter Site logo

jurand's People

Contributors

mizdebsk avatar mkoncek avatar

Watchers

 avatar

Forkers

mizdebsk

jurand's Issues

Jurand hangs when ran on Groovy input

Jurand hangs when I try to run it on Groovy code.
I know Groovy is not supported, but Jurand should not hang - it should produce something (not necessairly correct) or raise error, but not hang.
Example reproducer:

wget https://repo1.maven.org/maven2/org/gradle/api/plugins/gradle-tomcat-plugin/0.9.9/gradle-tomcat-plugin-0.9.9-sources.jar
jar xf gradle-tomcat-plugin-0.9.9-sources.jar
jurand -p foo -i org/gradle/api/plugins/tomcat/internal/ShutdownMonitor.groovy

RFE: Strict mode

Implement a strict mode.

In strict mode Jurand should fail if:

  • at least one of specified matchers did not match anything
  • at least one of specified source files/directories was not modified
  • -a is given, but not annotation was removed

For example see this commit in guava package
Regex matcher com[.]google[.]errorprone[.]annotation[.] matches nothing in Guava sources.
Yet the tool does not point this out.
Another matche com[.]google[.]errorprone[.]annotations[.] was added to fix that.

Pull request demonstrates that matcher could be removed: https://src.fedoraproject.org/rpms/jurand/pull-request/3

Unable to remove annotation when wildcard import is used

I have the following class:

import java.lang.annotation.*;
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.METHOD)
public @interface MyAnnotation {
}

I want to remove Retention annotation, but I can't do that with Jurand.
None of the calls I tried worked.
What arguments should I pass to Jurand to remove Retention?

Jurand skips annotations after @interface

In the following example Jurand removes only one annotation @Serial - it skips annotations after custom annotation MyAnnotation.

Input code:

import java.io.Serial;

class MyClass {
    @Serial
    int foo;
}

@interface MyAnnotation {
    @Serial
    int foo = 0;
}

class MyOtherClass {
    @Serial
    int foo;
}

Jurand invocation: jurand -i -a test_processed.java -n Serial

Actual output:


class MyClass {
    int foo;
}

@interface MyAnnotation {
    @Serial
    int foo = 0;
}

class MyOtherClass {
    @Serial
    int foo;
}

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.