GithubHelp home page GithubHelp logo

isabella232 / revapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hubspot/revapi

0.0 0.0 0.0 6.71 MB

Revapi is an API analysis and change tracking tool written in Java. Its focus is mainly on Java language itself but it has been specifically designed to not be limited to just Java. API is much more than just java classes - also various configuration files, schemas, etc. can contribute to it and users can become reliant on them.

Home Page: http://revapi.org

License: Apache License 2.0

Shell 0.91% JavaScript 0.53% Java 97.17% Groovy 0.55% CSS 0.21% Handlebars 0.41% Batchfile 0.04% FreeMarker 0.19%

revapi's Introduction

Revapi

Build Status Code Coverage

Revapi is a tool for API analysis and change tracking.

Summary

While Revapi is designed to be extensible and in theory should support API checks in other languages than Java (not just programming languages but anything that can be decomposed to a tree structure) the only extension in existence today is the Java API checker.

The main distinguishing features of the Java API checker include:

  • large number of API checks

    • categorized by their influence on source, binary and "semantical" compatibility

  • support for computing the API "surface" by tracking usages of types across the checked library and also its dependencies (ability to report type "leakage" from deps)

  • support for Java8 constructs (default methods in particular)

  • powerful filtering stuff to check and reclassification of found problems

  • ability to filter by annotation presence

  • Maven plugin automatically includes depenendcies in the check

Other features:

  • ability to judge the severity of changes based on semver rules (see here)

  • automatic updates of pom.xml or release.properties versions according to semver rules (see here)

  • pluggable reporting (standard output, maven site generation, FreeMarker templates, JSON, โ€ฆโ€‹)

Building

This is a maven project, so to build you simply:

mvn install

Usage

Revapi can be invoked in a couple of ways. It can be used as a standalone program, as a maven plugin or it can also be embedded in your application and used as a library.

Standalone

Download the standalone distribution zip and

unzip revapi-XXX-standalone.zip
cd revapi-XXX-standalone
./revapi.sh

Read the usage info and go.

Maven

<build>
    <plugins>
        <plugin>
            <groupId>org.revapi</groupId>
            <artifactId>revapi-maven-plugin</artifactId>
            <version>...</version>
            <dependencies>
                <dependency>
                    <groupId>org.revapi</groupId>
                    <artifactId>revapi-java</artifactId>
                    <version>...</version>
                </dependency>
                <dependency>
                    <groupId>com.acme</groupId>
                    <artifactId>my-extension</artifactId>
                    <version>...</version>
                </dependency>
                ...
            </dependencies>
            <configuration>
                ...
            </configuration>
            <executions>
                <execution>
                    <id>api-check</id>
                    <goals><goal>check</goal></goals>
                    ...
                </execution>
                ...
            </executions>
        </plugin>
        ...
    </plugins>
    ...
</build>

Gradle

There is an external Gradle plugin available for Revapi, https://github.com/palantir/gradle-revapi.

Embedding

Revapi revapi = Revapi.builder().withAllExtensionsFromThreadContextClassLoader().build();

AnalysisContext analysisContext = AnalysisContext.builder()
    .withOldAPI(API.of(...))
    .withNewAPI(API.of(...))
    .withConfigurationFromJSON("json").build();

revapi.analyze(analysisContext);

Extending Revapi

See the site for more info.

Getting in touch

revapi's People

Contributors

metlos avatar stevie400 avatar monperrus avatar mureinik avatar pzygielo avatar xcelled avatar maxandersen avatar yurigeinishbc avatar psiroky avatar mkavanagh avatar marianmacik avatar singleton06 avatar cdietrich avatar klaren avatar yurloc avatar marcob avatar m7stock avatar msrb avatar mishademianenko avatar nivertius avatar ppalaga avatar sbernard31 avatar uhafner avatar dependabot[bot] avatar twogee 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.