Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change linting to Cookstyle #17

Merged
merged 2 commits into from
Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,3 @@
AllCops:
Exclude:
- vendor/**/*
Documentation:
Enabled: false
Layout/ParameterAlignment:
Enabled: true
HashSyntax:
Enabled: true
LineLength:
Enabled: false
EmptyLinesAroundBlockBody:
Enabled: false
Style/Encoding:
Enabled: false
MethodLength:
Max: 40
NumericLiterals:
MinDigits: 10
Metrics/BlockLength:
Max: 35
Metrics/CyclomaticComplexity:
Max: 10
Metrics/PerceivedComplexity:
Max: 10
Metrics/AbcSize:
Max: 30
# Lint/AmbiguousBlockAssociation is incompatible with RSpec
# https://github.com/rubocop-hq/rubocop/issues/4222
Lint/AmbiguousBlockAssociation:
Enabled: false
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

source 'https://rubygems.org'

gem 'cookstyle'
gem 'highline'
gem 'rack'
gem 'rake'
Expand Down
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

require 'cookstyle'
require 'rake/testtask'
require 'rubocop/rake_task'

Expand All @@ -9,6 +10,10 @@ task :rubocop do
RuboCop::RakeTask.new
end

RuboCop::RakeTask.new(:cookstyle) do |task|
task.options << '--display-cop-names'
end

# lint the project
desc 'Run robocop linter'
task lint: [:rubocop]
Expand Down Expand Up @@ -44,5 +49,4 @@ task :changelog do
Rake::Task[:changelog].execute
rescue LoadError
puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'

end
5 changes: 2 additions & 3 deletions controls/php_conf.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# encoding: utf-8
# frozen_string_literal: true

#
# Copyright 2015, Dominik Richter
# Copyright 2016, Christoph Hartmann
# Copyright:: 2015, Dominik Richter
# Copyright:: 2016, Christoph Hartmann
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions libraries/php.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# encoding: utf-8
# frozen_string_literal: true

#
# Copyright 2016, Christoph Hartmann
# Copyright:: 2016, Christoph Hartmann
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down