Skip to content

Commit 19fe95f

Browse files
committed
Fix naming style
1 parent 920bba7 commit 19fe95f

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

Tool/Sources/CodeiumService/LanguageServer/CodeiumLanguageServer.swift

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class CodeiumLanguageServer {
2222
var launchHandler: (() -> Void)?
2323
var port: String?
2424
var heartbeatTask: Task<Void, Error>?
25-
var project_paths: [String]
25+
var projectPaths: [String]
2626

2727
init(
2828
languageServerExecutableURL: URL,
@@ -36,7 +36,7 @@ final class CodeiumLanguageServer {
3636
self.supportURL = supportURL
3737
self.terminationHandler = terminationHandler
3838
self.launchHandler = launchHandler
39-
project_paths = []
39+
projectPaths = []
4040
process = Process()
4141
transport = IOTransport()
4242

@@ -200,31 +200,33 @@ extension CodeiumLanguageServer: CodeiumLSP {
200200
return
201201
}
202202

203-
let curr_proj_paths = await getProjectPaths()
203+
let currentProjectPaths = await getProjectPaths()
204204

205-
// Add all workspaces that are in the curr_proj_paths but not in the previous project paths
206-
for curr_proj_path in curr_proj_paths {
207-
if !project_paths.contains(curr_proj_path) && FileManager.default
208-
.fileExists(atPath: curr_proj_path)
205+
// Add all workspaces that are in the currentProjectPaths but not in the previous project
206+
// paths
207+
for currentProjectPath in currentProjectPaths {
208+
if !projectPaths.contains(currentProjectPath) && FileManager.default
209+
.fileExists(atPath: currentProjectPath)
209210
{
210211
_ = try? await sendRequest(CodeiumRequest.AddTrackedWorkspace(requestBody: .init(
211-
workspace: curr_proj_path
212+
workspace: currentProjectPath
212213
)))
213214
}
214215
}
215216

216-
// Remove all workspaces that are in previous project paths but not in the curr_proj_paths
217-
for proj_path in project_paths {
218-
if !curr_proj_paths.contains(proj_path) && FileManager.default
219-
.fileExists(atPath: proj_path)
217+
// Remove all workspaces that are in previous project paths but not in the
218+
// currentProjectPaths
219+
for projectPath in projectPaths {
220+
if !currentProjectPaths.contains(projectPath) && FileManager.default
221+
.fileExists(atPath: projectPath)
220222
{
221223
_ = try? await sendRequest(CodeiumRequest.RemoveTrackedWorkspace(requestBody: .init(
222-
workspace: proj_path
224+
workspace: projectPath
223225
)))
224226
}
225227
}
226228
// These should be identical now
227-
project_paths = curr_proj_paths
229+
projectPaths = currentProjectPaths
228230
}
229231
}
230232

0 commit comments

Comments
 (0)