Skip to content

Commit 78bafdd

Browse files
committed
addressing code rabbit comments
Signed-off-by: Shawn Hurley <[email protected]>
1 parent 4de9ff2 commit 78bafdd

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- name: Run Phase 2 integration tests in container
7070
run: |
7171
podman run --rm \
72-
-v $(pwd)/java-analyzer-bundle.test:/tests:Z \
72+
-v "$(pwd)/java-analyzer-bundle.test:/tests:Z" \
7373
-e WORKSPACE_DIR=/tests/projects \
7474
-e JDTLS_PATH=/jdtls \
7575
--workdir /tests/integration \

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ target/
44
*.iml
55
.DS_Store
66
.gradle/
7-
*/projects/.metadata
7+
8+
# Eclipse metadata
9+
**/.metadata/
10+
.classpath
11+
.project
12+
.settings/

java-analyzer-bundle.test/integration/client/jdtls_client.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,9 @@ func NewJDTLSClient(jdtlsPath, workspaceDir string) *JDTLSClient {
9999
func (c *JDTLSClient) Start() error {
100100
c.logger.Info("Starting JDT.LS server...")
101101

102-
// Prepare workspace
103-
dataDir := filepath.Join(c.workspaceDir, ".metadata")
104-
if err := os.MkdirAll(dataDir, 0755); err != nil {
105-
return fmt.Errorf("failed to create data directory: %w", err)
102+
// Ensure workspace directory exists; JDT.LS will create ".metadata" under it
103+
if err := os.MkdirAll(c.workspaceDir, 0755); err != nil {
104+
return fmt.Errorf("failed to create workspace directory: %w", err)
106105
}
107106

108107
// Determine config directory
@@ -112,7 +111,7 @@ func (c *JDTLSClient) Start() error {
112111
jdtlsBin := filepath.Join(c.jdtlsPath, "bin", "jdtls")
113112
c.cmd = exec.Command(jdtlsBin,
114113
"-configuration", configDir,
115-
"-data", dataDir,
114+
"-data", c.workspaceDir,
116115
)
117116

118117
// Create pipes for stdin/stdout

0 commit comments

Comments
 (0)