All Projects → fabianishere → kotlin-plugin-generated

fabianishere / kotlin-plugin-generated

Licence: Apache-2.0 license
A Kotlin compiler plugin that annotates Kotlin-generated methods for improved coverage reports

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to kotlin-plugin-generated

Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (+2057.58%)
Mutual labels:  coverage, test, gradle-plugin, build-tool
jacoco-gradle-testkit-plugin
Gradle plugin for JaCoCo code coverage in tests using Gradle TestKit
Stars: ✭ 37 (+12.12%)
Mutual labels:  coverage, gradle-plugin, jacoco
KotlinCompilerPluginExample
This is an example project that shows how to create a Kotlin Compiler Plugin. The plugin will print "Hello from" and the name of the file that is being compiled, as a compiler warning to the terminal log.
Stars: ✭ 43 (+30.3%)
Mutual labels:  gradle-plugin, kotlin-compiler, kotlin-plugin
Devel Cover
Code coverage metrics for Perl
Stars: ✭ 91 (+175.76%)
Mutual labels:  coverage, test
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+2612.12%)
Mutual labels:  coverage, build-tool
Kahlan
✔️ PHP Test Framework for Freedom, Truth, and Justice
Stars: ✭ 1,065 (+3127.27%)
Mutual labels:  coverage, test
Gradle Pitest Plugin
Gradle plugin for PIT Mutation Testing
Stars: ✭ 144 (+336.36%)
Mutual labels:  coverage, gradle-plugin
Jacoco
🔬 Java Code Coverage Library
Stars: ✭ 3,041 (+9115.15%)
Mutual labels:  coverage, jacoco
Alsatian
TypeScript testing framework with test cases
Stars: ✭ 244 (+639.39%)
Mutual labels:  coverage, test
Kompute
Kotlin Compiler plugin bringing reactivity to variable declarations
Stars: ✭ 18 (-45.45%)
Mutual labels:  kotlin-compiler, kotlin-plugin
jacoco-badge-generator
Coverage badges, and pull request coverage checks, from JaCoCo reports in GitHub Actions
Stars: ✭ 53 (+60.61%)
Mutual labels:  coverage, jacoco
travis-ci-tutorial-java
Just to learn how to use travis-ci in a java project!
Stars: ✭ 38 (+15.15%)
Mutual labels:  coverage, jacoco
Shellspec
A full-featured BDD unit testing framework for bash, ksh, zsh, dash and all POSIX shells
Stars: ✭ 375 (+1036.36%)
Mutual labels:  coverage, test
Gradle Clover Plugin
Gradle plugin for generating a code coverage report using Clover
Stars: ✭ 67 (+103.03%)
Mutual labels:  coverage, gradle-plugin
tikione-jacocoverage
NetBeans module that provides JaCoCo code coverage for Ant based Java SE, Java EE and NetBeans Module projects (JDK5,6,7,8 compatible).
Stars: ✭ 25 (-24.24%)
Mutual labels:  coverage, jacoco
pytest-coverage-comment
Comments a pull request with the pytest code coverage badge and full report
Stars: ✭ 32 (-3.03%)
Mutual labels:  coverage, test
angular-cli-skeleton
angular-cli skeleton to quickly start a new project with advanced features and best practices. All features are described in README.md.
Stars: ✭ 32 (-3.03%)
Mutual labels:  coverage, test
jacoco-report
Github action that publishes the JaCoCo report as a comment in the Pull Request
Stars: ✭ 31 (-6.06%)
Mutual labels:  coverage, jacoco
goverage
go test -coverprofile for multiple packages
Stars: ✭ 87 (+163.64%)
Mutual labels:  coverage, test
cover.run
Code coverage
Stars: ✭ 34 (+3.03%)
Mutual labels:  coverage, test

kotlin-plugin-generated

A Kotlin compiler plugin that annotates Kotlin-generated methods with lombok.Generated to signify to code analyzers that these methods have been generated by the compiler.

JaCoCo solution (new)

Please note that JaCoCo landed support for recognizing Kotlin-generated code in 0.8.2, so we advise using that instead if possible. It has the advantage of not polluting your code with lombok.Generated annotations.

In Gradle, you can do that as follows:

jacoco {
     toolVersion = '0.8.2'
}

Gradle

To use the plugin, just apply the plugin in your build.gradle:

plugins {
    id 'nl.fabianm.kotlin.plugin.generated' version '1.5.0'
}

Make sure you install the version that is compatible with the Kotlin version you are using:

Kotlin Plugin
1.2.* 1.0
1.3.0+ 1.3.3
1.3.50+ 1.4.0
1.3.61+ 1.5.0

You can optionally configure the plugin as shown below:

kotlinGenerated {
    // The annotation to annotate the generated methods with
    annotation = "lombok.Generated"
    
    // A flag to indicate whether the annotation should be visibile at runtime
    visible = true
}

IntelliJ

To be able to use projects utilizing this plugin within IntelliJ IDEA, you need to install the IntelliJ plugin (see #4 for more information). You can find the plugin on the Releases page, labeled plugin-idea-*.zip

Command Line

To use the plugin from the command line, invoke kotlinc using the following command line arguments:

kotlinc -Xplugin="<path-to-plugin-compiler.jar>" -P plugin:nl.fabianm.kotlin.plugin.generated:annotation="lombok.Generated" -P plugin:nl.fabianm.kotlin.plugin.generated:visible=true ...

License

The code is released under the Apache version 2.0 license. See the LICENSE.txt file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].