Browse Source

Add linter: rubocop

feature/geojson
Bèr Kessels 1 year ago
parent
commit
45c21d119b
4 changed files with 34 additions and 8 deletions
  1. 3
    0
      .rubocop.yml
  2. 8
    6
      Gemfile
  3. 18
    0
      Gemfile.lock
  4. 5
    2
      Makefile

+ 3
- 0
.rubocop.yml View File

@@ -0,0 +1,3 @@
Metrics/BlockLength:
Exclude:
- test/**/*_test.rb # We define specs in blocks, which by nature get large.

+ 8
- 6
Gemfile View File

@@ -1,15 +1,17 @@
# frozen_string_literal: true

source "https://rubygems.org"
source 'https://rubygems.org'

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

gem "opening_hours_converter"
gem 'opening_hours_converter'

gem "nominatim", github: "lukaszsliwa/nominatim"
gem 'nominatim', github: 'lukaszsliwa/nominatim'

gem "semver"
gem 'semver'

group :development, :test do
gem "minitest"
gem 'minitest'

gem 'rubocop'
end

+ 18
- 0
Gemfile.lock View File

@@ -9,15 +9,32 @@ GIT
GEM
remote: https://rubygems.org/
specs:
ast (2.4.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
jaro_winkler (1.5.2)
json (2.1.0)
minitest (5.11.3)
multi_json (1.13.1)
multipart-post (2.0.0)
opening_hours_converter (1.7.20)
json
parallel (1.13.0)
parser (2.6.0.0)
ast (~> 2.4.0)
powerpack (0.1.2)
rainbow (3.0.0)
rubocop (0.64.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
ruby-progressbar (1.10.0)
semver (1.0.1)
unicode-display_width (1.4.1)

PLATFORMS
ruby
@@ -26,6 +43,7 @@ DEPENDENCIES
minitest
nominatim!
opening_hours_converter
rubocop
semver

BUNDLED WITH

+ 5
- 2
Makefile View File

@@ -6,16 +6,19 @@ TODAY=$(shell date +%F)
# You want latexmk to *always* run, because make does not have all the info.
# Also, include non-file targets in .PHONY so they are run regardless of any
# file of the given name existing.
.PHONY: all test clean setup ruby packages preprocess
.PHONY: all test lint clean setup ruby packages preprocess

# The first rule in a Makefile is the one executed by default ("make"). It
# should always be the "all" rule, so that "make" and "make all" are identical.
all: test
all: lint test

# CUSTOM BUILD RULES
test:
$(CMD_PREFIX) ruby -I test test/**/*_test.rb

lint:
$(CMD_PREFIX) rubocop

clean:
# noop


Loading…
Cancel
Save