Taqtile Danger-js Plugin
- Use correct node version (from
.nvmrc file)
$ nvm use(If any error is found, install correct node versio via $ nvm install)
- Install correct yarn version
$ npm install -g yarn@`node -pe "require('./package.json').engines.yarn"`Install dependencies
$ yarn installAdd your rules to src/rules folder and its respective tests.
When adding new rules, please follow current scope files for pr, nodejs, android, etc or create a new one in case your rule does not fit in any of the existing ones.
Also, check Danger's guide on Phrasing to understand how to better use error messages to provide an impartial but polite feedback.
- Fail when no description is provided
- Warns if description provided is too short
- Big PRs
-
>>>Strings to make sure rebase was successful - Warn when
Dangerfilewas modified - Warn when
http://is used - Warn when definition files were changes but their lockfile weren't:
GemfilevsGemfile.lockpackage.jsonvsyarn.lock
- Warn if some files/folders were changed/committed:
Dangerfile.gitignoreGemfileGemfile.lock.travis.ymlcoverage
- Warn when
npm install -gis used - Warn when
console.logis added - Warn when
package.jsonwas modified andyarn.lockorshrinkwrapwas not - Warn if node version is different between .travis.yml, .nvmrc, package.json and README (or just warn if node version has change just in one of these locations)
- At packages.json every package should have its version fixed (do not use ^ or ~), or explicitly set the major and minor versions (ie.: 1.2.x)
- [TypeScript] Warn if using
<any>as return type. - Warn if some files/folders were changed/committed:
npm-debug.logyarn-error.logdocker-compose.ymltslint.jsontsconfig.json.nvmrcProcfilenpm-shrinkwrap.json.env.env.test.env.sampleenv.coffeenodemon.json
- Warn if some files/folders to be changed/committed like
Cakefile,settings.yml.erb,Fastfile - Warn when
Podfilewas modified andPodfile.lockwas not - Warn when ATS Exception is set in plist
- Warn when Landscape orientation is set in plist
- Warn when pod is being loaded from external git repos
- Warn if Podfile has pods should not using fixed versions
- [Swift] Warn if forced unwrapping was found
- Warn if there are hardcoded dimens different from
0dpon.xmlfiles - Warn if there are hardcoded colors on
.xmlfiles - Warn if there are hardcoded texts on
.xmlfiles - [Kotlin] Error when
!!is found (similar to swift forced unwrap whenanything!is found) - [Kotlin] Warn if using
AnyorAny?as return type - [Kotlin] Warn if
ButterKnifeorfindViewByIdare found - Warn if some files/folders were changed/committed:
Manifest.xml.gradle
- Warn if CSS files were changed
- (Platform/Language agnostic) Warn when Amazon Secret Key is hardcoded
- (iOS) Warn if changes made in Cakefile may 'break' provisionings and sign certificates configurations
- (iOS) Warn when Facebook ID is hardcoded in plist
- (iOS) Warn when
TODOis added - (iOS) Warn when
print(“”)is added - (iOS) Warn when
fatalErroris added - (iOS) Warn if hardcoded font is used in
.xib - (iOS) Warn if hardcoded color is used in
.xib
Install:
yarn add taqtile-dangerjs-plugin --devAt a glance:
// dangerfile.js
import { schedule } from 'danger'
import taqtileDangerjsPlugin from 'taqtile-dangerjs-plugin'
schedule(async() => {
await taqtileDangerjsPlugin();
})Install:
yarn add taqtile-dangerjs-plugin --devAdd plugin module to json settings:
"settings": {
"modules": ["taqtile-dangerjs-plugin"]
},Use it in any peril dangerfile
// dangerfile.js
import { schedule } from 'danger'
import taqtileDangerjsPlugin from 'taqtile-dangerjs-plugin'
schedule(async() => {
await taqtileDangerjsPlugin();
})See the GitHub release history.
See CONTRIBUTING.md.