diff --git a/.rubocop.yml b/.rubocop.yml index b3c997c..5484145 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -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 diff --git a/Gemfile b/Gemfile index a076fc4..3a0b06c 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,7 @@ source 'https://rubygems.org' +gem 'cookstyle' gem 'highline' gem 'rack' gem 'rake' diff --git a/Rakefile b/Rakefile index ca3ba25..8fd044a 100755 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,7 @@ #!/usr/bin/env rake # frozen_string_literal: true +require 'cookstyle' require 'rake/testtask' require 'rubocop/rake_task' @@ -10,6 +11,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] diff --git a/controls/mysql_conf.rb b/controls/mysql_conf.rb index b679d9a..a543499 100644 --- a/controls/mysql_conf.rb +++ b/controls/mysql_conf.rb @@ -1,8 +1,7 @@ -# encoding: utf-8 # frozen_string_literal: true -# Copyright 2014, Deutsche Telekom AG -# Copyright 2018, Christoph Hartmann +# Copyright:: 2014, Deutsche Telekom AG +# Copyright:: 2018, Christoph Hartmann # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/controls/mysql_db.rb b/controls/mysql_db.rb index 8064ef2..dfbbcfc 100644 --- a/controls/mysql_db.rb +++ b/controls/mysql_db.rb @@ -1,8 +1,7 @@ -# encoding: utf-8 # frozen_string_literal: true -# Copyright 2014, Deutsche Telekom AG -# Copyright 2018, Christoph Hartmann +# Copyright:: 2014, Deutsche Telekom AG +# Copyright:: 2018, Christoph Hartmann # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/mysql_distribution.rb b/libraries/mysql_distribution.rb index 2de971f..2201a79 100644 --- a/libraries/mysql_distribution.rb +++ b/libraries/mysql_distribution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020, Sebastian Gumprich +# Copyright:: 2020, Sebastian Gumprich # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/mysql_version.rb b/libraries/mysql_version.rb index 086d81c..2801ea6 100644 --- a/libraries/mysql_version.rb +++ b/libraries/mysql_version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020, Sebastian Gumprich +# Copyright:: 2020, Sebastian Gumprich # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.