Skip to content

NEW @W-19397402@ Implemented hidden config property for keeping working d… - #369

Merged
jfeingold35 merged 2 commits into
devfrom
d/W-19397402
Oct 16, 2025
Merged

NEW @W-19397402@ Implemented hidden config property for keeping working d…#369
jfeingold35 merged 2 commits into
devfrom
d/W-19397402

Conversation

@jfeingold35

Copy link
Copy Markdown
Contributor

…irectories

log_level: LogLevel
rules: Record<string, RuleOverrides>
engines: Record<string, EngineOverrides>
preserve_all_working_directories: boolean // INTERNAL USE ONLY

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For properties that are potentially customer facing, let's be consistent. We are calling it "working folders" and not directories. So I propose we call this something like "preserve_working_folders_always" instead.

Comment on lines +234 to +235
* Returns a boolean indicating whether working directories should be preserved even if their engine succeeds, as opposed
* to being kept only for failed engines.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I suggest:

     * Returns a boolean indicating whether working folders are preserved always.
     * If false, then the working folders for an engine are deleted unless the engine issues an error.
     * If true, then the working folders for each engine remain, even if an engine does not issues any error.

Comment on lines +348 to +351
if (this.config.getPreserveAllWorkingDirectories()) {
this.tempFolder.markToBeKept(runWorkingFolderName);
this.emitLogEvent(LogLevel.Debug, getMessage('AllWorkingFoldersKept', await this.tempFolder.getPath(runWorkingFolderName)));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This this.tempFolder.markToBeKept(runWorkingFolderName); isn't needed. Line 330 already marks the subfolders as kept and therefore the parent folder (runWorkingFolderName) is already kept by the way the temp folder preserves parents.

I'm on the fence about needing a single debug message. We could just debug each engine folder instead to keep a log code simple with the log being below line 330. But I see the motivation here - to have a single log for all things under the run folder.

});

if (this.config.getPreserveAllWorkingDirectories()) {
this.tempFolder.markToBeKept(rulesWorkingFolderName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto - not needed.

Comment thread packages/code-analyzer-core/src/messages.ts Outdated
@jfeingold35 jfeingold35 changed the title @W-19397402@ Implemented hidden config property for keeping working d… NEW @W-19397402@ Implemented hidden config property for keeping working d… Oct 16, 2025
@jfeingold35
jfeingold35 marked this pull request as ready for review October 16, 2025 16:04
@jfeingold35
jfeingold35 merged commit c94ddbd into dev Oct 16, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants