From 3b7fbd8557f6b994204e9b8f847c39bf7711680b Mon Sep 17 00:00:00 2001 From: Gavin Patton Date: Mon, 6 Nov 2023 10:07:02 +0000 Subject: [PATCH] changing gem name to puppetlabs-lint after further discussions --- Dockerfile | 6 ++-- README.md | 30 +++++++++---------- Rakefile | 4 +-- ...puppetlabs-puppet-lint => puppetlabs-lint} | 2 +- .../{puppet-lint.rb => puppetlabs-lint.rb} | 20 ++++++------- .../{puppet-lint => puppetlabs-lint}/bin.rb | 22 +++++++------- .../checkplugin.rb | 4 +-- .../checks.rb | 14 ++++----- .../configuration.rb | 2 +- .../{puppet-lint => puppetlabs-lint}/data.rb | 0 .../{puppet-lint => puppetlabs-lint}/lexer.rb | 6 ++-- .../lexer/string_slurper.rb | 0 .../lexer/token.rb | 0 .../monkeypatches.rb | 0 .../optparser.rb | 24 +++++++-------- .../plugins.rb | 14 ++++----- .../arrow_on_right_operand_line.rb | 0 .../check_classes/autoloader_layout.rb | 0 .../class_inherits_from_params_class.rb | 0 .../check_classes/code_on_top_scope.rb | 0 .../inherits_across_namespaces.rb | 0 .../check_classes/names_containing_dash.rb | 0 .../names_containing_uppercase.rb | 2 +- .../nested_classes_or_defines.rb | 0 .../plugins/check_classes/parameter_order.rb | 0 .../right_to_left_relationship.rb | 0 .../plugins/check_classes/variable_scope.rb | 0 .../plugins/check_comments/slash_comments.rb | 0 .../plugins/check_comments/star_comments.rb | 0 .../case_without_default.rb | 0 .../selector_inside_resource.rb | 0 .../check_documentation/documentation.rb | 0 .../plugins/check_nodes/unquoted_node_name.rb | 0 .../check_resources/duplicate_params.rb | 0 .../check_resources/ensure_first_param.rb | 0 .../ensure_not_symlink_target.rb | 0 .../plugins/check_resources/file_mode.rb | 0 .../check_resources/unquoted_file_mode.rb | 0 .../unquoted_resource_title.rb | 0 .../check_strings/double_quoted_strings.rb | 0 .../check_strings/only_variable_string.rb | 0 .../puppet_url_without_modules.rb | 0 .../plugins/check_strings/quoted_booleans.rb | 0 .../single_quote_string_with_variables.rb | 0 .../check_strings/variables_not_enclosed.rb | 0 .../check_variables/variable_contains_dash.rb | 0 .../check_variables/variable_is_lowercase.rb | 0 .../plugins/check_whitespace/140chars.rb | 0 .../plugins/check_whitespace/2sp_soft_tabs.rb | 0 .../plugins/check_whitespace/80chars.rb | 0 .../check_whitespace/arrow_alignment.rb | 0 .../plugins/check_whitespace/hard_tabs.rb | 0 .../plugins/check_whitespace/line_length.rb | 0 .../check_whitespace/trailing_whitespace.rb | 0 .../plugins/legacy_facts/legacy_facts.rb | 4 +-- .../top_scope_facts/top_scope_facts.rb | 4 +-- .../report/codeclimate.rb | 0 .../report/github.rb | 0 .../report/sarif_template.json | 0 .../tasks/gemfile_rewrite.rb | 8 ++--- .../tasks/puppet-lint.rb | 10 +++---- .../tasks/release_test.rb | 10 +++---- .../version.rb | 0 puppet-lint.gemspec | 4 +-- spec/spec_helper.rb | 4 +-- spec/spec_helper_acceptance_local.rb | 2 +- spec/unit/puppet-lint/bin_spec.rb | 2 +- spec/unit/puppet-lint/checks_spec.rb | 6 ++-- 68 files changed, 102 insertions(+), 102 deletions(-) rename bin/{puppetlabs-puppet-lint => puppetlabs-lint} (77%) rename lib/puppetlabs/{puppet-lint.rb => puppetlabs-lint.rb} (94%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/bin.rb (87%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/checkplugin.rb (99%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/checks.rb (89%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/configuration.rb (99%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/data.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/lexer.rb (98%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/lexer/string_slurper.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/lexer/token.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/monkeypatches.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/optparser.rb (86%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins.rb (78%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/arrow_on_right_operand_line.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/autoloader_layout.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/class_inherits_from_params_class.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/code_on_top_scope.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/inherits_across_namespaces.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/names_containing_dash.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/names_containing_uppercase.rb (96%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/nested_classes_or_defines.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/parameter_order.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/right_to_left_relationship.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_classes/variable_scope.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_comments/slash_comments.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_comments/star_comments.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_conditionals/case_without_default.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_conditionals/selector_inside_resource.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_documentation/documentation.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_nodes/unquoted_node_name.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_resources/duplicate_params.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_resources/ensure_first_param.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_resources/ensure_not_symlink_target.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_resources/file_mode.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_resources/unquoted_file_mode.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_resources/unquoted_resource_title.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_strings/double_quoted_strings.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_strings/only_variable_string.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_strings/puppet_url_without_modules.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_strings/quoted_booleans.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_strings/single_quote_string_with_variables.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_strings/variables_not_enclosed.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_variables/variable_contains_dash.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_variables/variable_is_lowercase.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_whitespace/140chars.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_whitespace/2sp_soft_tabs.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_whitespace/80chars.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_whitespace/arrow_alignment.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_whitespace/hard_tabs.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_whitespace/line_length.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/check_whitespace/trailing_whitespace.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/legacy_facts/legacy_facts.rb (98%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/plugins/top_scope_facts/top_scope_facts.rb (93%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/report/codeclimate.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/report/github.rb (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/report/sarif_template.json (100%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/tasks/gemfile_rewrite.rb (74%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/tasks/puppet-lint.rb (93%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/tasks/release_test.rb (87%) rename lib/puppetlabs/{puppet-lint => puppetlabs-lint}/version.rb (100%) diff --git a/Dockerfile b/Dockerfile index 8e59d64b5..e541e5949 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ FROM ruby:2.7-alpine -RUN mkdir /puppet-lint /puppet +RUN mkdir /puppetlabs-lint /puppet VOLUME /puppet WORKDIR /puppet -ENTRYPOINT ["/puppet-lint/bin/puppet-lint"] +ENTRYPOINT ["/puppetlabs-lint/bin/puppetlabs-lint"] CMD ["--help"] -COPY . /puppet-lint/ +COPY . /puppetlabs-lint/ diff --git a/README.md b/README.md index d56470381..89be3dd3d 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,21 @@ This tool is only supported on Puppet 7 & 8 environments. In cases where Puppet Install the Puppet Lint gem by running: ``` -gem install puppet-lint +gem install puppetlabs-lint ``` ## Testing with Puppet Lint -To test manifests for correct Puppet style, run the `puppet-lint` command with the path to the files you want to test. +To test manifests for correct Puppet style, run the `puppetlabs-lint` command with the path to the files you want to test. For example: ``` -puppet-lint ~/modules/puppetlabs-java/manifests/init.pp +puppetlabs-lint ~/modules/puppetlabs-java/manifests/init.pp ``` ``` -puppet-lint ~/modules/puppetlabs-mysql/manifests +puppetlabs-lint ~/modules/puppetlabs-mysql/manifests ``` ### Fix issues automatically @@ -38,7 +38,7 @@ puppet-lint ~/modules/puppetlabs-mysql/manifests To instruct Lint to automatically fix any issues that it detects, use the `--fix` flag: ``` -puppet-lint --fix /modules +puppetlabs-lint --fix /modules ``` ### Modify which checks to run @@ -54,13 +54,13 @@ To list all available checks along with basic usage documentation, use the `--li To run only specific checks, use the `--only-checks` option, with a comma-separated list of arguments specifying which checks to make: ``` -puppet-lint --only-checks trailing_whitespace,140chars modules/ +puppetlabs-lint --only-checks trailing_whitespace,140chars modules/ ``` To avoid enormous patch sets when using the `--fix` flag, use the `--only-checks` option to limit which checks Puppet Lint makes: ``` -puppet-lint --only-checks trailing_whitespace --fix modules/ +puppetlabs-lint --only-checks trailing_whitespace --fix modules/ ``` ### Disable Lint checks @@ -69,10 +69,10 @@ You can disable specific Lint checks on the command line, disable them permanent #### Disable checks on the command line -To disable any of the checks when running the `puppet-lint` command, add a `--no--check` flag to the command. For example, to skip the 140-character check, run: +To disable any of the checks when running the `puppetlabs-lint` command, add a `--no--check` flag to the command. For example, to skip the 140-character check, run: ``` -puppet-lint --no-140chars-check modules/ +puppetlabs-lint --no-140chars-check modules/ ``` #### Disable checks within Puppet code @@ -123,7 +123,7 @@ Or to specify an allowlist of allowed checks, include a line like: Please note that there is an important difference between reading options from the command line and reading options from a configuration file: In the former case the shell interprets one level of quotes. That does not happen in the latter case. So, it would make sense to quote some configuration values on the command line, like so: ``` -$ puppet-lint --ignore-paths 'modules/stdlib/*' modules/ +$ puppetlabs-lint --ignore-paths 'modules/stdlib/*' modules/ ``` When reading from a configuration file those quotes would be passed on to the option parser -- probably not giving the expected result. Instead the line should read @@ -134,7 +134,7 @@ When reading from a configuration file those quotes would be passed on to the op ## Testing with Puppet Lint as a Rake task -To test your entire Puppet manifest directory, add `require 'puppetlabs/puppet-lint/tasks/puppet-lint'` to your Rakefile and then run: +To test your entire Puppet manifest directory, add `require 'puppetlabs/puppetlabs-lint/tasks/puppetlabs-lint'` to your Rakefile and then run: ``` rake lint @@ -153,14 +153,14 @@ PuppetLint::RakeTask.new :lint do |config| # List of checks to disable config.disable_checks = ['documentation', '140chars'] - # Should puppet-lint prefix it's output with the file being checked, + # Should puppetlabs-lint prefix it's output with the file being checked, # defaults to true config.with_filename = false # Should the task fail if there were any warnings, defaults to false config.fail_on_warnings = true - # Format string for puppet-lint's output (see the puppet-lint help output + # Format string for puppetlabs-lint's output (see the puppetlabs-lint help output # for details config.log_format = '%{filename} - %{message}' @@ -239,7 +239,7 @@ validate lint check rubocop-Ruby 2.7.2-Puppet ~> 7: ## Options -See `puppet-lint --help` for a full list of command line options and checks. +See `puppetlabs-lint --help` for a full list of command line options and checks. ## Checks @@ -309,7 +309,7 @@ If you have problems getting this tool up and running, please [contact Support]( ## Thank you -Many thanks to the following people for contributing to puppet-lint +Many thanks to the following people for contributing to puppetlabs-lint * James Turnbull (@kartar) * Jan Vansteenkiste (@vStone) diff --git a/Rakefile b/Rakefile index 393879479..4e4cd0da0 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ require 'bundler/gem_tasks' require 'rubocop/rake_task' require 'github_changelog_generator/task' -require 'puppetlabs/puppet-lint/version' +require 'puppetlabs/puppetlabs-lint/version' require 'rspec/core/rake_task' require 'puppetlabs_spec_helper/tasks/fixtures' @@ -13,7 +13,7 @@ else GitHubChangelogGenerator::RakeTask.new(:changelog) do |config| version = PuppetLint::VERSION config.user = 'puppetlabs' - config.project = 'puppet-lint' + config.project = 'puppetlabs-lint' config.since_tag = '2.5.0' config.future_release = version.to_s config.exclude_labels = %w[duplicate question invalid wontfix release-pr documentation] diff --git a/bin/puppetlabs-puppet-lint b/bin/puppetlabs-lint similarity index 77% rename from bin/puppetlabs-puppet-lint rename to bin/puppetlabs-lint index dc68ac902..604b3e16e 100755 --- a/bin/puppetlabs-puppet-lint +++ b/bin/puppetlabs-lint @@ -2,6 +2,6 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -require 'puppetlabs/puppet-lint' +require 'puppetlabs/puppetlabs-lint' exit PuppetLint::Bin.new(ARGV).run diff --git a/lib/puppetlabs/puppet-lint.rb b/lib/puppetlabs/puppetlabs-lint.rb similarity index 94% rename from lib/puppetlabs/puppet-lint.rb rename to lib/puppetlabs/puppetlabs-lint.rb index e3d867f96..923a0a99d 100644 --- a/lib/puppetlabs/puppet-lint.rb +++ b/lib/puppetlabs/puppetlabs-lint.rb @@ -4,14 +4,14 @@ require 'set' require 'json' -require 'puppetlabs/puppet-lint/version' -require 'puppetlabs/puppet-lint/lexer' -require 'puppetlabs/puppet-lint/configuration' -require 'puppetlabs/puppet-lint/data' -require 'puppetlabs/puppet-lint/checks' -require 'puppetlabs/puppet-lint/report/github' -require 'puppetlabs/puppet-lint/bin' -require 'puppetlabs/puppet-lint/monkeypatches' +require 'puppetlabs/puppetlabs-lint/version' +require 'puppetlabs/puppetlabs-lint/lexer' +require 'puppetlabs/puppetlabs-lint/configuration' +require 'puppetlabs/puppetlabs-lint/data' +require 'puppetlabs/puppetlabs-lint/checks' +require 'puppetlabs/puppetlabs-lint/report/github' +require 'puppetlabs/puppetlabs-lint/bin' +require 'puppetlabs/puppetlabs-lint/monkeypatches' class PuppetLint::NoCodeError < StandardError; end @@ -27,7 +27,7 @@ def initialize(token) end end -# Public: The public interface to puppet-lint. +# Public: The public interface to puppetlabs-lint. class PuppetLint # Public: Gets/Sets the String manifest code to be checked. attr_accessor :code @@ -263,4 +263,4 @@ def self.new_check(name, &block) # Default configuration options PuppetLint.configuration.defaults -require 'puppetlabs/puppet-lint/plugins' +require 'puppetlabs/puppetlabs-lint/plugins' diff --git a/lib/puppetlabs/puppet-lint/bin.rb b/lib/puppetlabs/puppetlabs-lint/bin.rb similarity index 87% rename from lib/puppetlabs/puppet-lint/bin.rb rename to lib/puppetlabs/puppetlabs-lint/bin.rb index f001da28c..f46f9bbcb 100644 --- a/lib/puppetlabs/puppet-lint/bin.rb +++ b/lib/puppetlabs/puppetlabs-lint/bin.rb @@ -1,9 +1,9 @@ require 'pathname' require 'uri' -require 'puppetlabs/puppet-lint/optparser' -require 'puppetlabs/puppet-lint/report/codeclimate' +require 'puppetlabs/puppetlabs-lint/optparser' +require 'puppetlabs/puppetlabs-lint/report/codeclimate' -# Internal: The logic of the puppet-lint bin script, contained in a class for +# Internal: The logic of the puppetlabs-lint bin script, contained in a class for # ease of testing. class PuppetLint::Bin # Public: Initialise a new PuppetLint::Bin. @@ -18,7 +18,7 @@ def initialize(args) @args = args end - # Public: Run puppet-lint as a command line tool. + # Public: Run puppetlabs-lint as a command line tool. # # Returns an Integer exit code to be passed back to the shell. def run @@ -26,13 +26,13 @@ def run opts = PuppetLint::OptParser.build(@args) opts.parse!(@args) rescue OptionParser::InvalidOption => e - puts "puppet-lint: #{e.message}" - puts "puppet-lint: try 'puppet-lint --help' for more information" + puts "puppetlabs-lint: #{e.message}" + puts "puppetlabs-lint: try 'puppetlabs-lint --help' for more information" return 1 end if PuppetLint.configuration.display_version - puts "puppet-lint #{PuppetLint::VERSION}" + puts "puppetlabs-lint #{PuppetLint::VERSION}" return 0 end @@ -42,8 +42,8 @@ def run end if @args[0].nil? - puts 'puppet-lint: no file specified' - puts "puppet-lint: try 'puppet-lint --help' for more information" + puts 'puppetlabs-lint: no file specified' + puts "puppetlabs-lint: try 'puppetlabs-lint --help' for more information" return 1 end @@ -107,8 +107,8 @@ def run return_val rescue PuppetLint::NoCodeError - puts 'puppet-lint: no file specified or specified file does not exist' - puts "puppet-lint: try 'puppet-lint --help' for more information" + puts 'puppetlabs-lint: no file specified or specified file does not exist' + puts "puppetlabs-lint: try 'puppetlabs-lint --help' for more information" 1 end end diff --git a/lib/puppetlabs/puppet-lint/checkplugin.rb b/lib/puppetlabs/puppetlabs-lint/checkplugin.rb similarity index 99% rename from lib/puppetlabs/puppet-lint/checkplugin.rb rename to lib/puppetlabs/puppetlabs-lint/checkplugin.rb index 9561483a8..6121ae255 100644 --- a/lib/puppetlabs/puppet-lint/checkplugin.rb +++ b/lib/puppetlabs/puppetlabs-lint/checkplugin.rb @@ -1,4 +1,4 @@ -# Public: A class that contains and provides information for the puppet-lint +# Public: A class that contains and provides information for the puppetlabs-lint # checks. # # This class should not be used directly, but instead should be inherited. @@ -146,7 +146,7 @@ def fullpath end # Public: Provides the path of the file being analysed as it was provided to - # puppet-lint to the check plugins. + # puppetlabs-lint to the check plugins. # # Returns the String path. def path diff --git a/lib/puppetlabs/puppet-lint/checks.rb b/lib/puppetlabs/puppetlabs-lint/checks.rb similarity index 89% rename from lib/puppetlabs/puppet-lint/checks.rb rename to lib/puppetlabs/puppetlabs-lint/checks.rb index c551b7f9f..a695990b2 100644 --- a/lib/puppetlabs/puppet-lint/checks.rb +++ b/lib/puppetlabs/puppetlabs-lint/checks.rb @@ -1,6 +1,6 @@ -require 'puppetlabs/puppet-lint/checkplugin' +require 'puppetlabs/puppetlabs-lint/checkplugin' -# Internal: Various methods that orchestrate the actions of the puppet-lint +# Internal: Various methods that orchestrate the actions of the puppetlabs-lint # check plugins. class PuppetLint::Checks # Public: Get an Array of problem Hashes. @@ -13,7 +13,7 @@ def initialize # Internal: Tokenise the manifest code and prepare it for checking. # - # path - The path to the file as passed to puppet-lint as a String. + # path - The path to the file as passed to puppetlabs-lint as a String. # content - The String manifest code to be checked. # # Returns nothing. @@ -47,7 +47,7 @@ def load_data(path, content) # Internal: Run the lint checks over the manifest code. # - # fileinfo - The path to the file as passed to puppet-lint as a String. + # fileinfo - The path to the file as passed to puppetlabs-lint as a String. # data - The String manifest code to be checked. # # Returns an Array of problem Hashes. @@ -86,11 +86,11 @@ def run(fileinfo, data) @problems rescue StandardError => e $stdout.puts <<-END.gsub(%r{^ {6}}, '') - Whoops! It looks like puppet-lint has encountered an error that it doesn't - know how to handle. Please open an issue at https://github.com/puppetlabs/puppet-lint + Whoops! It looks like puppetlabs-lint has encountered an error that it doesn't + know how to handle. Please open an issue at https://github.com/puppetlabs-lint and paste the following output into the issue description. --- - puppet-lint version: #{PuppetLint::VERSION} + puppetlabs-lint version: #{PuppetLint::VERSION} ruby version: #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} platform: #{RUBY_PLATFORM} file path: #{fileinfo} diff --git a/lib/puppetlabs/puppet-lint/configuration.rb b/lib/puppetlabs/puppetlabs-lint/configuration.rb similarity index 99% rename from lib/puppetlabs/puppet-lint/configuration.rb rename to lib/puppetlabs/puppetlabs-lint/configuration.rb index c3539ed59..2abcbf834 100644 --- a/lib/puppetlabs/puppet-lint/configuration.rb +++ b/lib/puppetlabs/puppetlabs-lint/configuration.rb @@ -1,5 +1,5 @@ # Public: A singleton class to store the running configuration of -# puppet-lint. +# puppetlabs-lint. class PuppetLint::Configuration # Internal: Add helper methods for a new check to the # PuppetLint::Configuration object. diff --git a/lib/puppetlabs/puppet-lint/data.rb b/lib/puppetlabs/puppetlabs-lint/data.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/data.rb rename to lib/puppetlabs/puppetlabs-lint/data.rb diff --git a/lib/puppetlabs/puppet-lint/lexer.rb b/lib/puppetlabs/puppetlabs-lint/lexer.rb similarity index 98% rename from lib/puppetlabs/puppet-lint/lexer.rb rename to lib/puppetlabs/puppetlabs-lint/lexer.rb index 9d5fae584..392379fdc 100644 --- a/lib/puppetlabs/puppet-lint/lexer.rb +++ b/lib/puppetlabs/puppetlabs-lint/lexer.rb @@ -1,7 +1,7 @@ require 'strscan' require 'set' -require 'puppetlabs/puppet-lint/lexer/token' -require 'puppetlabs/puppet-lint/lexer/string_slurper' +require 'puppetlabs/puppetlabs-lint/lexer/token' +require 'puppetlabs/puppetlabs-lint/lexer/string_slurper' # Internal: A generic error thrown by the lexer when it encounters something # it can't handle. @@ -32,7 +32,7 @@ def to_s end end -# Internal: The puppet-lint lexer. Converts your manifest into its tokenised +# Internal: The puppetlabs-lint lexer. Converts your manifest into its tokenised # form. class PuppetLint::Lexer def initialize diff --git a/lib/puppetlabs/puppet-lint/lexer/string_slurper.rb b/lib/puppetlabs/puppetlabs-lint/lexer/string_slurper.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/lexer/string_slurper.rb rename to lib/puppetlabs/puppetlabs-lint/lexer/string_slurper.rb diff --git a/lib/puppetlabs/puppet-lint/lexer/token.rb b/lib/puppetlabs/puppetlabs-lint/lexer/token.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/lexer/token.rb rename to lib/puppetlabs/puppetlabs-lint/lexer/token.rb diff --git a/lib/puppetlabs/puppet-lint/monkeypatches.rb b/lib/puppetlabs/puppetlabs-lint/monkeypatches.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/monkeypatches.rb rename to lib/puppetlabs/puppetlabs-lint/monkeypatches.rb diff --git a/lib/puppetlabs/puppet-lint/optparser.rb b/lib/puppetlabs/puppetlabs-lint/optparser.rb similarity index 86% rename from lib/puppetlabs/puppet-lint/optparser.rb rename to lib/puppetlabs/puppetlabs-lint/optparser.rb index 6931be8dd..a47735e23 100644 --- a/lib/puppetlabs/puppet-lint/optparser.rb +++ b/lib/puppetlabs/puppetlabs-lint/optparser.rb @@ -1,20 +1,20 @@ require 'optparse' -# Public: Contains the puppet-lint option parser so that it can be used easily +# Public: Contains the puppetlabs-lint option parser so that it can be used easily # in multiple places. class PuppetLint::OptParser HELP_TEXT = <<-EOF.freeze - puppet-lint + puppetlabs-lint Basic Command Line Usage: - puppet-lint [OPTIONS] PATH + puppetlabs-lint [OPTIONS] PATH PATH The path to the Puppet manifest. Option: EOF - # Public: Initialise a new puppet-lint OptionParser. + # Public: Initialise a new puppetlabs-lint OptionParser. # # Returns an OptionParser object. def self.build(args = []) @@ -25,11 +25,11 @@ def self.build(args = []) PuppetLint.configuration.display_version = true end - opts.on('--no-config', 'Do not load default puppet-lint option files.') do + opts.on('--no-config', 'Do not load default puppetlabs-lint option files.') do # nothing to do, option is handled differently end - opts.on('-c', '--config FILE', 'Load puppet-lint options from file.') do |file| + opts.on('-c', '--config FILE', 'Load puppetlabs-lint options from file.') do |file| opts.load(file) end @@ -61,13 +61,13 @@ def self.build(args = []) PuppetLint.configuration.relative = true end - opts.on('-l', '--load FILE', 'Load a file containing custom puppet-lint checks.') do |f| + opts.on('-l', '--load FILE', 'Load a file containing custom puppetlabs-lint checks.') do |f| load(f) end opts.on('--load-from-puppet MODULEPATH', 'Load plugins from the given Puppet module path.') do |path| path.split(':').each do |p| - Dir["#{p}/*/lib/puppet-lint/plugins/*.rb"].each do |file| + Dir["#{p}/*/lib/puppetlabs-lint/plugins/*.rb"].each do |file| load(file) end end @@ -82,7 +82,7 @@ def self.build(args = []) 'Change the log format.', 'Overrides --with-filename.', 'The following placeholders can be used:', '%{filename} - Filename without path.', - '%{path} - Path as provided to puppet-lint.', + '%{path} - Path as provided to puppetlabs-lint.', '%{fullpath} - Expanded path to the file.', '%{line} - Line number.', '%{column} - Column number.', @@ -142,12 +142,12 @@ def self.build(args = []) end unless args.include?('--no-config') - opt_parser.load('/etc/puppet-lint.rc') + opt_parser.load('/etc/puppetlabs-lint.rc') if File.readable?(Dir.home) - home_dotfile_path = File.expand_path('~/.puppet-lint.rc') + home_dotfile_path = File.expand_path('~/.puppetlabs-lint.rc') opt_parser.load(home_dotfile_path) if File.readable?(home_dotfile_path) end - opt_parser.load('.puppet-lint.rc') + opt_parser.load('.puppetlabs-lint.rc') end opt_parser.parse!(args) unless args.empty? diff --git a/lib/puppetlabs/puppet-lint/plugins.rb b/lib/puppetlabs/puppetlabs-lint/plugins.rb similarity index 78% rename from lib/puppetlabs/puppet-lint/plugins.rb rename to lib/puppetlabs/puppetlabs-lint/plugins.rb index 905c50460..324e9f85d 100644 --- a/lib/puppetlabs/puppet-lint/plugins.rb +++ b/lib/puppetlabs/puppetlabs-lint/plugins.rb @@ -1,17 +1,17 @@ require 'pathname' -# Public: Various methods that implement puppet-lint's plugin system +# Public: Various methods that implement puppetlabs-lint's plugin system # # Examples # # PuppetLint::Plugins.load_spec_helper class PuppetLint::Plugins - # Internal: Find any gems containing puppet-lint plugins and load them. + # Internal: Find any gems containing puppetlabs-lint plugins and load them. # # Returns nothing. def self.load_from_gems gem_directories.each do |directory| - path = directory + 'puppet-lint/plugins' + path = directory + 'puppetlabs-lint/plugins' next unless path.directory? Dir["#{path}/**/*.rb"].each do |file| @@ -20,11 +20,11 @@ def self.load_from_gems end end - # Public: Load the puppet-lint spec_helper.rb + # Public: Load the puppetlabs-lint spec_helper.rb # # Returns nothings. def self.load_spec_helper - gemspec = gemspecs.find { |spec| spec.name == 'puppet-lint' } + gemspec = gemspecs.find { |spec| spec.name == 'puppetlabs-lint' } load(Pathname.new(gemspec.full_gem_path) + 'spec/spec_helper.rb') end @@ -54,7 +54,7 @@ def gemspecs # Returns true if the configuration is set to load "prerelease" gems, false otherwise. def load_prerelease_plugins? # Load prerelease plugins (which ruby defines as any gem which has a letter in its version number). - # Can't use puppet-lint configuration object here because this code executes before the command line is parsed. + # Can't use puppetlabs-lint configuration object here because this code executes before the command line is parsed. return ['true', 'yes'].include?(ENV['PUPPET_LINT_LOAD_PRERELEASE_PLUGINS'].downcase) if ENV['PUPPET_LINT_LOAD_PRERELEASE_PLUGINS'] false @@ -65,7 +65,7 @@ def load_prerelease_plugins? # Returns an Array of Pathname objects. def gem_directories if rubygems? - gemspecs.reject { |spec| spec.name == 'puppet-lint' }.map do |spec| + gemspecs.reject { |spec| spec.name == 'puppetlabs-lint' }.map do |spec| Pathname.new(spec.full_gem_path) + 'lib' end else diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/arrow_on_right_operand_line.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/arrow_on_right_operand_line.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/arrow_on_right_operand_line.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/arrow_on_right_operand_line.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/autoloader_layout.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/autoloader_layout.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/autoloader_layout.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/autoloader_layout.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/class_inherits_from_params_class.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/class_inherits_from_params_class.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/class_inherits_from_params_class.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/class_inherits_from_params_class.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/code_on_top_scope.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/code_on_top_scope.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/code_on_top_scope.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/code_on_top_scope.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/inherits_across_namespaces.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/inherits_across_namespaces.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/inherits_across_namespaces.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/inherits_across_namespaces.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/names_containing_dash.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/names_containing_dash.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/names_containing_dash.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/names_containing_dash.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/names_containing_uppercase.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/names_containing_uppercase.rb similarity index 96% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/names_containing_uppercase.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/names_containing_uppercase.rb index d503813e5..07d03d90b 100644 --- a/lib/puppetlabs/puppet-lint/plugins/check_classes/names_containing_uppercase.rb +++ b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/names_containing_uppercase.rb @@ -1,7 +1,7 @@ # Public: Find and warn about module names with illegal uppercase characters. # # https://puppet.com/docs/puppet/latest/modules_fundamentals.html#allowed-module-names -# Provides a fix. [puppet-lint #554] +# Provides a fix. [puppetlabs-lint #554] PuppetLint.new_check(:names_containing_uppercase) do def check (class_indexes + defined_type_indexes).each do |class_idx| diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/nested_classes_or_defines.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/nested_classes_or_defines.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/nested_classes_or_defines.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/nested_classes_or_defines.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/parameter_order.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/parameter_order.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/parameter_order.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/parameter_order.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/right_to_left_relationship.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/right_to_left_relationship.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/right_to_left_relationship.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/right_to_left_relationship.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_classes/variable_scope.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_classes/variable_scope.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_classes/variable_scope.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_classes/variable_scope.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_comments/slash_comments.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_comments/slash_comments.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_comments/slash_comments.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_comments/slash_comments.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_comments/star_comments.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_comments/star_comments.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_comments/star_comments.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_comments/star_comments.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_conditionals/case_without_default.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_conditionals/case_without_default.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_conditionals/case_without_default.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_conditionals/case_without_default.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_conditionals/selector_inside_resource.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_conditionals/selector_inside_resource.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_conditionals/selector_inside_resource.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_conditionals/selector_inside_resource.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_documentation/documentation.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_documentation/documentation.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_documentation/documentation.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_documentation/documentation.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_nodes/unquoted_node_name.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_nodes/unquoted_node_name.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_nodes/unquoted_node_name.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_nodes/unquoted_node_name.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_resources/duplicate_params.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_resources/duplicate_params.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_resources/duplicate_params.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_resources/duplicate_params.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_resources/ensure_first_param.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_resources/ensure_first_param.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_resources/ensure_first_param.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_resources/ensure_first_param.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_resources/ensure_not_symlink_target.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_resources/ensure_not_symlink_target.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_resources/ensure_not_symlink_target.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_resources/ensure_not_symlink_target.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_resources/file_mode.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_resources/file_mode.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_resources/file_mode.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_resources/file_mode.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_resources/unquoted_file_mode.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_resources/unquoted_file_mode.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_resources/unquoted_file_mode.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_resources/unquoted_file_mode.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_resources/unquoted_resource_title.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_resources/unquoted_resource_title.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_resources/unquoted_resource_title.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_resources/unquoted_resource_title.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_strings/double_quoted_strings.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_strings/double_quoted_strings.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_strings/double_quoted_strings.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_strings/double_quoted_strings.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_strings/only_variable_string.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_strings/only_variable_string.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_strings/only_variable_string.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_strings/only_variable_string.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_strings/puppet_url_without_modules.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_strings/puppet_url_without_modules.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_strings/puppet_url_without_modules.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_strings/puppet_url_without_modules.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_strings/quoted_booleans.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_strings/quoted_booleans.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_strings/quoted_booleans.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_strings/quoted_booleans.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_strings/single_quote_string_with_variables.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_strings/single_quote_string_with_variables.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_strings/single_quote_string_with_variables.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_strings/single_quote_string_with_variables.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_strings/variables_not_enclosed.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_strings/variables_not_enclosed.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_strings/variables_not_enclosed.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_strings/variables_not_enclosed.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_variables/variable_contains_dash.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_variables/variable_contains_dash.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_variables/variable_contains_dash.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_variables/variable_contains_dash.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_variables/variable_is_lowercase.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_variables/variable_is_lowercase.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_variables/variable_is_lowercase.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_variables/variable_is_lowercase.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_whitespace/140chars.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/140chars.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_whitespace/140chars.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/140chars.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_whitespace/2sp_soft_tabs.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/2sp_soft_tabs.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_whitespace/2sp_soft_tabs.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/2sp_soft_tabs.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_whitespace/80chars.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/80chars.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_whitespace/80chars.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/80chars.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_whitespace/arrow_alignment.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/arrow_alignment.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_whitespace/arrow_alignment.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/arrow_alignment.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_whitespace/hard_tabs.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/hard_tabs.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_whitespace/hard_tabs.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/hard_tabs.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_whitespace/line_length.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/line_length.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_whitespace/line_length.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/line_length.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/check_whitespace/trailing_whitespace.rb b/lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/trailing_whitespace.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/plugins/check_whitespace/trailing_whitespace.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/check_whitespace/trailing_whitespace.rb diff --git a/lib/puppetlabs/puppet-lint/plugins/legacy_facts/legacy_facts.rb b/lib/puppetlabs/puppetlabs-lint/plugins/legacy_facts/legacy_facts.rb similarity index 98% rename from lib/puppetlabs/puppet-lint/plugins/legacy_facts/legacy_facts.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/legacy_facts/legacy_facts.rb index e435a0afb..dee56f6c5 100644 --- a/lib/puppetlabs/puppet-lint/plugins/legacy_facts/legacy_facts.rb +++ b/lib/puppetlabs/puppetlabs-lint/plugins/legacy_facts/legacy_facts.rb @@ -1,10 +1,10 @@ -# Public: A puppet-lint custom check to detect legacy facts. +# Public: A puppetlabs-lint custom check to detect legacy facts. # # This check will optionally convert from legacy facts like $::operatingsystem # or legacy hashed facts like $facts['operatingsystem'] to the # new structured facts like $facts['os']['name']. # -# This plugin was adopted in to puppet-lint from https://github.com/mmckinst/puppet-lint-legacy_facts-check +# This plugin was adopted in to puppetlabs-lint from https://github.com/mmckinst/puppetlabs-lint-legacy_facts-check # Thanks to @mmckinst, @seanmil, @rodjek, @baurmatt, @bart2 and @joshcooper for the original work. LEGACY_FACTS_VAR_TYPES = Set[:VARIABLE, :UNENC_VARIABLE] diff --git a/lib/puppetlabs/puppet-lint/plugins/top_scope_facts/top_scope_facts.rb b/lib/puppetlabs/puppetlabs-lint/plugins/top_scope_facts/top_scope_facts.rb similarity index 93% rename from lib/puppetlabs/puppet-lint/plugins/top_scope_facts/top_scope_facts.rb rename to lib/puppetlabs/puppetlabs-lint/plugins/top_scope_facts/top_scope_facts.rb index 5f5377103..5ff1003b1 100644 --- a/lib/puppetlabs/puppet-lint/plugins/top_scope_facts/top_scope_facts.rb +++ b/lib/puppetlabs/puppetlabs-lint/plugins/top_scope_facts/top_scope_facts.rb @@ -1,4 +1,4 @@ -# Public: A puppet-lint plugin that will check for the use of top scope facts. +# Public: A puppetlabs-lint plugin that will check for the use of top scope facts. # For example, the fact `$facts['kernel']` should be used over # `$::kernel`. # @@ -11,7 +11,7 @@ # You should insert the following line to your Rakefile. # `PuppetLint.configuration.top_scope_variables = ['location', 'role']` # -# This plugin was adopted in to puppet-lint from https://github.com/mmckinst/puppet-lint-top_scope_facts-check +# This plugin was adopted in to puppetlabs-lint from https://github.com/mmckinst/puppetlabs-lint-top_scope_facts-check # Thanks to @mmckinst, @seanmil and @alexjfisher for the original work. TOP_SCOPE_FACTS_VAR_TYPES = Set[:VARIABLE, :UNENC_VARIABLE] diff --git a/lib/puppetlabs/puppet-lint/report/codeclimate.rb b/lib/puppetlabs/puppetlabs-lint/report/codeclimate.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/report/codeclimate.rb rename to lib/puppetlabs/puppetlabs-lint/report/codeclimate.rb diff --git a/lib/puppetlabs/puppet-lint/report/github.rb b/lib/puppetlabs/puppetlabs-lint/report/github.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/report/github.rb rename to lib/puppetlabs/puppetlabs-lint/report/github.rb diff --git a/lib/puppetlabs/puppet-lint/report/sarif_template.json b/lib/puppetlabs/puppetlabs-lint/report/sarif_template.json similarity index 100% rename from lib/puppetlabs/puppet-lint/report/sarif_template.json rename to lib/puppetlabs/puppetlabs-lint/report/sarif_template.json diff --git a/lib/puppetlabs/puppet-lint/tasks/gemfile_rewrite.rb b/lib/puppetlabs/puppetlabs-lint/tasks/gemfile_rewrite.rb similarity index 74% rename from lib/puppetlabs/puppet-lint/tasks/gemfile_rewrite.rb rename to lib/puppetlabs/puppetlabs-lint/tasks/gemfile_rewrite.rb index f05b425b6..224d3fa13 100644 --- a/lib/puppetlabs/puppet-lint/tasks/gemfile_rewrite.rb +++ b/lib/puppetlabs/puppetlabs-lint/tasks/gemfile_rewrite.rb @@ -1,17 +1,17 @@ require 'parser/current' -# Simple rewriter using whitequark/parser that rewrites the "gem 'puppet-lint'" +# Simple rewriter using whitequark/parser that rewrites the "gem 'puppetlabs-lint'" # entry in the module's Gemfile (if present) to instead use the local -# puppet-lint working directory. +# puppetlabs-lint working directory. class GemfileRewrite < Parser::TreeRewriter def on_send(node) _, method_name, *args = *node if method_name == :gem gem_name = args.first - if gem_name.type == :str && gem_name.children.first == 'puppet-lint' + if gem_name.type == :str && gem_name.children.first == 'puppetlabs-lint' puppet_lint_root = File.expand_path(File.join(__FILE__, '..', '..', '..', '..')) - replace(node.location.expression, "gem 'puppet-lint', :path => '#{puppet_lint_root}'") + replace(node.location.expression, "gem 'puppetlabs-lint', :path => '#{puppet_lint_root}'") end end diff --git a/lib/puppetlabs/puppet-lint/tasks/puppet-lint.rb b/lib/puppetlabs/puppetlabs-lint/tasks/puppet-lint.rb similarity index 93% rename from lib/puppetlabs/puppet-lint/tasks/puppet-lint.rb rename to lib/puppetlabs/puppetlabs-lint/tasks/puppet-lint.rb index 38ac1172c..2fefa8106 100644 --- a/lib/puppetlabs/puppet-lint/tasks/puppet-lint.rb +++ b/lib/puppetlabs/puppetlabs-lint/tasks/puppet-lint.rb @@ -1,16 +1,16 @@ # rubocop:disable Naming/FileName -require 'puppetlabs/puppet-lint' -require 'puppetlabs/puppet-lint/optparser' +require 'puppetlabs/puppetlabs-lint' +require 'puppetlabs/puppetlabs-lint/optparser' require 'rake' require 'rake/tasklib' -require 'puppetlabs/puppet-lint/report/codeclimate' +require 'puppetlabs/puppetlabs-lint/report/codeclimate' # Public: A Rake task that can be loaded and used with everything you need. # # Examples # -# require 'puppetlabs/puppet-lint' +# require 'puppetlabs/puppetlabs-lint' # PuppetLint::RakeTask.new class PuppetLint::RakeTask < Rake::TaskLib include ::Rake::DSL if defined?(::Rake::DSL) @@ -39,7 +39,7 @@ def initialize(*args, &task_block) end def define(args, &task_block) - desc 'Run puppet-lint' + desc 'Run puppetlabs-lint' yield(*[self, args].slice(0, task_block.arity)) if task_block diff --git a/lib/puppetlabs/puppet-lint/tasks/release_test.rb b/lib/puppetlabs/puppetlabs-lint/tasks/release_test.rb similarity index 87% rename from lib/puppetlabs/puppet-lint/tasks/release_test.rb rename to lib/puppetlabs/puppetlabs-lint/tasks/release_test.rb index 69f6690e7..bb039ba13 100644 --- a/lib/puppetlabs/puppet-lint/tasks/release_test.rb +++ b/lib/puppetlabs/puppetlabs-lint/tasks/release_test.rb @@ -28,7 +28,7 @@ def run_cmd(message, *cmd) end def with_puppet_lint_head(&block) - print(' Updating Gemfile to use puppet-lint HEAD... ') + print(' Updating Gemfile to use puppetlabs-lint HEAD... ') buffer = Parser::Source::Buffer.new('Gemfile') buffer.source = File.read('Gemfile') @@ -39,7 +39,7 @@ def with_puppet_lint_head(&block) if modified_gemfile == buffer.source puppet_lint_root = File.expand_path(File.join(__FILE__, '..', '..', '..', '..')) File.open('Gemfile', 'a') do |f| - f.puts "gem 'puppet-lint', :path => '#{puppet_lint_root}'" + f.puts "gem 'puppetlabs-lint', :path => '#{puppet_lint_root}'" end else File.open('Gemfile', 'w') do |f| @@ -75,7 +75,7 @@ def with_puppet_lint_head(&block) exit end - require 'puppetlabs/puppet-lint/tasks/gemfile_rewrite' + require 'puppetlabs/puppetlabs-lint/tasks/gemfile_rewrite' modules_to_test = [ 'puppetlabs/puppetlabs-apt', @@ -115,14 +115,14 @@ def with_puppet_lint_head(&block) _, success = run_cmd('Installing dependencies', 'bundle', 'install', '--path', File.join('..', 'vendor', 'gems')) next unless success - output, success = run_cmd('Running puppet-lint CLI', 'bundle', 'exec', 'puppet-lint', '--relative', '--no-documentation-check', 'manifests') + output, success = run_cmd('Running puppetlabs-lint CLI', 'bundle', 'exec', 'puppetlabs-lint', '--relative', '--no-documentation-check', 'manifests') unless output.empty? output.split("\n").each do |line| puts " #{line}" end end - output, success = run_cmd('Running puppet-lint Rake task', 'bundle', 'exec', 'rake', 'lint') + output, success = run_cmd('Running puppetlabs-lint Rake task', 'bundle', 'exec', 'rake', 'lint') unless output.empty? output.split("\n").each do |line| puts " #{line}" diff --git a/lib/puppetlabs/puppet-lint/version.rb b/lib/puppetlabs/puppetlabs-lint/version.rb similarity index 100% rename from lib/puppetlabs/puppet-lint/version.rb rename to lib/puppetlabs/puppetlabs-lint/version.rb diff --git a/puppet-lint.gemspec b/puppet-lint.gemspec index 96dc3d4d0..9b39ce79c 100644 --- a/puppet-lint.gemspec +++ b/puppet-lint.gemspec @@ -1,8 +1,8 @@ $LOAD_PATH.push(File.expand_path('lib', __dir__)) -require 'puppetlabs/puppet-lint/version' +require 'puppetlabs/puppetlabs-lint/version' Gem::Specification.new do |spec| - spec.name = 'puppetlabs-puppet-lint' + spec.name = 'puppetlabs-lint' spec.version = PuppetLint::VERSION.dup spec.homepage = 'https://github.com/puppetlabs/puppet-lint/' spec.summary = 'Ensure your Puppet manifests conform with the Puppetlabs style guide' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b8b44cdd1..dd31c3a64 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,11 +6,11 @@ SimpleCov.start do add_filter('/spec/') add_filter('/vendor/') - add_group('Checks', 'lib/puppet-lint/plugins') + add_group('Checks', 'lib/puppetlabs/puppetlabs-lint/plugins') end end -require 'puppetlabs/puppet-lint' +require 'puppetlabs/puppetlabs-lint' require 'rspec/its' begin require 'rspec/json_expectations' diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index 4286411ae..5e98e1dfe 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -7,7 +7,7 @@ def puppet_lint(args = []) raise "Parameter 'args' should an Array but it was of type #{args.class}." unless args.is_a?(Array) || args.empty? - bin_path = File.join(File.dirname(__FILE__), '..', 'bin', 'puppet-lint') + bin_path = File.join(File.dirname(__FILE__), '..', 'bin', 'puppetlabs-lint') command = [bin_path] command.concat(args) unless args.empty? diff --git a/spec/unit/puppet-lint/bin_spec.rb b/spec/unit/puppet-lint/bin_spec.rb index 118d054b9..803e8019b 100644 --- a/spec/unit/puppet-lint/bin_spec.rb +++ b/spec/unit/puppet-lint/bin_spec.rb @@ -52,7 +52,7 @@ def initialize(args) let(:args) { '--version' } its(:exitstatus) { is_expected.to eq(0) } - its(:stdout) { is_expected.to eq("puppet-lint #{PuppetLint::VERSION}") } + its(:stdout) { is_expected.to eq("puppetlabs-lint #{PuppetLint::VERSION}") } end context 'when asked to display available checks' do diff --git a/spec/unit/puppet-lint/checks_spec.rb b/spec/unit/puppet-lint/checks_spec.rb index c27a10e25..87a6781c4 100644 --- a/spec/unit/puppet-lint/checks_spec.rb +++ b/spec/unit/puppet-lint/checks_spec.rb @@ -146,13 +146,13 @@ allow($stdout).to receive(:puts).with(anything) end - it 'prints out information about the puppet-lint version and ruby environment' do + it 'prints out information about the puppetlabs-lint version and ruby environment' do expected_info = [ - 'Whoops! It looks like puppet-lint has encountered an error that it doesn\'t', + 'Whoops! It looks like puppetlabs-lint has encountered an error that it doesn\'t', 'know how to handle. Please open an issue at https://github.com/puppetlabs/puppet-lint', 'and paste the following output into the issue description.', '---', - "puppet-lint version: #{PuppetLint::VERSION}", + "puppetlabs-lint version: #{PuppetLint::VERSION}", "ruby version: #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}", "platform: #{RUBY_PLATFORM}", "file path: #{fileinfo}",