orta / danger-plugin-spellcheck Goto Github PK
View Code? Open in Web Editor NEWSpell checks any created or modified code or markdown files in a GitHub PR
License: MIT License
Spell checks any created or modified code or markdown files in a GitHub PR
License: MIT License
Hi guys,
First of all, congrats, thatβs a great plugin.
Iβm brazilian and we, brazilians, speak Portuguese. I tried to use this plugin on my codebase (which has a lot of Portuguese phrases) and danger was detecting it as miss spell words.
I saw that you use cspell under the hood. Is that any support for other languages rather than English?
Currently, this project does not seem to support Gitlab, due to the Github references in the code.
This leads to the following error:
Error: TypeError: Cannot read property 'thisPR' of
at getPRParams (/builds/livio.brunner.lb1/stranger-danger/node_modules/danger-plugin-spellcheck/dist/index.js:44:62)
at Object.<anonymous> (/builds/livio.brunner.lb1/stranger-danger/node_modules/danger-plugin-spellcheck/dist/index.js:93:20)
at Generator.next (<anonymous>)
at /builds/livio.brunner.lb1/stranger-danger/node_modules/danger-plugin-spellcheck/dist/index.js:7:71
at new Promise (<anonymous>)
at __awaiter (/builds/livio.brunner.lb1/stranger-danger/node_modules/danger-plugin-spellcheck/dist/index.js:3:12)
at Object.exports.getSpellcheckSettings (/builds/livio.brunner.lb1/stranger-danger/node_modules/danger-plugin-spellcheck/dist/index.js:82:46)
at /builds/livio.brunner.lb1/stranger-danger/node_modules/danger-plugin-spellcheck/dist/index.js:112:40
at Generator.next (<anonymous>)
at /builds/livio.brunner.lb1/stranger-danger/node_modules/danger-plugin-spellcheck/dist/index.js:7:71
Trying to implement danger spellcheck.
import { schedule } from 'danger'
import spellcheck from 'danger-plugin-spellcheck'
// let's spellcheck
schedule(spellcheck())
{
"ignore": ["orta", "artsy", "github", "/danger-*."],
"whitelistFiles": ["README.md"]
}
$ yarn danger -d dangerfile.ts
yarn run v1.3.2
$ /home/travis/build/infinitered/solidarity/node_modules/.bin/danger -d dangerfile.ts
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated
https://travis-ci.org/infinitered/solidarity/jobs/322670405
node module | version |
---|---|
"danger" | "^2.1.8" |
"danger-plugin-spellcheck" | "^1.2.0", |
Thought about it in artsy/peril-settings#18
π Hiya
First time with Danger JS, been working with it today.
Found 2 issues, which I have solutions for, they both might return to master as PRs, but I'm apparently stumped with my latest issue.
import { schedule } from 'danger'
// import spellcheck from 'danger-plugin-spellcheck'
// let's spellcheck
// schedule(spellcheck())
import { schedule } from 'danger'
import spellcheck from 'danger-plugin-spellcheck'
// let's spellcheck
// schedule(spellcheck())
Unexpected token import??? But but... we import on line 1 just fine.
If I switch this to a require
it will work, but the resulting const will not be a function.
What am I doing wrong?
I moved vscode spell checker, and added it to the omakase stack at Artsy. We should support that format by default.
Having a JSON file for the spellcheck is cool. Ideally, I would like to be able to append settings from my dangerfile.js so I could add ignore words from various places. I already have a spellchecked list of words for my editor, and it would be great to include that.
What's needed, is that we'd be able to add ignore and whitelist to the options of the spellcheck function. These would be merged by the spellcheck. Would you accept something like this?
This needs to be thought of from the perspective of Peril.
Peril for Artsy runs spellcheck on every repo. So there is a global settings file for all spellchecking referenced at launch.
Ideally we want to be able to merge that settings object with a per-repo object. So here's how I could imagine it to work:
Today this plugin downloads the global settings and merges them into the settings
Straight after this, there is a check for a file called spellcheck.json
inside the repo (on the right branch) ( const perRepoContents = await getFileContents("spellcheck.json", getPRParams(file))
)
These changes are then merged in with the existing settings - giving the change to add new whitelistedMarkdowns
files, and new words to the ignoredWords
section
This seems to be the offending line:
danger-plugin-spellcheck/src/index.ts
Line 233 in 2861b2e
I wouldn't have expected this to be an actual problem, except when I followed the link from microsoft/TypeScript-Website#1320 (comment) I got a 404 page.
Oh! It's a problem in that instance because there really is still a master branch lying around. Perhaps it ought to be renamed v1 ... still, might be a good idea to come up with a way for this plugin to actually link to the correct branch?
Can look to see if there's a centralized settings json, or the implicit spellcheck json being used #4 and offer a link to edit those JSON files.
CHANGELOGs probably don't need spell-checking. Too many issues with usernames.
Unexpected string in JSON at position 3058
SyntaxError: Unexpected string in JSON at position 3058
at JSON.parse (<anonymous>)
at Object.<anonymous> (/app/node_modules/danger-plugin-spellcheck/dist/index.js:51:31)
at Generator.next (<anonymous>)
at fulfilled (/app/node_modules/danger-plugin-spellcheck/dist/index.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
I've got danger and danger-plugin-spellcheck running through CircleCI and it is now able to post comments when there are errors in the README.md
.
It doesn't seem to be analyzing anything in my openapi.yml
file though, which is the main file I want checked.
I noticed there's a whitelistFiles
option, but that's to ignore certain files.
What can you do to specifically add a file to be evaluated?
Do you support yaml files?
Is there any way to compile this and use as <script> element?
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.