Repository navigation
Add policy support for linux - #272579
Merged
Merged
Add policy support for linux#272579
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Pasero (@bpasero)Matched files:
Robo (@deepak1556)Matched files:
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds Linux policy support by enabling JSON-based policy generation and loading from /etc/vscode/policy.json. The changes extend the existing policy infrastructure to support Linux alongside the existing Windows (registry-based) and macOS (plist-based) implementations.
Key Changes:
- Added Linux-specific policy initialization in CLI and Electron main processes
- Implemented JSON policy rendering for all policy types
- Created build infrastructure to generate Linux policy files
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/vs/code/node/cliProcessMain.ts |
Added Linux policy service initialization using FilePolicyService with system path |
src/vs/code/electron-main/main.ts |
Added Linux policy service initialization in main Electron process |
src/vs/base/common/policy.ts |
Defined constant for Linux system policy file path |
build/lib/policies/types.ts |
Added renderJsonValue method to Policy interface |
build/lib/policies/booleanPolicy.ts |
Implemented renderJsonValue returning false for boolean policies |
build/lib/policies/numberPolicy.ts |
Implemented renderJsonValue returning default numeric value |
build/lib/policies/stringPolicy.ts |
Implemented renderJsonValue returning empty string |
build/lib/policies/stringEnumPolicy.ts |
Implemented renderJsonValue returning first enum value |
build/lib/policies/objectPolicy.ts |
Implemented renderJsonValue returning empty string for object policies |
build/lib/policies/basePolicy.ts |
Added abstract renderJsonValue method declaration |
build/lib/policies/render.ts |
Added renderJsonPolicies function to generate JSON policy object |
build/lib/policies/policyGenerator.ts |
Added linuxMain function and linux platform support to CLI |
build/lib/test/*.test.ts |
Added tests for JSON value rendering across all policy types |
build/lib/test/fixtures/policies/linux/policy.json |
Added fixture file for Linux policy JSON validation |
joshspicer
approved these changes
Oct 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add support for JSON policy generation and loading for Linux OS. The file must be loaded from /etc/vscode/policy.json.