A danger-swift plug-in to report xcresult in your PR

Overview

DangerSwiftKantoku

A danger-swift plug-in report xcresult in your PR.

Install DangerSwiftKantoku

SwiftPM (Recommended)

  • Add dependency package to your Package.swift file which you import danger-swift

    // swift-tools-version:5.5
    ...
    let package = Package(
        ...
        dependencies: [
            ...
            // Danger Plugins
            .package(name: "DangerSwiftKantoku", url: "https://www.github.com/yumemi-inc/danger-swift-kantoku.git", from: "0.1.0"),
            ...
        ],
        ...
    )
  • Add the correct import to your Dangerfile.swift file

    import DangerSwiftKantoku

Marathon (Tool Deprecated)

  • Just add the dependency import to your Dangerfile.swift file like this:

    import DangerSwiftKantoku // package: https://github.com/yumemi-inc/danger-swift-kantoku.git

Usage

Perform the xcreult check with parseXCResultFile method which is available for DangerDSL instances

<#.xcresult file path#>", configuration: .default)">
danger.kantoku.parseXCResultFile(at: "<#.xcresult file path#>", configuration: .default)

※ Please note that currently DangerSwiftKantoku only supports reporting Build Errors, Build Warnings, Analyze Warnings and Test Failures in your .xcresult file. We're in progress to add more features like reporting Test Coverage in the future.

Preview

Code above will make danger producing markdown messages like below

Normal Comment

Warnings
⚠️

DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations. This could also be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it. Unable to process MyApp.app.dSYM at path /Users/vagrant/Library/Developer/Xcode/DerivedData/MyApp-fgkyrlpjfjuybodxuqbmvhrylall/Build/Products/Debug-Development-iphonesimulator/MyApp.app.dSYM

⚠️ Using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
⚠️

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99.

⚠️

MyApp/Source/Common/AttributedStringBuilder.swift#L94 - '@_functionBuilder' has been renamed to '@resultBuilder'

⚠️

MyApp/Source/UI/CommonViews/InitialStateView/InitialStateView.swift#L9 - 'whiteLarge' was deprecated in iOS 13.0: renamed to 'UIActivityIndicatorView.Style.large'

Generated by 🚫 Danger Swift against 8513f7535c90ed36b31d3ed6503ee37c5f9cab09

Inline Comment

  • ⚠️ Initialization of immutable value 'abc' was never used; consider replacing with assignment to '_' or removing it
You might also like...
A cross-platform library of Swift utils to ease your iOS | macOS | watchOS | tvOS and Linux development.
A cross-platform library of Swift utils to ease your iOS | macOS | watchOS | tvOS and Linux development.

Mechanica A library of Swift utils to ease your iOS, macOS, watchOS, tvOS and Linux development. Requirements Documentation Installation License Contr

Collection of native Swift extensions to boost your development. Support tvOS and watchOS.
Collection of native Swift extensions to boost your development. Support tvOS and watchOS.

SparrowKit Collection of native Swift extensions to boost your development. Support iOS, tvOS and watchOS. If you like the project, don't forget to pu

FeatureFlags.swift - Tools for easily defining feature flags for your projects

FeatureFlags.swift Tools for easily defining feature flags for your projects Int

Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures
Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures

Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures. Have the best of both worlds

SuggestionsBox helps you build better a product trough your user suggestions. Written in Swift. 🗳
SuggestionsBox helps you build better a product trough your user suggestions. Written in Swift. 🗳

SuggestionsBox An iOS library to aggregate users feedback about suggestions, features or comments in order to help you build a better product. Swift V

FancyGradient is a UIView subclass which let's you animate gradients in your iOS app. It is purely written in Swift.
FancyGradient is a UIView subclass which let's you animate gradients in your iOS app. It is purely written in Swift.

FancyGradient is a UIView subclass which let's you animate gradients in your iOS app. It is purely written in Swift. Quickstart Static gradient let fa

Add “Launch at Login” functionality to your macOS app in seconds
Add “Launch at Login” functionality to your macOS app in seconds

LaunchAtLogin Add “Launch at Login” functionality to your macOS app in seconds It's usually quite a convoluted and error-prone process to add this. No

LifetimeTracker can surface retain cycle / memory issues right as you develop your application
LifetimeTracker can surface retain cycle / memory issues right as you develop your application

LifetimeTracker Bar style Circular style LifetimeTracker can surface retain cycle / memory issues right as you develop your application, and it will s

The simplest way to display the librarie's licences used in your application.
The simplest way to display the librarie's licences used in your application.

Features • Usage • Translation • Customisation • Installation • License Display a screen with all licences used in your application can be painful to

