Skip to content

Commit 84e1480

Browse files
committed
use cookstyle for linting
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
1 parent 0ab38d0 commit 84e1480

3 files changed

Lines changed: 6 additions & 28 deletions

File tree

.rubocop.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,3 @@
22
AllCops:
33
Exclude:
44
- vendor/**/*
5-
Documentation:
6-
Enabled: false
7-
Layout/ParameterAlignment:
8-
Enabled: true
9-
HashSyntax:
10-
Enabled: true
11-
LineLength:
12-
Enabled: false
13-
EmptyLinesAroundBlockBody:
14-
Enabled: false
15-
Style/Encoding:
16-
Enabled: false
17-
MethodLength:
18-
Max: 40
19-
NumericLiterals:
20-
MinDigits: 10
21-
Metrics/BlockLength:
22-
Max: 35
23-
Metrics/CyclomaticComplexity:
24-
Max: 10
25-
Metrics/PerceivedComplexity:
26-
Max: 10
27-
Metrics/AbcSize:
28-
Max: 30
29-
# Lint/AmbiguousBlockAssociation is incompatible with RSpec
30-
# https://github.com/rubocop-hq/rubocop/issues/4222
31-
Lint/AmbiguousBlockAssociation:
32-
Enabled: false

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
source 'https://rubygems.org'
44

5+
gem 'cookstyle'
56
gem 'highline'
67
gem 'rack'
78
gem 'rake'

Rakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# encoding: utf-8
33
# frozen_string_literal: true
44

5+
require 'cookstyle'
56
require 'rake/testtask'
67
require 'rubocop/rake_task'
78

@@ -11,6 +12,10 @@ task :rubocop do
1112
RuboCop::RakeTask.new
1213
end
1314

15+
RuboCop::RakeTask.new(:cookstyle) do |task|
16+
task.options << '--display-cop-names'
17+
end
18+
1419
# lint the project
1520
desc 'Run robocop linter'
1621
task lint: [:rubocop]

0 commit comments

Comments
 (0)