Skip to content

Commit b5acfb3

Browse files
committed
Get repo ready
1 parent 80444ac commit b5acfb3

File tree

5 files changed

+108
-0
lines changed

5 files changed

+108
-0
lines changed

Dangerfile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Adapted from https://github.com/capistrano/danger/blob/master/Dangerfile
2+
# Q: What is a Dangerfile, anyway? A: See http://danger.systems/
3+
4+
# ------------------------------------------------------------------------------
5+
# Additional pull request data
6+
# ------------------------------------------------------------------------------
7+
pr_number = github.pr_json["number"]
8+
pr_url = github.pr_json["_links"]["html"]["href"]
9+
# Sometimes its a README fix, or something like that - which isn't relevant for
10+
# including in a CHANGELOG for example
11+
declared_trivial = github.pr_title.include? "#trivial"
12+
13+
# Just to let people know
14+
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"
15+
16+
# Ensure a clean commits history
17+
if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ }
18+
fail('Please rebase to get rid of the merge commits in this PR')
19+
end
20+
21+
code_style_validation.check file_extensions: ['.hpp', '.cpp', '.h', '.cc']
22+
23+
commit_lint.check
24+
25+
lgtm.check_lgtm

Gemfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
source "https://rubygems.org"
3+
4+
gem "danger"
5+
gem 'danger-code_style_validation', :git => 'https://github.com/robertodr/danger-code_style_validation.git', :branch => 'yapf'

Gemfile.lock

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
GIT
2+
remote: https://github.com/robertodr/danger-code_style_validation.git
3+
revision: c5041a93b0e29957f6a26167164fcd320c88cf8b
4+
branch: yapf
5+
specs:
6+
danger-code_style_validation (0.1.0)
7+
danger-plugin-api (~> 1.0)
8+
9+
GEM
10+
remote: https://rubygems.org/
11+
specs:
12+
addressable (2.5.2)
13+
public_suffix (>= 2.0.2, < 4.0)
14+
claide (1.0.2)
15+
claide-plugins (0.9.2)
16+
cork
17+
nap
18+
open4 (~> 1.3)
19+
colored2 (3.1.2)
20+
cork (0.3.0)
21+
colored2 (~> 3.1)
22+
danger (5.5.1)
23+
claide (~> 1.0)
24+
claide-plugins (>= 0.9.2)
25+
colored2 (~> 3.1)
26+
cork (~> 0.1)
27+
faraday (~> 0.9)
28+
faraday-http-cache (~> 1.0)
29+
git (~> 1)
30+
kramdown (~> 1.5)
31+
no_proxy_fix
32+
octokit (~> 4.7)
33+
terminal-table (~> 1)
34+
danger-plugin-api (1.0.0)
35+
danger (> 2.0)
36+
faraday (0.13.1)
37+
multipart-post (>= 1.2, < 3)
38+
faraday-http-cache (1.3.1)
39+
faraday (~> 0.8)
40+
git (1.3.0)
41+
kramdown (1.15.0)
42+
multipart-post (2.0.0)
43+
nap (1.1.0)
44+
no_proxy_fix (0.1.1)
45+
octokit (4.7.0)
46+
sawyer (~> 0.8.0, >= 0.5.3)
47+
open4 (1.3.4)
48+
public_suffix (3.0.0)
49+
sawyer (0.8.1)
50+
addressable (>= 2.3.5, < 2.6)
51+
faraday (~> 0.8, < 1.0)
52+
terminal-table (1.8.0)
53+
unicode-display_width (~> 1.1, >= 1.1.1)
54+
unicode-display_width (1.3.0)
55+
56+
PLATFORMS
57+
ruby
58+
59+
DEPENDENCIES
60+
danger
61+
danger-code_style_validation!
62+
63+
BUNDLED WITH
64+
1.14.4

default.nix

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# default.nix
2+
with import <nixpkgs> {};
3+
stdenv.mkDerivation {
4+
name = "dev-environment"; # Probably put a more meaningful name here
5+
buildInputs = [ bundler python35Packages.numpy zlib ];
6+
}

hello_world.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def message():
2+
return 'Hello, Danger world!'
3+
4+
def main():
5+
print(message())
6+
7+
if __name__ == '__main__':
8+
main()

0 commit comments

Comments
 (0)