Skip to content

Commit

Permalink
test bump
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbreen28 committed Sep 25, 2023
1 parent 10da7d9 commit 8951936
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
matrix:
ruby_version:
- '2.7'
- '3.2'
runs_on:
- 'ubuntu-latest'
- 'windows-latest'
Expand All @@ -32,6 +33,7 @@ jobs:
matrix:
ruby_version:
- '2.7'
- '3.2'
runs_on:
- 'ubuntu-latest'
- 'windows-latest'
Expand Down
62 changes: 61 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1 +1,61 @@
# Empty
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-09-25 11:08:03 UTC using RuboCop version 1.48.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
# SupportedStylesForExponentOperator: space, no_space
Layout/SpaceAroundOperators:
Exclude:
- 'lib/puppet_editor_services/protocol/json_rpc.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space, compact
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: space

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowInHeredoc.
Layout/TrailingWhitespace:
Exclude:
- 'lib/puppet-languageserver/puppetfile/validation_provider.rb'

# Offense count: 17
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantBegin:
Exclude:
- 'lib/dsp/dsp.rb'
- 'lib/lsp/lsp.rb'
- 'lib/puppet-debugserver/hooks.rb'
- 'lib/puppet-languageserver/global_queues/single_instance_queue.rb'
- 'lib/puppet-languageserver/manifest/validation_provider.rb'
- 'lib/puppet-languageserver/providers.rb'
- 'lib/puppet-languageserver/puppet_monkey_patches.rb'
- 'lib/puppet_debugserver.rb'
- 'lib/puppet_editor_services/server/tcp.rb'
- 'lib/puppet_languageserver.rb'
- 'lib/puppet_languageserver_sidecar.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/SlicingWithRange:
Exclude:
- 'lib/puppet-languageserver/manifest/hover_provider.rb'
- 'lib/puppet-languageserver/puppet_lexer_helper.rb'

# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/ZeroLengthPredicate:
Exclude:
- 'lib/puppet-debugserver/debug_session/hook_handlers.rb'
- 'lib/puppet-languageserver/message_handler.rb'
- 'lib/puppet_editor_services/server/tcp.rb'
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ task :gem_revendor do
{
:directory => 'puppetfile-resolver',
:github_repo => 'https://github.com/glennsarti/puppetfile-resolver.git',
:github_ref => '0.3.0',
:github_ref => '0.6.2',
},
{
:directory => 'molinillo',
Expand Down
4 changes: 1 addition & 3 deletions lib/puppet-languageserver/puppetfile/validation_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def self.validate(content, options = {})

puppetfile.validation_errors.each do |validation_error|
related_information = nil

if validation_error.is_a?(PuppetfileResolver::Puppetfile::DocumentDuplicateModuleError)
related_information = validation_error.duplicates.map do |dup_mod|
{
Expand Down Expand Up @@ -87,7 +86,7 @@ def self.validate_resolution(puppetfile_document, document_uri, cache, module_pa
'message' => e.message
)]
end

resolution.validation_errors.map do |error|
severity = case error
when PuppetfileResolver::Puppetfile::DocumentLatestVersionError
Expand Down Expand Up @@ -160,7 +159,6 @@ def self.document_error_to_diagnostic(document_uri, error)
'message' => "Module definition for #{dup_mod.name}"
}
end

LSP::Diagnostic.new(
'severity' => LSP::DiagnosticSeverity::ERROR,
'range' => document_location_to_lsp_range(error.puppetfile_modules[0].location),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def load(name)
expect(lint_error.source).to eq('Puppet')
expect(lint_error.message).to match('syntax error')
expect(lint_error.range).to_not be_nil
expect(lint_error.range.start.line).to eq(12)
expect(lint_error.range.end.line).to eq(12)
expect(lint_error.severity).to eq(LSP::DiagnosticSeverity::ERROR)
end
end
Expand All @@ -108,6 +110,15 @@ def load(name)
mod 'gittagmodule',
:git => 'https://github.com/username/repo',
:tag => '0.1'
# Svn style modules
mod 'svnmodule',
:svn => 'svn://host/repo',
:rev => 'abc123'
# local style modules
mod 'localmodule',
:local => 'true'
EOT
end

Expand Down Expand Up @@ -146,7 +157,6 @@ def load(name)
lint_error = subject.validate(content, validation_options)
expect(lint_error.count).to eq(1)
lint_error = lint_error[0]

expect(lint_error.source).to eq('Puppet')
expect(lint_error.message).to match('A Mock Runtime Error')
expect(lint_error.range.start.line).to eq(10)
Expand Down
2 changes: 1 addition & 1 deletion vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gem List

* puppet-lint (https://github.com/puppetlabs/puppet-lint.git ref v4.2.0)
* hiera-eyaml (https://github.com/voxpupuli/hiera-eyaml ref v2.1.0)
* puppetfile-resolver (https://github.com/glennsarti/puppetfile-resolver.git ref 0.3.0)
* puppetfile-resolver (https://github.com/glennsarti/puppetfile-resolver.git ref )
* molinillo (https://github.com/CocoaPods/Molinillo.git ref 0.6.6)
* puppet-strings (https://github.com/puppetlabs/puppet-strings.git ref v4.1.0)
* yard (https://github.com/lsegal/yard.git ref v0.9.24)
Expand Down

0 comments on commit 8951936

Please sign in to comment.