Danger plugin to validate Markdown files
You can use a "full SPM" solution to install both danger-swift
and DangerSwiftProse
.
- 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/DangerSwiftProse", from: "0.1.0") // dev
...
],
targets: [
.target(name: "DangerDependencies", dependencies: ["Danger", "DangerSwiftProse"]), // dev
...
]
)
- Add the correct import to your
Dangerfile.swift
:
import DangerSwiftProse
MdspellCheck.performSpellCheck(ignoredWords: [], language: "en-us")
- Create a folder called
DangerDependencies
onSources
with an empty file inside like Fake.swift - To run
Danger
useswift 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.
- Add this to your
Dangerfile.swift
import DangerSwiftProse // package: https://github.com/f-meloni/danger-swift-prose.git
MdspellCheck.performSpellCheck(ignoredWords: [], language: "en-us")
- (Recommended) Cache the
~/.danger-swift
folder
Add to your Dangerfile This uses the orta's fork of mdspell
MdspellCheck.performSpellCheck(ignoredWords: [], language: "en-us")
Add to your Dangerfile
Proselint.performSpellCheck()