Comments
  • Adds filter Options for warnings similar to swift lint in danger

    Adds filter Options for warnings similar to swift lint in danger

    1. Adds a enum to specify which files should show warnings using Danger
    2. Add code to generates list of file names from the options
    3. Add code to filter warning issues based on file names list generate above.

    @el-hoshino @novr let me know if this falls outside the vision/scope for this plugin.

    The Primary use case is for legacy projects which may already have a large number of warnings and maintainer don't have bandwidth to clean up all of them in one go. I am trying to use this plugin for one such project.

    This is Draft of the feature for discussion purposes. i'll refine the code based on PR comments

    enhancement 
    opened by theScud 3
  • Feature/initial

    Feature/initial

    Very first implementation.

    Done:

    • [x] Build result comment
    • [x] Test result comment
    • [x] README

    TBD in other PRs:

    • [ ] Test coverage comment
    • [ ] Unit tests
    opened by el-hoshino 1
  • Adding support for posting test coverage

    Adding support for posting test coverage

    Hey @el-hoshino are you already woking on this or can i take a crack at this ?

    Just to make sure we are on the same page , these are the Feature Requirements based on what i have seen in https://github.com/f-meloni/danger-swift-coverage

    1. use xccov via XCResult to read code coverage data from xcresult bundle
    2. give option for user to warn or fail build if coverage isn't found
    3. add option filter out (ignore) code coverage for specific targets ie: test or pods coverage
    4. add option to filter and post coverage for changed files. - TBD
    enhancement 
    opened by theScud 8
Releases(v0.1.1)
  • v0.1.1(Aug 22, 2022)

    What's Changed

    • Feature/test coverage by @el-hoshino in https://github.com/yumemi-inc/danger-swift-kantoku/pull/2
    • Adds filter Options for warnings similar to swift lint in danger by @theScud in https://github.com/yumemi-inc/danger-swift-kantoku/pull/3

    New Contributors

    • @theScud made their first contribution in https://github.com/yumemi-inc/danger-swift-kantoku/pull/3

    Full Changelog: https://github.com/yumemi-inc/danger-swift-kantoku/compare/v0.1.0...v0.1.1

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Feb 21, 2022)

Owner
YUMEMI Inc.
YUMEMI Inc.
Butterfly is a lightweight library for integrating bug-report and feedback features with shake-motion event.

Butterfly is a lightweight library for integrating bug-report and feedback features with shake-motion event. Goals of this project One of th

Zigii Wong 410 Sep 9, 2022
Automatically set your keyboard's backlight based on your Mac's ambient light sensor.

QMK Ambient Backlight Automatically set your keyboard's backlight based on your Mac's ambient light sensor. Compatibility macOS Big Sur or later, a Ma

Karl Shea 29 Aug 6, 2022
LibAuthentication will simplify your code when if you want to use FaceID/TouchID in your tweaks.

LibAuthentication will simplify your code when if you want to use FaceID/TouchID in your tweaks.

Maximehip 6 Oct 3, 2022
RNH Tracker is a GPS logger for iOS (iPhone, iPad, iPod) Track your location and send your logs to RNH Regatta :-)

RNH Tracker for iOS + WatchOS RNH Tracker is a GPS logger for iOS (iPhone, iPad, iPod) with offline map cache support. Track your location, add waypoi

Ed Cafferata 0 Jan 23, 2022
Record your position and export your trip in GPX with GPS Stone on iOS.

GPS Stone Register your trips and export them as GPX files. Notes We currently have included a UIRequiredDeviceCapabilities with a location-services v

Frost Land 11 Sep 24, 2022
A handy collection of more than 500 native Swift extensions to boost your productivity.

SwifterSwift is a collection of over 500 native Swift extensions, with handy methods, syntactic sugar, and performance improvements for wide range of

SwifterSwift 12k Jan 7, 2023
A utility that reminds your iPhone app's users to review the app written in pure Swift.

SwiftRater SwiftRater is a class that you can drop into any iPhone app that will help remind your users to review your app on the App Store/in your ap

Takeshi Fujiki 289 Dec 12, 2022
Useful Swift code samples, extensions, functionalities and scripts to cherry-pick and use in your projects

SwiftyPick ?? ?? Useful Swift code samples, extensions, functionalities and scripts to cherry-pick and use in your projects. Purpose The idea behind t

Manu Herrera 19 May 12, 2022
GenStore is a lightweight swift code generator for your resources.

GenStore is a lightweight swift code generator for your resources. GenStore can create classes for your images, colors and localized strings.

null 11 Oct 23, 2021
Framework for easily parsing your JSON data directly to Swift object.

Server sends the all JSON data in black and white format i.e. its all strings & we make hard efforts to typecast them into their respective datatypes

Mukesh 11 Oct 17, 2022