feat: support per os settings from ldx-sync [IDE-1756]#1180
feat: support per os settings from ldx-sync [IDE-1756]#1180andrewrobinsonhodges-snyk wants to merge 6 commits intorefactor/IDE-1786_folder-config-refactoringfrom
Conversation
This comment has been minimized.
This comment has been minimized.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
| case "linux": | ||
| suffix = "linux" | ||
| default: | ||
| suffix = "macos" |
There was a problem hiding this comment.
This should be Darwin
There was a problem hiding this comment.
Does that help? As long as it matches the LDX-Sync value it shouldn't matter.
| // perOSSettings maps internal setting names to their base API field name. | ||
| // The API sends these as <base>_<os>, e.g. "cli_path_macos". | ||
| // Only the variant matching the current OS is accepted. | ||
| var perOSSettings = map[string]string{ |
There was a problem hiding this comment.
Why make this a special case? We can just allow everything to be arch and os-specific.
There was a problem hiding this comment.
Why would we add unnecessary complexity to the API and UIs?? I don't think end users will want different scan behavior on different OSs.
| // For per-OS settings, the current OS suffix is appended. | ||
| func GetLDXSyncKey(internalName string) string { | ||
| if baseName, ok := perOSSettings[internalName]; ok { | ||
| return baseName + "_" + osSuffix |
There was a problem hiding this comment.
I think, we're missing arch in general, which is important for the CLI path.
This comment has been minimized.
This comment has been minimized.
…IDE-1756_support-per-os-settings
PR Reviewer Guide 🔍
|
Description
Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.
Checklist
make generate)make lint-fix)