diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd7aba13..ccf7a725 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,6 @@ jobs: fail-fast: false matrix: ruby_version: - - '2.7' - '3.2' - '3.3' name: "spec (ruby ${{ matrix.ruby_version }})" @@ -34,7 +33,6 @@ jobs: fail-fast: false matrix: ruby_version: - - '2.7' - '3.2' - '3.3' name: "acceptance (ruby ${{ matrix.ruby_version }})" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4c090b04..fabd7cbf 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -12,7 +12,6 @@ jobs: fail-fast: false matrix: ruby_version: - - '2.7' - '3.2' - '3.3' name: "spec (ruby ${{ matrix.ruby_version }})" @@ -26,7 +25,6 @@ jobs: fail-fast: false matrix: ruby_version: - - '2.7' - '3.2' - '3.3' name: "acceptance (ruby ${{ matrix.ruby_version }})" diff --git a/lib/puppet-lint.rb b/lib/puppet-lint.rb index 06af3af3..c89d2a61 100644 --- a/lib/puppet-lint.rb +++ b/lib/puppet-lint.rb @@ -250,11 +250,11 @@ def print_problems # def check # end # end - def self.new_check(name, &block) + def self.new_check(name, &) class_name = name.to_s.split('_').map(&:capitalize).join klass = PuppetLint.const_set(:"Check#{class_name}", Class.new(PuppetLint::CheckPlugin)) klass.const_set(:NAME, name) - klass.class_exec(&block) + klass.class_exec(&) PuppetLint.configuration.add_check(name, klass) PuppetLint::Data.ignore_overrides[name] ||= {} end diff --git a/lib/puppet-lint/checkplugin.rb b/lib/puppet-lint/checkplugin.rb index 9561483a..3ca0fe36 100644 --- a/lib/puppet-lint/checkplugin.rb +++ b/lib/puppet-lint/checkplugin.rb @@ -180,9 +180,9 @@ def manifest_lines def default_info @default_info ||= { check: self.class.const_get(:NAME), - fullpath: fullpath, - path: path, - filename: filename + fullpath:, + path:, + filename: } end diff --git a/lib/puppet-lint/checks.rb b/lib/puppet-lint/checks.rb index f4c1fcff..1908432a 100644 --- a/lib/puppet-lint/checks.rb +++ b/lib/puppet-lint/checks.rb @@ -36,7 +36,7 @@ def load_data(path, content) problems << { kind: :error, check: :syntax, - message: message, + message:, line: e.line_no, column: e.column, fullpath: PuppetLint::Data.fullpath, diff --git a/lib/puppet-lint/configuration.rb b/lib/puppet-lint/configuration.rb index df6e60e2..6e35d228 100644 --- a/lib/puppet-lint/configuration.rb +++ b/lib/puppet-lint/configuration.rb @@ -48,7 +48,7 @@ def self.add_check(check) # Signature # #