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
28 changes: 20 additions & 8 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
# Sometimes it's a README fix, or something like that - which isn't relevant for
# including in a project's CHANGELOG for example
# Adapted from https://github.com/capistrano/danger/blob/master/Dangerfile
# Q: What is a Dangerfile, anyway? A: See http://danger.systems/

# ------------------------------------------------------------------------------
# Additional pull request data
# ------------------------------------------------------------------------------
pr_number = github.pr_json["number"]
pr_url = github.pr_json["_links"]["html"]["href"]
# Sometimes its a README fix, or something like that - which isn't relevant for
# including in a CHANGELOG for example
declared_trivial = github.pr_title.include? "#trivial"

# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
# Just to let people know
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"

# Warn when there is a big PR
warn("Big PR") if git.lines_of_code > 500
# Ensure a clean commits history
if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ }
fail('Please rebase to get rid of the merge commits in this PR')
end

commit_lint.check

lgtm.check_lgtm

# Don't let testing shortcuts get into master by accident
fail("fdescribe left in tests") if `grep -r fdescribe specs/ `.length > 1
fail("fit left in tests") if `grep -r fit specs/ `.length > 1
the_coding_love.random
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
source "https://rubygems.org"

gem "danger"
gem "danger-commit_lint"
gem "danger-lgtm"
gem "danger-the_coding_love"
15 changes: 15 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,26 @@ GEM
kramdown (~> 1.5)
octokit (~> 4.7)
terminal-table (~> 1)
danger-commit_lint (0.0.6)
danger (~> 5.0)
danger-lgtm (0.2.0)
danger-plugin-api (~> 1.0)
danger-plugin-api (1.0.0)
danger (> 2.0)
danger-the_coding_love (0.0.4)
danger-plugin-api (~> 1.0)
nokogiri
faraday (0.12.2)
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.1)
faraday (~> 0.8)
git (1.3.0)
kramdown (1.14.0)
mini_portile2 (2.2.0)
multipart-post (2.0.0)
nap (1.1.0)
nokogiri (1.8.0)
mini_portile2 (~> 2.2.0)
octokit (4.7.0)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
Expand All @@ -46,6 +58,9 @@ PLATFORMS

DEPENDENCIES
danger
danger-commit_lint
danger-lgtm
danger-the_coding_love

BUNDLED WITH
1.14.4
6 changes: 5 additions & 1 deletion hello_world.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#include <cstdlib>
#include <iostream>

std::string message() {
return "Hello, Danger world!";
}

int main() {
std::cout << "Hello, Danger world!" << std::endl;
std::cout << message() << std::endl;
return EXIT_SUCCESS;
}