dbgrandi / danger-prose Goto Github PK
View Code? Open in Web Editor NEWDanger plugin to lint your blog posts with proselint
License: MIT License
Danger plugin to lint your blog posts with proselint
License: MIT License
Can you draft a new release to include the fix related to empty report?
I'm trying this on Drone CI using this configuration:
build:
prose-lint:
image: ruby:2.4
environment:
DANGER_GITHUB_API_TOKEN: $$BOT_GITHUB_TOKEN
commands:
- bundle install
- bundle exec danger
which simply specifies to run bundle install
and bundle exec danger
in the ruby:2.4
docker image.
The Gemfile looks like:
source "https://rubygems.org"
gem "danger"
gem "danger-prose"
and the Dangerfile is:
prose.check_spelling "posts/*.md"
This is the error I get:
$ bundle exec danger
[!] The exception involves the following plugins:
- danger-prose
bundler: failed to load command: danger (/usr/local/bundle/bin/danger)
Danger::DSLError:
[!] Invalid `Dangerfile` file: mdspell is not in the user's PATH, or it failed to install
# from Dangerfile:1
# -------------------------------------------
> prose.check_spelling "posts/*.md"
# -------------------------------------------
$ bundle install
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Fetching claide 1.0.1
Installing claide 1.0.1
Fetching colored2 3.1.2
Installing colored2 3.1.2
Fetching nap 1.1.0
Installing nap 1.1.0
Fetching open4 1.3.4
Installing open4 1.3.4
Fetching multipart-post 2.0.0
Installing multipart-post 2.0.0
Fetching git 1.3.0
Installing git 1.3.0
Fetching kramdown 1.13.2
Installing kramdown 1.13.2
Fetching public_suffix 2.0.5
Installing public_suffix 2.0.5
Fetching unicode-display_width 1.2.1
Installing unicode-display_width 1.2.1
Using bundler 1.15.0
Fetching cork 0.3.0
Installing cork 0.3.0
Fetching faraday 0.12.1
Installing faraday 0.12.1
Fetching addressable 2.5.1
Installing addressable 2.5.1
Fetching terminal-table 1.8.0
Installing terminal-table 1.8.0
Fetching claide-plugins 0.9.2
Installing claide-plugins 0.9.2
Fetching faraday-http-cache 1.3.1
Installing faraday-http-cache 1.3.1
Fetching sawyer 0.8.1
Installing sawyer 0.8.1
Fetching octokit 4.7.0
Installing octokit 4.7.0
Fetching danger 5.2.2
Installing danger 5.2.2
Fetching danger-prose 2.0.4
Installing danger-prose 2.0.4
Bundle complete! 2 Gemfile dependencies, 20 gems now installed.
Bundled gems are installed into /usr/local/bundle.
$ bundle exec danger
[!] The exception involves the following plugins:
- danger-prose
bundler: failed to load command: danger (/usr/local/bundle/bin/danger)
Danger::DSLError:
[!] Invalid `Dangerfile` file: mdspell is not in the user's PATH, or it failed to install
# from Dangerfile:1
# -------------------------------------------
> prose.check_spelling "posts/*.md"
# -------------------------------------------
/usr/local/bundle/gems/danger-prose-2.0.4/lib/danger_plugin.rb:120:in `check_spelling'
Dangerfile:1:in `block in parse'
/usr/local/bundle/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:199:in `eval'
/usr/local/bundle/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:199:in `block in parse'
/usr/local/bundle/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:195:in `instance_eval'
/usr/local/bundle/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:195:in `parse'
/usr/local/bundle/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:272:in `run'
/usr/local/bundle/gems/danger-5.2.2/lib/danger/danger_core/executor.rb:27:in `run'
/usr/local/bundle/gems/danger-5.2.2/lib/danger/commands/runner.rb:66:in `run'
/usr/local/bundle/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/usr/local/bundle/gems/danger-5.2.2/bin/danger:5:in `<top (required)>'
/usr/local/bundle/bin/danger:17:in `load'
/usr/local/bundle/bin/danger:17:in `<top (required)>'
Any idea of what may be causing the issue?
We had this funny false positive earlier today: a gender bias wanting to change mailman
to mail carrier
... except mailman
is part of a URL.
hey! i help maintain Moya, and we're noticing an issue on our CI that may be related to this plugin
it looks like
Cloning and building inline dependencies: import DangerSwiftProse // package: https://github.com/f-meloni/danger-swift-prose.git, import DangerXCodeSummary // package: https://github.com/f-meloni/danger-swift-xcodesummary.git, this might take some time.
Updating packages...
Using https://github.com/f-meloni/danger-swift-prose.git latest major:1
Updating packages...
Using https://github.com/f-meloni/danger-swift-xcodesummary.git latest major:1
Updating packages...
Failing the build, there are 19 fails.
Request failed [422]: https://api.github.com/repos/Moya/Moya/pulls/2120/comments
Response: {
"message": "Validation Failed",
"errors": [
{
"resource": "PullRequestReviewComment",
"code": "invalid",
"field": "position"
}
],
"documentation_url": "https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request"
}
we've noticed on repeated runs of this PR Moya/Moya#2120, and potentially now in our development
branch now that we've merged the PR. before we dug deeper into it, i thought we'd check with y'all to see if you grok it, have seen it before, or know how to fix it?
i really appreciate all your work on this tool!
Just added this to my blog https://github.com/esttorhe/esttorhe.github.io with Danger
and noticed that the plugin was choking when the files had spaces and or some special characters.
Looking at something like artsy/artsy.github.io#247
We have: LAI, Redux, WebSocket, Akka all turning up many times, I think we should add a bool that checks to see if that word has turned up enough times that it can be ignored - and assumed correct.
This was working fine before, but seems to be failing for some reason at this point over at Swift Weekly Brief. Any idea as to what causes this?
Dangerfile: https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/Dangerfile
Gemfile: https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/Gemfile
Gemfile.lock: https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/Gemfile.lock
Danger versions:
danger (5.3.2)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (~> 0.9)
faraday-http-cache (~> 1.0)
git (~> 1)
kramdown (~> 1.5)
octokit (~> 4.2)
terminal-table (~> 1)
danger-prose (2.0.4)
danger
Make this a default option: https://github.com/lukeapage/node-markdown-spellcheck/blob/master/es6/cli.js#L19
It seems that this plugin runs over the entire modified file, including text that was merged in previous commits but which is not modified in the PR under consideration. See, for example, amperser/proselint#609 (comment). Though these suggestions are valid, they are not not relevant to the PR and thus should not be included.
Fixing this issue is complicated because it requires determining which errors raised can be attributed to the PR. One possible solution is to run the prose linters twice, once over the proposed text and once over the original text. Any error that is flagged in the former that did not appear in the latter can be attributed to the proposed change. A second possible solution is to attribute to the PR any error that appears on a modified line. This will falsely flag existing errors that are adjacent to changes, but is a step in the right direction.
Nice work with this Danger plugin! I'll be using it on Proselint's GitHub repo soon (amperser/proselint#546).
Question βΒ is it possible to use this to run Proselint over commit messages?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.