Coder Social home page Coder Social logo

pitest-kotlin's Introduction

Kotlin Plugin

Improves pitest's support for Kotlin.

When the plugin is enabled pitest will avoid creating junk mutations in code that uses

  • de structuring code
  • null casts
  • safe casts
  • elvis operator

This project is based on github.com/pitest/pitest-kotlin but it's rewritten to be able to maintain it.

There is sample project: http://github.com/stepin/pitest-kotlin-sample

Feel free to post bug reports and PRs.

Usage

The plugin requires pitest 1.7.4 and Kotlin 1.7.0. Other versions are not tested.

To activate the plugin it must be placed on the classpath of the pitest tool (not on the classpath of the project being mutated).

e.g for maven

    <plugins>
      <plugin>
        <groupId>org.pitest</groupId>
        <artifactId>pitest-maven</artifactId>
        <version>1.7.4</version>
        <dependencies>
          <dependency>
            <groupId>name.stepin</groupId>
            <artifactId>pitest-kotlin-plugin</artifactId>
            <version>0.3.0</version>
          </dependency>
        </dependencies>

        <configuration>
blah
        </configuration>
      </plugin>
   </pluginsugin>

for gradle

buildscript {
   repositories {
       mavenCentral()
   }
   configurations.maybeCreate("pitest")
   dependencies {
       classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.7.4'
       pitest 'name.stepin:pitest-kotlin-plugin:0.3.0'
   }
}

apply plugin: "info.solidsoft.pitest"

pitest {
    pitestVersion = "1.7.4"
    targetClasses = ['our.base.package.*']  // by default "${project.group}.*"
}

or for Gradle Kotlin DSL:

plugins {
    id("info.solidsoft.pitest") version "1.7.4"
...
}
repositories {
    mavenCentral()
...
}
dependencies {
    pitest("name.stepin:pitest-kotlin-plugin:0.1.0")
    pitest("org.pitest:pitest-junit5-plugin:0.15")
...
}

See gradle-pitest-plugin documentation for more configuration options.

Support policy

I'm using this project on daily basis. So, it should work.

If you have any ideas / bugs please submit GitHub Issue. More details -- faster to resolve. It's always a good idea to show use-case in sample project (http://github.com/stepin/pitest-kotlin-sample).

Todo

There are plans to release version 1.0.0 somewhere in 07.22 after following tasks:

  • Uncomment detekt
  • Uncomment 2 tests
  • Refactor tests to better show use-cases
  • Prepare sample project
  • Upgrade to pitest version 1.9.0

pitest-kotlin's People

Forkers

dalewking

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.