danger-prose icon indicating copy to clipboard operation
danger-prose copied to clipboard

Run Danger-prose over diffs, not modified files?

Open suchow opened this issue 7 years ago • 1 comments

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, https://github.com/amperser/proselint/pull/609#issuecomment-243230415. 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.

suchow avatar Aug 29 '16 19:08 suchow