All Projects → f-meloni → danger-swift-xcodesummary

f-meloni / danger-swift-xcodesummary

Licence: other
A Danger-Swift plugin that adds build errors, warnings and unit tests results generated from xcodebuild to your Danger report

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to danger-swift-xcodesummary

xcbeautify
A little beautifier tool for xcodebuild
Stars: ✭ 687 (+854.17%)
Mutual labels:  swift-package-manager, xcodebuild, xcpretty
SupportEmail
Pre-populates emails with support information in iOS/iPadOS apps
Stars: ✭ 20 (-72.22%)
Mutual labels:  swift-package-manager, spm
swift-watch
Watches over your Swift project's source
Stars: ✭ 43 (-40.28%)
Mutual labels:  swift-package-manager, spm
SwiftDown
📦 A themable markdown editor component for your SwiftUI apps.
Stars: ✭ 203 (+181.94%)
Mutual labels:  swift-package-manager, spm
Jest Allure
Generate Allure Report for jest. Allure Report, a flexible lightweight multi-language test report tool with the possibility to add steps, attachments, parameters and so on.
Stars: ✭ 90 (+25%)
Mutual labels:  reporting, tests
extensions-kit
📦 Collection of Swift+Apple Frameworks extensions for speeding up software development [iOS & iPadOS].
Stars: ✭ 71 (-1.39%)
Mutual labels:  swift-package-manager, spm
Table
CLI tables in Swift
Stars: ✭ 53 (-26.39%)
Mutual labels:  swift-package-manager, spm
Aksidemenu
Beautiful iOS side menu library with parallax effect. Written in Swift
Stars: ✭ 216 (+200%)
Mutual labels:  swift-package-manager, spm
SwiftZip
Swift wrapper for libzip — library for reading, creating, and modifying zip archives.
Stars: ✭ 44 (-38.89%)
Mutual labels:  swift-package-manager, spm
danger-flutter lint
A Danger Plugin to lint dart files using flutter analyze command line interface.
Stars: ✭ 28 (-61.11%)
Mutual labels:  danger, danger-plugin
PagedLists
Paginated UITableView and UICollectionViews for iOS.
Stars: ✭ 69 (-4.17%)
Mutual labels:  swift-package-manager, spm
danger-auto label
Enable to set label automatically from Danger. This is made from Danger plugin.
Stars: ✭ 15 (-79.17%)
Mutual labels:  danger, danger-plugin
danger-plugin-flow
Ensure all JS files that get touched in a PR are flow typed
Stars: ✭ 23 (-68.06%)
Mutual labels:  danger, danger-plugin
ecs-demo
Minimal demo App for the Fireblade Entity-Component System (ECS)
Stars: ✭ 20 (-72.22%)
Mutual labels:  swift-package-manager, spm
danger-plugin-lint-report
No description or website provided.
Stars: ✭ 17 (-76.39%)
Mutual labels:  danger, danger-plugin
CSV
A simple CSV file parser and serializer
Stars: ✭ 31 (-56.94%)
Mutual labels:  swift-package-manager, spm
Expandable Collection View Kit
🗂 Expandable, hierarchical, flexible, declarative UICollectionView with diffable data sources & SwiftUI-like tree items builder [Swift 5.1, iOS & iPadOS 13].
Stars: ✭ 69 (-4.17%)
Mutual labels:  swift-package-manager, spm
Flexcolorpicker
Modern color picker library written in Swift 5 that can be easily extended and customized. It aims to provide great UX and performance with stable, quality code.
Stars: ✭ 164 (+127.78%)
Mutual labels:  swift-package-manager, spm
Match3Kit
Library for simple Match3 games.
Stars: ✭ 38 (-47.22%)
Mutual labels:  swift-package-manager, spm
danger-mention
Danger plugin to automatically mention potential reviewers on pull requests
Stars: ✭ 29 (-59.72%)
Mutual labels:  danger, danger-plugin

DangerXCodeSummary

A Danger-Swift plugin that adds build errors, warnings and unit tests results generated from xcodebuild to your Danger report

Inspired by danger-xcode_summary

DangerXCodeSummary

Getting Started

Install DangerSwiftCoverage

Swift Package Manager (More performant)

You can use a "full SPM" solution to install both danger-swift and DangerXCodeSummary.

  • Add to your Package.swift:
let package = Package(
    ...
    products: [
        ...
        .library(name: "DangerDeps", type: .dynamic, targets: ["DangerDependencies"]), // dev
        ...
    ],
    dependencies: [
        ...
        // Danger Plugins
        .package(url: "https://github.com/f-meloni/danger-swift-xcodesummary", from: "0.1.0") // dev
        ...
    ],
    targets: [
        .target(name: "DangerDependencies", dependencies: ["Danger", "DangerXCodeSummary"]), // dev
        ...
    ]
)
  • Add the correct import to your Dangerfile.swift:
import DangerXCodeSummary

let summary = XCodeSummary(filePath: "result.json")
  • Create a folder called DangerDependencies on Sources with an empty file inside like Fake.swift
  • To run Danger use swift run danger-swift command
  • (Recommended) If you are using SPM to distribute your framework, use Rocket, or similar to comment out all the dev depencencies from your Package.swift. This prevents the dev dependencies to be downloaded and compiled with your framework.

Marathon

  • Add this to your Dangerfile.swift
import DangerXCodeSummary // package: https://github.com/f-meloni/danger-swift-xcodesummary.git

let summary = XCodeSummary(filePath: "result.json")
  • (Recommended) Cache the ~/.danger-swift folder

Run with SPM

DangerXCodeSummary can be used with SPM (this repo uses it on the Linux CI), but at the moment, if you use SPM, falining tests inline messages are not generated. To generate the report run:

swift test | XCPRETTY_JSON_FILE_OUTPUT=result.json xcpretty -f `xcpretty-json-formatter`

Send report to Danger

summary.report()

Warning and Errors count

if summary.errorsCount > maxErrorCount {
  fail("There are more than \(maxErrorCount) errors"
}

if summary.warningsCount > maxWarningsCount {
  fail("There are more than \(maxWarningsCount) warnings"
}

Filtering results

Don't show warnings:

let summary = XCodeSummary(json: JSONFile.jsonObject(fromString: reportTestJSON), dsl: dsl, resultsFilter: { result in
    return result.category != .warning
})
summary.report()

Filter out any error or warning for a specific path:

let summary = XCodeSummary(json: JSONFile.jsonObject(fromString: warningsJSON), dsl: dsl, resultsFilter: { result in
    guard let file = result.file else { return true }
    return !file.contains("Sources/DangerXCodeSummary/")
})
summary.report()
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].