Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,15 @@
"code",
"ideas"
]
},
{
"login": "mlaco",
"name": "Morgan",
"avatar_url": "https://avatars2.githubusercontent.com/u/4466642?v=4",
"profile": "http://morganlaco.com",
"contributions": [
"doc"
]
}
]
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ before_script:
- tsc
script:
- 'npm run test:ci'
- yarn danger
- yarn danger ci
after_success:
- './node_modules/.bin/jest --coverage && cat ./coverage/lcov.info | ./node_modules/.bin/codecov'
notifications:
Expand Down
25 changes: 23 additions & 2 deletions .vscode/cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,44 @@
"language": "en",
// words - list of words to be always considered correct
"words": [
"ava",
"callsite",
"checkmark",
"clis",
"codecov",
"configs",
"docsify",
"envinfo",
"execa",
"gitignore",
"gluegun",
"gluegun's",
"heartpulse",
"infinite.red",
"macos",
"newclear",
"npmignore",
"Plugin",
"Plugins",
"PRs",
"roadmap",
"shipit",
"snapupdate",
"specs",
"tada",
"tempy",
"updtr"
"updtr",
"PRs",
"e.g.",
"async",
"color",
"v1"
],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": []
"flagWords": [
"Github",
"Cocoapods"
]
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@ The MIT License (MIT). Please see [License File](LICENSE) for more information.

