Skip to content

Commit 5cd7701

Browse files
authored
Merge pull request #259 from jetthoughts/adds-linter
Adds linter to make sure that code is consistent
2 parents b1bb782 + 576a7e2 commit 5cd7701

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ env:
1010
SPEC_OPTS: '--backtrace'
1111

1212
jobs:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Set up Ruby
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: '2.7'
24+
bundler-cache: true
25+
26+
- name: Run Standard Ruby linter
27+
run: bin/standardrb --no-fix --fail-fast
28+
continue-on-error: true
29+
1330
test:
1431
name: Functional Testing
1532
runs-on: ubuntu-20.04 # In order to install libvips 8.9+ version

.standard.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
fix: false # default: false
2+
parallel: true # default: false
3+
format: progress # default: Standard::Formatter
4+
ruby_version: 2.5 # default: RUBY_VERSION
5+
default_ignores: false # default: true
6+
7+
ignore: # default: []
8+
- 'vendor/**/*'

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ gemspec
55

66
gem 'github-markup'
77
gem 'redcarpet', platforms: :ruby
8+
gem 'standard', platforms: :ruby

TODO

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
- Lint.
1111

12-
bundle exec rake rubocop
12+
bundle exec standardrb
1313

1414
- Reinstall local copy of gem after a change.
1515

@@ -31,10 +31,6 @@
3131
require 'vips'; Vips::Yard.generate
3232
^D
3333

34-
- Regenerate `.rubocop_todo.yml`.
35-
36-
bundle exec rubocop --auto-gen-config
37-
3834
- Regenerate docs.
3935

4036
bundle exec rake yard

0 commit comments

Comments
 (0)