Skip to content

Instantly share code, notes, and snippets.

View albertmiro's full-sized avatar
💻
> git reset --hard 43e2f9

Albert Miró albertmiro

💻
> git reset --hard 43e2f9
View GitHub Profile
message("Hello World!")
$ bundle exec danger init
@albertmiro
albertmiro / bundler init
Created January 16, 2019 22:03
Creates Gemfile
$ bundler init
$ bundle install
source "https://rubygems.org"
gem 'danger'
@albertmiro
albertmiro / install bundler
Created January 16, 2019 21:55
install bundler
$ gem install bundler
@albertmiro
albertmiro / .travis.yml
Created January 12, 2019 15:18
Things to add at .travis.yml file
before_install:
...
- bundle install
install:
...
# Run lint checks reports for Danger
- ./gradlew runChecksForDanger
# Run Danger
- bundle exec danger
@albertmiro
albertmiro / Gemfile
Created January 12, 2019 15:11
GemFile with Danger
source "https://rubygems.org"
...
gem 'danger'
gem "danger-checkstyle_format"
gem 'danger-android_lint'
@albertmiro
albertmiro / DangerFile
Created January 12, 2019 15:08
DangerFile example with Lint enabled
## METHODS DECLARATION ##
def checkForFileAndroid(file)
ext = File.extname(file)
case ext
# Warn when a file .gradle is modified
when ".gradle"
message("`#{file}` was modified")
end
# Warn when a FileManifest.xml is modified
message("`#{file}` was modified") if file =~ /AndroidManifest\.xml/