Skip to content

Commit 5f172dd

Browse files
committed
Tidy up
1 parent fdf7d3c commit 5f172dd

File tree

6 files changed

+13
-74
lines changed

6 files changed

+13
-74
lines changed

.gitignore

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +0,0 @@
1-
*.gem
2-
*.rbc
3-
/.config
4-
/coverage/
5-
/InstalledFiles
6-
/pkg/
7-
/spec/reports/
8-
/spec/examples.txt
9-
/test/tmp/
10-
/test/version_tmp/
11-
/tmp/
12-
13-
# Used by dotenv library to load environment variables.
14-
# .env
15-
16-
## Specific to RubyMotion:
17-
.dat*
18-
.repl_history
19-
build/
20-
*.bridgesupport
21-
build-iPhoneOS/
22-
build-iPhoneSimulator/
23-
24-
## Specific to RubyMotion (use of CocoaPods):
25-
#
26-
# We recommend against adding the Pods directory to your .gitignore. However
27-
# you should judge for yourself, the pros and cons are mentioned at:
28-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29-
#
30-
# vendor/Pods/
31-
32-
## Documentation cache and generated files:
33-
/.yardoc/
34-
/_yardoc/
35-
/doc/
36-
/rdoc/
37-
38-
## Environment normalization:
39-
/.bundle/
40-
/vendor/bundle
41-
/lib/bundler/man/
42-
43-
# for a library or gem, you might want to ignore these files since the code is
44-
# intended to run in multiple environments; otherwise, check them in:
45-
# Gemfile.lock
46-
# .ruby-version
47-
# .ruby-gemset
48-
49-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50-
.rvmrc

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM ruby:2.5
1+
FROM ruby:2.6
22

3-
LABEL com.github.actions.name="Rubocop checks"
4-
LABEL com.github.actions.description="Lint your Ruby code in parallel to your builds"
3+
LABEL com.github.actions.name="StandardRB checks"
4+
LABEL com.github.actions.description="Lint your Ruby code in parallel to your builds with StandardRB"
55
LABEL com.github.actions.icon="code"
66
LABEL com.github.actions.color="red"
77

8-
LABEL maintainer="Alberto Gimeno <gimenete@gmail.com>"
8+
LABEL maintainer="Bryce Mecum <petridish@gmail.com>"
99

1010
COPY lib /action/lib
1111
ENTRYPOINT ["/action/lib/entrypoint.sh"]

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Rubocop Action
1+
# StandardRB Action
22

3-
Lint your Ruby code in parallel to your builds
4-
5-
![](screenshots/annotations.png)
3+
Lint your Ruby code in parallel to your builds with [StandardRB](https://github.com/testdouble/standard).
4+
Based almost entirely off the [Rubucop Action](https://github.com/gimenete/rubocop-action) by [Alberto Gimeno](https://github.com/gimenete).

lib/foo.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/index.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Based almost completely on https://github.com/gimenete/rubocop-action
2+
13
require 'net/http'
24
require 'json'
35
require 'time'
@@ -12,13 +14,13 @@
1214
@owner = @repository["owner"]["login"]
1315
@repo = @repository["name"]
1416

15-
@check_name = "Rubocop"
17+
@check_name = "StandardRB"
1618

1719
@headers = {
1820
"Content-Type": 'application/json',
1921
"Accept": 'application/vnd.github.antiope-preview+json',
2022
"Authorization": "Bearer #{@GITHUB_TOKEN}",
21-
"User-Agent": 'rubocop-action'
23+
"User-Agent": 'standardrb-action'
2224
}
2325

2426
def create_check
@@ -72,7 +74,7 @@ def update_check(id, conclusion, output)
7274
"fatal" => 'failure'
7375
}
7476

75-
def run_rubocop
77+
def run_standardrb
7678
annotations = []
7779
errors = nil
7880
Dir.chdir(@GITHUB_WORKSPACE) {
@@ -120,19 +122,15 @@ def run
120122
id = create_check()
121123
puts "id is #{id}"
122124
begin
123-
results = run_rubocop()
125+
results = run_standardrb()
124126
conclusion = results["conclusion"]
125127
output = results["output"]
126128

127-
puts "updating check"
128129
update_check(id, conclusion, output)
129130

130-
puts "failing" if conclusion == "failure"
131131
fail if conclusion == "failure"
132132
rescue
133-
puts "rescuing"
134133
update_check(id, "failure", nil)
135-
# fail
136134
end
137135
end
138136

screenshots/annotations.png

-263 KB
Binary file not shown.

0 commit comments

Comments
 (0)