GithubHelp home page GithubHelp logo

flax-gradle-plugins's People

Contributors

flaxoos avatar goldziher avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

flax-gradle-plugins's Issues

When comma is used for decimal, plugin fails

๐Ÿ› Describe the bug

When the addKoverBadge command is added to the I get the following exception. Somehow looks like the plugin is not handling different decimal formats.

โš ๏ธ Current behavior

  • What went wrong:
> Task :koverPrintCoverage
application line coverage: 88.0672%
...
Execution failed for task ':addKoverBadge'.
> For input string: "88,07"
...
Caused by: java.lang.NumberFormatException: For input string: "88,07"
        at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
        at java.base/jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
        at io.github.flaxoos.kover.KoverBadgeTask.getTestCoverage(KoverBadgeTask.kt:200)
        at io.github.flaxoos.kover.KoverBadgeTask.editReadme(KoverBadgeTask.kt:140)

โœ… Expected behavior

I would expect the plugin to work, regardless of the format used in the input string, and would update the README.md file with a suitable coverage value.

๐Ÿ“ฑ Tech info

  • Device: MacBook Pro M2
  • OS: MacOS 14.0
  • Library/App version:

Finding coverage not possible for non default kover.log settings

โš ๏ธ Is your feature request related to a problem? Please describe

The current implementation of the plugin badge limitations when it comes to identifying the coverage when the kover plugin is configured with metrictype and groupBy to anything other than "line" and "application" respectivly, the plugin fails to pick up any coverage information. This is due to the hard-coded string search logic, making the plugin less flexible for users with different configuration needs.

This is where the issue would come from, and probably where the solution would be

     log {
            // Add a header line to the output before the lines with coverage
            header = null
            // Format of the strings to print coverage for the specified in `groupBy` group
            format = "<entity> line coverage: <value>%"
            // Specifies by which entity the code for separate coverage evaluation will be grouped
            groupBy = GroupingEntityType.APPLICATION
            // Specifies which metric is used for coverage evaluation
            coverageUnits = MetricType.LINE
            // Specifies aggregation function that will be calculated over all the elements of the same group
            aggregationForGroup = AggregationType.COVERED_PERCENTAGE
        }

๐Ÿ’ก Describe the solution you'd like

I suggest modifying the Kover plugin to allow more dynamic string matching when looking for coverage data. One approach could be to introduce an option to specify a custom string or header to look for when aggregating coverage information. Alternatively, the plugin could be designed to simply search for the term "coverage" to make it more universally applicable, regardless of metrictype and groupBy settings. If it's possible, integrating these changes into the Kover extension by the badge plugin would be ideal.

๐Ÿคš Do you want to develop this feature yourself?

  • [] Yes
  • [] No
  • If no else does

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.