Skip to content

Commit 10f6236

Browse files
Copilotbenibenj
andcommitted
Improve documentation for validateExtensionDependencies
- Clarify that validation only checks for lowercase letters - Add notes about what the validation does not check - Address code review feedback Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>
1 parent 7bda2f1 commit 10f6236

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/validation.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ export function validateVSCodeTypesCompatibility(engineVersion: string, typeVers
118118

119119
/**
120120
* Validates that extension IDs use only lowercase letters.
121-
* Extension IDs should be in the format "publisher.extension-name" where both parts use lowercase letters.
121+
* This validation ensures compliance with VS Code extension marketplace requirements.
122+
*
123+
* Note: This only validates the case (lowercase). It does not validate the format
124+
* or structure of extension IDs (e.g., presence of dot separator, valid characters).
122125
*/
123126
export function validateExtensionDependencies(dependencies: string[] | undefined, fieldName: string): void {
124127
if (!dependencies || dependencies.length === 0) {
@@ -128,7 +131,8 @@ export function validateExtensionDependencies(dependencies: string[] | undefined
128131
const invalidDependencies: string[] = [];
129132

130133
for (const dep of dependencies) {
131-
// Extension IDs should be lowercase
134+
// Check if extension ID uses only lowercase letters
135+
// Note: This does not validate the format of the extension ID itself
132136
if (dep !== dep.toLowerCase()) {
133137
invalidDependencies.push(dep);
134138
}

0 commit comments

Comments
 (0)