Skip to content

Commit a86c116

Browse files
authored
Review clean up
1 parent df26017 commit a86c116

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export function registerFileWatcher(projectProvider: ProjectProvider): void {
217217
let projectRootParent = path.dirname(projectRoot);
218218
if (!(fs.existsSync(projectRootParent) && fs.statSync(projectRootParent).isDirectory())) {
219219
projectRootParent = projectRoot;// If the parent directory of the project root doesn't exist, set projectRootParent to projectRoot.
220-
console.debug("project root parent is not found ")
220+
console.debug("project root parent is not found");
221221
}
222222
const siblingFileExists = await helperUtil.checkSiblingFilesInTargetOrBuildParent(uri.fsPath, projectRootParent);
223223
if (!siblingFileExists) {
@@ -230,7 +230,7 @@ export function registerFileWatcher(projectProvider: ProjectProvider): void {
230230
return; // Do not refresh
231231
}
232232
} else {
233-
// If the file generated is **outside** the `target` directory, always refresh
233+
// If the file being processed is **outside** the `target` or `build` directory, always refresh
234234
console.debug('Refreshing project...');
235235
await projectProvider.refresh();
236236
return;

src/util/helperUtil.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function clearDataSavedInGlobalState(context: vscode.ExtensionContext) {
8383

8484
/**
8585
* Traverse upwards to check for target/build directory and its corresponding sibling build file (pom.xml or build.gradle).
86-
* @param filePath The path where the file is generated
86+
* @param filePath The path of the file being processed
8787
* @param projectRootParent parent path for the project root
8888
* @returns true if sibling file found, false otherwise.
8989
*/
@@ -106,7 +106,7 @@ export async function checkSiblingFilesInTargetOrBuildParent(filePath: string, p
106106
return false;
107107
}
108108

109-
while (currentDir !== projectRootParent) { //checks upto and including the project root folder
109+
while (currentDir !== projectRootParent) { //checks up to and including the project root folder
110110
let siblingFilePath = path.join(currentDir, siblingFileType);
111111
// Ensure that targetDir and siblingFilePath are assigned before proceeding
112112
if (!outputDir || !siblingFilePath) {
@@ -154,7 +154,7 @@ async function checkOutputDirAndSiblingBuildFile(currentDir: string, filePath: s
154154
} else {
155155
console.debug(" sibling not found " + siblingFilePath + " for " + filePath);
156156
}
157-
} else{
157+
} else {
158158
console.debug(currentOutputDir + " is not found");
159159
}
160160
return false; // No sibling file found

0 commit comments

Comments
 (0)