Skip to content

Commit da5d292

Browse files
author
James Pogran
authored
Merge pull request #125 from glennsarti/fix-rubocop
(maint) Update for rubocop errors
2 parents 916f8a7 + 78bb4b1 commit da5d292

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+182
-45
lines changed

.rubocop.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,11 @@ Layout/AlignHash:
8383

8484
Naming/RescuedExceptionsVariableName:
8585
PreferredName: e
86+
87+
# There's no benefit to this and can make things harder to read.
88+
Style/NumericPredicate:
89+
Enabled: false
90+
91+
# This is not valid on Ruby 2.1
92+
Style/SafeNavigation:
93+
Enabled: false

lib/debugserver/debug_protocol.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Original JSON Schema for the protocol
24
# https://github.com/Microsoft/vscode-debugadapter-node/blob/master/debugProtocol.json
35
#

lib/lsp/lsp.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
%w[lsp_base lsp_enums lsp_protocol lsp_types lsp_custom].each do |lib|
24
begin
35
require "lsp/#{lib}"

lib/lsp/lsp_base.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'json'
24

35
module LSP

lib/lsp/lsp_custom.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Custom LSP Messages
24

35
module LSP

lib/lsp/lsp_enums.rb

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# DO NOT MODIFY. This file is built automatically
24
# LSP Enumerations
35

@@ -14,8 +16,8 @@ module DiagnosticSeverity
1416
end
1517

1618
module MarkupKind
17-
PLAINTEXT = 'plaintext'.freeze
18-
MARKDOWN = 'markdown'.freeze
19+
PLAINTEXT = 'plaintext'
20+
MARKDOWN = 'markdown'
1921
end
2022

2123
module CompletionItemKind
@@ -87,13 +89,13 @@ module SymbolKind
8789
end
8890

8991
module CodeActionKind
90-
QUICKFIX = 'quickfix'.freeze
91-
REFACTOR = 'refactor'.freeze
92-
REFACTOREXTRACT = 'refactor.extract'.freeze
93-
REFACTORINLINE = 'refactor.inline'.freeze
94-
REFACTORREWRITE = 'refactor.rewrite'.freeze
95-
SOURCE = 'source'.freeze
96-
SOURCEORGANIZEIMPORTS = 'source.organizeImports'.freeze
92+
QUICKFIX = 'quickfix'
93+
REFACTOR = 'refactor'
94+
REFACTOREXTRACT = 'refactor.extract'
95+
REFACTORINLINE = 'refactor.inline'
96+
REFACTORREWRITE = 'refactor.rewrite'
97+
SOURCE = 'source'
98+
SOURCEORGANIZEIMPORTS = 'source.organizeImports'
9799
end
98100

99101
module TextDocumentSaveReason
@@ -103,16 +105,16 @@ module TextDocumentSaveReason
103105
end
104106

105107
module ResourceOperationKind
106-
CREATE = 'create'.freeze
107-
RENAME = 'rename'.freeze
108-
DELETE = 'delete'.freeze
108+
CREATE = 'create'
109+
RENAME = 'rename'
110+
DELETE = 'delete'
109111
end
110112

111113
module FailureHandlingKind
112-
ABORT = 'abort'.freeze
113-
TRANSACTIONAL = 'transactional'.freeze
114-
TEXTONLYTRANSACTIONAL = 'textOnlyTransactional'.freeze
115-
UNDO = 'undo'.freeze
114+
ABORT = 'abort'
115+
TRANSACTIONAL = 'transactional'
116+
TEXTONLYTRANSACTIONAL = 'textOnlyTransactional'
117+
UNDO = 'undo'
116118
end
117119

118120
module TextDocumentSyncKind

lib/lsp/lsp_protocol.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# DO NOT MODIFY. This file is built automatically
24
# LSP Protocol: vscode-languageserver-protocol/lib/protocol.d.ts
35

lib/lsp/lsp_types.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# DO NOT MODIFY. This file is built automatically
24
# LSP Protocol: vscode-languageserver-types/lib/esm/main.d.ts
35

lib/puppet-debugserver/debug_hook_handlers.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module PuppetDebugServer
24
module PuppetDebugSession
35
@hook_handler = nil

lib/puppet-debugserver/hooks.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module PuppetDebugServer
24
# This code was inspired from Puppet-Debugger (https://raw.githubusercontent.com/nwops/puppet-debugger/master/lib/puppet-debugger/hooks.rb) which was borrowed from Pry hooks file
35

0 commit comments

Comments
 (0)