### NPM Details
[![NPM](https://nodei.co/npm/solidarity.png)](https://npmjs.org/package/solidarity)

11 changes: 8 additions & 3 deletions dangerfile.js → dangerfile.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { message, danger, warn, schedule } from 'danger'
import { danger, warn, schedule } from 'danger'
// can't use import in JS
const spellcheck = require('danger-plugin-spellcheck').default
const JSON5 = require('json5')
const fs = require('fs')

// warn('Big ol mean warning')
const whitelistWords = JSON5.parse(fs.readFileSync('./.vscode/cSpell.json')).words
// let's spellcheck
schedule(spellcheck())
schedule(spellcheck({
ignore: whitelistWords.map(word => word.toLowerCase()),
whitelistFiles: ['docs/existingContributors.md']
}))

// Enforce yarn.lock updates
const packageChanged = danger.git.modified_files.includes('package.json')
Expand Down
4 changes: 2 additions & 2 deletions docs/contributorsGuide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# How do I get started contributing?

## A moment before you start contributing
Be sure to mention that you're going to take on a task on the designated issue [on Github](https://github.com/infinitered/solidarity/issues). If there is no issue on Github, please create one first. This will limit the number of people who accidentally create PRs that do not fit the roadmap of the tool
Be sure to mention that you're going to take on a task on the designated issue [on GitHub](https://github.com/infinitered/solidarity/issues). If there is no issue on GitHub, please create one first. This will limit the number of people who accidentally create PRs that do not fit the roadmap of the tool

## Running Locally
To test this project, you'll need to pull it down and configure your local system to run the development version of Solidarity. We've made this as simple as possible!
Expand Down Expand Up @@ -55,7 +55,7 @@ Here's a friendly checklist for submitting your PR
1. Update docs with details of changes to the interface. This includes public interfaces, file locations, or changes in parameters.
1. Make sure you have tests covering your new or changed functionality.
1. Make sure `yarn test` passes. Otherwise, your PR cannot be merged.
1. Reference your Gihub issue in your final PR
1. Reference your GitHub issue in your final PR

## Changing or Adding Rules
The system is tightly coupled to the existing rules, so making any new rules have a large impact on the existing contract and its enforcement. Note that you have identified the following have changed in accordance.
Expand Down
3 changes: 2 additions & 1 deletion docs/existingContributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
| [<img src="https://avatars0.githubusercontent.com/u/997157?v=4" width="150px;"/><br /><sub><b>Gant Laborde</b></sub>](http://gantlaborde.com/)<br />[📝](#blog-GantMan "Blogposts") [💻](https://github.com/infinitered/solidarity/commits?author=GantMan "Code") [🤔](#ideas-GantMan "Ideas, Planning, & Feedback") [🔌](#plugin-GantMan "Plugin/utility libraries") [⚠️](https://github.com/infinitered/solidarity/commits?author=GantMan "Tests") [📖](https://github.com/infinitered/solidarity/commits?author=GantMan "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1771152?v=4" width="150px;"/><br /><sub><b>Kevin VanGelder</b></sub>](https://www.infinite.red)<br />[💻](https://github.com/infinitered/solidarity/commits?author=kevinvangelder "Code") [⚠️](https://github.com/infinitered/solidarity/commits?author=kevinvangelder "Tests") [👀](#review-kevinvangelder "Reviewed Pull Requests") [🚇](#infra-kevinvangelder "Infrastructure (Hosting, Build-Tools, etc)") | [<img src="https://avatars3.githubusercontent.com/u/6240043?v=4" width="150px;"/><br /><sub><b>Matt Thompson</b></sub>](http://thompsonportfolio.herokuapp.com/)<br />[💻](https://github.com/infinitered/solidarity/commits?author=mattathompson "Code") [⚠️](https://github.com/infinitered/solidarity/commits?author=mattathompson "Tests") [📖](https://github.com/infinitered/solidarity/commits?author=mattathompson "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/68273?v=4" width="150px;"/><br /><sub><b>Steve Kellock</b></sub>](https://github.com/skellock)<br />[🤔](#ideas-skellock "Ideas, Planning, & Feedback") [💻](https://github.com/infinitered/solidarity/commits?author=skellock "Code") | [<img src="https://avatars0.githubusercontent.com/u/27202?v=4" width="150px;"/><br /><sub><b>Timo Sand</b></sub>](http://timosand.com)<br />[🚇](#infra-deiga "Infrastructure (Hosting, Build-Tools, etc)") | [<img src="https://avatars3.githubusercontent.com/u/3494509?v=4" width="150px;"/><br /><sub><b>AJ Robertson</b></sub>](http://codeithuman.com)<br />[📖](https://github.com/infinitered/solidarity/commits?author=codeithuman "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/7246784?v=4" width="150px;"/><br /><sub><b>Joko Susilo</b></sub>](https://github.com/jokosu10)<br />[📖](https://github.com/infinitered/solidarity/commits?author=jokosu10 "Documentation") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars3.githubusercontent.com/u/11984923?v=4" width="150px;"/><br /><sub><b>Campion Fellin</b></sub>](https://github.com/campionfellin)<br />[📖](https://github.com/infinitered/solidarity/commits?author=campionfellin "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/4777393?v=4" width="150px;"/><br /><sub><b>Sia</b></sub>](http://www.clioandcalliope.com/)<br />[💻](https://github.com/infinitered/solidarity/commits?author=siakaramalegos "Code") | [<img src="https://avatars2.githubusercontent.com/u/14152125?v=4" width="150px;"/><br /><sub><b>dduncan</b></sub>](https://github.com/ddncn)<br />[📖](https://github.com/infinitered/solidarity/commits?author=ddncn "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/4968754?v=4" width="150px;"/><br /><sub><b>Brandon Dean</b></sub>](https://github.com/thedeany)<br />[📖](https://github.com/infinitered/solidarity/commits?author=thedeany "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/25131978?v=4" width="150px;"/><br /><sub><b>Grigori</b></sub>](https://github.com/grigori-gru)<br />[📖](https://github.com/infinitered/solidarity/commits?author=grigori-gru "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/3335740?v=4" width="150px;"/><br /><sub><b>Imran Brown</b></sub>](http://www.imranbrown.com)<br />[📖](https://github.com/infinitered/solidarity/commits?author=rmnegatives "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/7189823?v=4" width="150px;"/><br /><sub><b>Nicolas Charpentier</b></sub>](https://github.com/charpeni)<br />[🚇](#infra-charpeni "Infrastructure (Hosting, Build-Tools, etc)") |
| [<img src="https://avatars1.githubusercontent.com/u/94960?v=4" width="150px;"/><br /><sub><b>Will Raxworthy</b></sub>](https://github.com/willrax)<br />[🔌](#plugin-willrax "Plugin/utility libraries") | [<img src="https://avatars2.githubusercontent.com/u/5314500?v=4" width="150px;"/><br /><sub><b>Markus Mikonsaari</b></sub>](https://github.com/Mknsri)<br />[💻](https://github.com/infinitered/solidarity/commits?author=Mknsri "Code") | [<img src="https://avatars2.githubusercontent.com/u/1304862?v=4" width="150px;"/><br /><sub><b>Bnaya Peretz</b></sub>](https://github.com/Bnaya)<br />[⚠️](https://github.com/infinitered/solidarity/commits?author=Bnaya "Tests") | [<img src="https://avatars2.githubusercontent.com/u/713658?v=4" width="150px;"/><br /><sub><b>Christian Johannessen</b></sub>](https://github.com/ceejtron)<br />[💻](https://github.com/infinitered/solidarity/commits?author=ceejtron "Code") [⚠️](https://github.com/infinitered/solidarity/commits?author=ceejtron "Tests") | [<img src="https://avatars3.githubusercontent.com/u/17892823?v=4" width="150px;"/><br /><sub><b>Jenna Fucci</b></sub>](https://github.com/JenFucci)<br />[🎨](#design-JenFucci "Design") | [<img src="https://avatars1.githubusercontent.com/u/2925048?v=4" width="150px;"/><br /><sub><b>Trevor Brindle</b></sub>](http://trevorbrindle.com)<br />[💻](https://github.com/infinitered/solidarity/commits?author=tabrindle "Code") [🤔](#ideas-tabrindle "Ideas, Planning, & Feedback") |
| [<img src="https://avatars1.githubusercontent.com/u/94960?v=4" width="150px;"/><br /><sub><b>Will Raxworthy</b></sub>](https://github.com/willrax)<br />[🔌](#plugin-willrax "Plugin/utility libraries") | [<img src="https://avatars2.githubusercontent.com/u/5314500?v=4" width="150px;"/><br /><sub><b>Markus Mikonsaari</b></sub>](https://github.com/Mknsri)<br />[💻](https://github.com/infinitered/solidarity/commits?author=Mknsri "Code") | [<img src="https://avatars2.githubusercontent.com/u/1304862?v=4" width="150px;"/><br /><sub><b>Bnaya Peretz</b></sub>](https://github.com/Bnaya)<br />[⚠️](https://github.com/infinitered/solidarity/commits?author=Bnaya "Tests") | [<img src="https://avatars2.githubusercontent.com/u/713658?v=4" width="150px;"/><br /><sub><b>Christian Johannessen</b></sub>](https://github.com/ceejtron)<br />[💻](https://github.com/infinitered/solidarity/commits?author=ceejtron "Code") [⚠️](https://github.com/infinitered/solidarity/commits?author=ceejtron "Tests") | [<img src="https://avatars3.githubusercontent.com/u/17892823?v=4" width="150px;"/><br /><sub><b>Jenna Fucci</b></sub>](https://github.com/JenFucci)<br />[🎨](#design-JenFucci "Design") | [<img src="https://avatars1.githubusercontent.com/u/2925048?v=4" width="150px;"/><br /><sub><b>Trevor Brindle</b></sub>](http://trevorbrindle.com)<br />[💻](https://github.com/infinitered/solidarity/commits?author=tabrindle "Code") [🤔](#ideas-tabrindle "Ideas, Planning, & Feedback") | [<img src="https://avatars2.githubusercontent.com/u/4466642?v=4" width="150px;"/><br /><sub><b>Morgan</b></sub>](http://morganlaco.com)<br />[📖](https://github.com/infinitered/solidarity/commits?author=mlaco "Documentation") |
<!-- ALL-CONTRIBUTORS-LIST:END -->

Thanks so much to everyone who takes time from their day to support Open Source!
8 changes: 4 additions & 4 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,21 @@ Lastly, if output has multiple versions, you can identify the index of the versi
`dir` (or `directory`) rule means for a given directory passed in the `location` property, we will verify it exists.

### Shell Rules
`shell` allows you to run a shell command and match some expected output from it's output. This is useful for
`shell` allows you to run a shell command and match some expected output from it's output. This is useful for

*e.g.* This checks to see if you have configured git with your email address.
```json
"git email": [{
"git email": [{
"rule": "shell",
"command": "git config user.email",
"command": "git config user.email",
"match": ".+@.+"
}]
```

### Friendly Errors
So what do we do if a rule fails? The return code will be non-zero, but that's not the most friendly option. You can set the `error` for any rule to give the user legible instruction on why the failure happened, and how they should solve it.

*e.g.* Prompt them to install the missing cli
*e.g.* Prompt them to install the missing CLI
```json
"Watchman": [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ module.exports = (context) => {
```

## Got questions?
We're hanging around on [Infinite Red Community Slack](http://community.infinite.red), so you can hop in and chat with us. Lots of our open source is discussed throughout this slack. If you end up needing advanced attention, we are a consulting company, so we offer Premium support, too. Email us at [email protected] to get that ball rolling with your project.
We're available on [Infinite Red Community Slack](http://community.infinite.red), so you can hop in and chat with us. Lots of our open source is discussed throughout this slack. If you end up needing advanced attention, we are a consulting company, so we offer Premium support, too. Email us at [email protected] to get that ball rolling with your project.
21 changes: 10 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"babel-eslint": "8.0.3",
"codecov.io": "^0.1.6",
"coveralls": "^3.0.0",
"danger": "2.1.6",
"danger-plugin-spellcheck": "^1.2.0",
"danger": "^3.0.0",
"danger-plugin-spellcheck": "^1.2.2",
"docsify-cli": "4.1.12",
"execa": "^0.8.0",
"jest": "^21.2.1",
Expand Down
2 changes: 1 addition & 1 deletion spellcheck.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"ignore": ["orta", "artsy", "github", "/danger-*.", "/plugin[s]?", "specs", "infinite.red"],
"ignore": ["orta", "artsy", "github", "/danger-*.", "/plugin[s]?", "Node.js"],
"whitelistFiles": []
}
30 changes: 16 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -705,12 +705,13 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"

babel-polyfill@7.0.0-alpha.19:
version "7.0.0-alpha.19"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-7.0.0-alpha.19.tgz#546aabf80c92f4e9314176a64458a6258e5970de"
babel-polyfill@^6.23.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
dependencies:
core-js "^2.4.0"
regenerator-runtime "^0.10.0"
babel-runtime "^6.26.0"
core-js "^2.5.0"
regenerator-runtime "^0.10.5"

babel-preset-jest@^21.2.0:
version "21.2.0"
Expand Down Expand Up @@ -1429,26 +1430,27 @@ currently-unhandled@^0.4.1:
dependencies:
array-find-index "^1.0.1"

danger-plugin-spellcheck@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/danger-plugin-spellcheck/-/danger-plugin-spellcheck-1.2.0.tgz#3fac5e7ef4415b9a6078a60774473d633f83ae3f"
danger-plugin-spellcheck@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/danger-plugin-spellcheck/-/danger-plugin-spellcheck-1.2.2.tgz#34bd152829bfe1952b9380df67961b8741b1969f"
dependencies:
markdown-spellcheck "^0.11.0"
optionalDependencies:
esdoc "^0.5.2"

danger@2.1.6:
version "2.1.6"
resolved "https://registry.yarnpkg.com/danger/-/danger-2.1.6.tgz#ea4b3024cbef422286dc6bdb4d23da132d8ebbe5"
danger@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/danger/-/danger-3.0.0.tgz#acbe2134132ab72cbfec3be1c8c4825b7745e202"
dependencies:
babel-polyfill "7.0.0-alpha.19"
babel-polyfill "^6.23.0"
chalk "^2.3.0"
commander "^2.12.2"
debug "^3.1.0"
get-stdin "^5.0.1"
github "^13.0.1"
hyperlinker "^1.0.0"
jsome "^2.3.25"
json5 "^0.5.1"
jsonpointer "^4.0.1"
lodash.find "^4.6.0"
lodash.includes "^4.3.0"
Expand Down Expand Up @@ -5128,7 +5130,7 @@ redent@^2.0.0:
indent-string "^3.0.0"
strip-indent "^2.0.0"

regenerator-runtime@^0.10.0:
regenerator-runtime@^0.10.5:
version "0.10.5"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658"

Expand Down Expand Up @@ -6246,7 +6248,7 @@ [email protected]:
core-util-is "1.0.2"
extsprintf "^1.2.0"

vm2@patriksimek/vm2#custom_files:
"vm2@github:patriksimek/vm2#custom_files":
version "3.5.0"
resolved "https://codeload.github.com/patriksimek/vm2/tar.gz/7e82f90ac705fc44fad044147cb0df09b4c79a57"

Expand Down