====== VSCode Extension Checkliste ====== Spezifische Prüfungen für VSCode Extensions mit pas2js. Diese Checkliste ergänzt die [[.:audit-core|Core-Checkliste]] für VSCode-Extensions. ===== Pflicht-Prüfungen ===== ==== Activation Events ==== [ ] Activation Events sind minimal und korrekt [ ] Kein "activate on *" außer wenn begründet [ ] Events entsprechen tatsächlicher Funktionalität **Beispiel package.json:** { "activationEvents": [ "onCommand:wvds.build.run", "onLanguage:pascal", "workspaceContains:**/*.lpr" ] } ==== Performance ==== [ ] Keine lang-laufenden Operationen auf Extension Host Thread [ ] Async-Arbeit ist abbrechbar (Cancellation Token) [ ] Progress-Reporting für lange Operationen **Beispiel: Cancellable Operation:** procedure LongOperation(AToken: TCancellationToken); begin while not Finished do begin if AToken.IsCancellationRequested then begin Logger.Info(rsOperationCancelled); Exit; end; ProcessNextItem; end; end; ==== Commands ==== [ ] Commands haben konsistente IDs [ ] Alle Commands haben Titel und Kategorie [ ] Command-Gruppierung ist logisch **Naming Convention:** wvds.. └── wvds.build.run └── wvds.build.clean └── wvds.projects.create ==== Settings ==== [ ] Alle Settings in contributes.configuration [ ] Settings sind dokumentiert (description) [ ] Settings haben sichere Defaults [ ] Settings werden validiert **Beispiel:** { "contributes": { "configuration": { "title": "WvdS Toolchain", "properties": { "wvds.toolchain.fpcPath": { "type": "string", "default": "", "description": "Path to fpc.exe. Leave empty for auto-detection." } } } } } ==== Sicherheit ==== [ ] Externe Tool-Aufrufe validiert/sanitisiert [ ] Workspace-Pfade als untrusted behandelt [ ] Keine Command Injection möglich [ ] shell: false bei Spawn-Aufrufen **Beispiel: Sicherer Tool-Aufruf:** (* VERBOTEN - Command Injection möglich *) Exec('fpc ' + UserInput); (* KORREKT - Sichere Alternative *) var Options: TSpawnOptions; begin Options.shell := False; Options.cwd := ValidatedPath; Spawn('fpc', ['-O2', ValidatedInput], Options); end; ==== Cross-Platform ==== [ ] Pfade sind cross-platform safe [ ] Encodings berücksichtigt (UTF-8) [ ] Line Endings berücksichtigt [ ] Path-Separatoren korrekt (PathJoin verwenden) ==== package.json Metadata ==== [ ] publisher gesetzt [ ] name korrekt (Kleinbuchstaben, Bindestriche) [ ] version folgt SemVer [ ] license angegeben [ ] repository verlinkt [ ] engines.vscode auf minimale Version gesetzt ==== Marketplace Assets ==== [ ] README.md vorhanden und aktuell [ ] CHANGELOG.md mit Version-Historie [ ] Icon vorhanden (128x128 PNG) [ ] Screenshots für komplexe Features ===== pas2js-spezifische Prüfungen ===== ==== Compilation ==== [ ] Kompiliert ohne Fehler mit pas2js [ ] Keine pas2js-inkompatiblen Features verwendet [ ] Keine class var (Unit-Level Variable statt) [ ] Keine Int64 (Integer statt) [ ] Keine // Kommentare in asm-Blöcken ==== Entry Point Pattern ==== [ ] extension_main.pas vorhanden [ ] Activate/Deactivate exportiert [ ] Initialization-Block ruft ExportActivateDeactivate auf **Template:** unit extension_main; {$mode objfpc}{$H+} interface uses JS, VSCode.API, WvdS.VSCode.ExtensionExports; procedure Activate(AContext: TExtensionContext); procedure Deactivate; implementation procedure Activate(AContext: TExtensionContext); begin (* Initialisierung *) end; procedure Deactivate; begin (* Cleanup *) end; initialization ExportActivateDeactivate(@Activate, @Deactivate); end. ==== SSOT für VSCode APIs ==== [ ] VSCode APIs via ~/sources/common/web/vscode/ [ ] Kein direkter require('vscode') in Extensions [ ] WvdS.VSCode.* Wrapper verwendet ===== Empfohlene Prüfungen ===== [ ] Progress Reporting für Operationen > 1s [ ] Cancellation Tokens implementiert [ ] Debouncing bei File Watching [ ] Extension-Größe minimiert [ ] Keine unnötigen Binaries/Assets ===== Optionale Prüfungen ===== [ ] Smoke Tests (Activation + Command) [ ] Offline-Modus wenn Remote-Services genutzt [ ] Telemetrie dokumentiert (oder keine) ===== VSIX-Erstellung ===== ==== Build-Prozess ==== # 1. Pascal zu JavaScript kompilieren pas2js @../../common/wvds_common.pas2js.cfg @build.cfg pas/extension_main.pas # 2. VSIX packen vsce package --no-dependencies # 3. Validieren vsce ls ==== Vor VSIX-Erstellung prüfen ==== [ ] dist/extension_main.js vorhanden [ ] package.json version erhöht [ ] CHANGELOG.md aktualisiert [ ] README.md aktuell [ ] Keine Debug-Artefakte enthalten [ ] .vscodeignore korrekt konfiguriert ===== Schnell-Checkliste zum Kopieren ===== Review-Checkliste (VSCode Extension): Pflicht: - [ ] Minimale Activation Events - [ ] Keine blockierenden Operationen - [ ] Commands mit IDs, Titeln, Kategorien - [ ] Settings dokumentiert und validiert - [ ] Tool-Aufrufe sanitisiert (shell: false) - [ ] Cross-Platform safe (Pfade, Encodings) - [ ] package.json Metadata vollständig pas2js: - [ ] Kompiliert ohne Fehler - [ ] Keine pas2js-inkompatiblen Features - [ ] Entry Point Pattern eingehalten - [ ] SSOT für VSCode APIs Assets: - [ ] README.md vorhanden - [ ] CHANGELOG.md aktuell - [ ] Icon vorhanden ===== Siehe auch ===== * [[.:qualitaetssicherung|Qualitätssicherung Übersicht]] * [[.:audit-core|Core-Checkliste]] * [[.:extension-entwicklung|Extension-Entwicklung]] * [[.:code-konventionen|Code-Konventionen (pas2js)]] * [[.:build-pipeline|Build-Pipeline]]