qWeave - PL/SQL Embedded HTML/CSS/JS LinterIntelligent linting and formatting for HTML, CSS, and JavaScript embedded in Oracle PL/SQL q-quote strings. qWeave transforms your PL/SQL web procedures into a first-class development experience with real-time diagnostics, syntax highlighting, and formatting support. 🚀 Quick Start
Inline Pattern (stays within q-quotes):
Cross-boundary Pattern (breaks across quote boundaries):
✨ Features🔍 Advanced Linting
🎨 Syntax Highlighting
🛠 Developer Tools
⚙️ Configurable
📖 PL/SQL Injection PatternsqWeave supports two distinct injection patterns, each designed for specific use cases: Pattern 1: Inline Injections -
|
Pattern | Syntax | Use Case | Example |
---|---|---|---|
Inline | q'~\\|\\| expr \\|\\|~' |
Text content, simple values | <h1>q'~\\|\\| v_title \\|\\|~'</h1> |
Cross-boundary | ~'\\|\\| expr \\|\\|q'~ |
Attributes, complex injections | <div id="~'\\|\\| v_id \\|\\|q'~"> |
🎯 Commands & Usage
Command | Description | Shortcut | ||||
---|---|---|---|---|---|---|
Open Virtual Document | Preview reconstructed HTML | Command Palette | ||||
Copy Virtual HTML | Copy clean HTML to clipboard | Command Palette | ||||
Run Lint Now | Force immediate re-analysis | Command Palette | ||||
Format Document | Format embedded HTML with Prettier | Alt+Shift+F | ||||
**Inline to q'~\ | \ | … \ | \ | ~'** | Quick Fix for injection patterns | Ctrl+. |
⚙️ Configuration
Access via VS Code Settings → Extensions → qWeave:
Core Settings
qWeave.enableHtml
: Enable HTML diagnostics (default: true)qWeave.enableCss
: Enable CSS diagnostics (default: true)qWeave.enableJs
: Enable JavaScript diagnostics (default: true)qWeave.debounceMs
: Analysis delay in milliseconds (default: 300)
Advanced HTML Checks
qWeave.htmlAdvanced.imgAltRequired
: Require alt attributes on images (default: true)qWeave.htmlAdvanced.anchorRelForTargetBlank
: Require rel="noopener noreferrer" for target="_blank" (default: true)qWeave.htmlAdvanced.noInlineStyle
: Warn on inline style attributes (default: false)
Linter Configuration
qWeave.useStylelintRc
: Use project Stylelint config (default: true)qWeave.useEslintRc
: Use project ESLint config (default: true)qWeave.eslintRules
: Additional ESLint rules object (default: {})qWeave.jsSourceType
: Parse as "script" or "module" (default: "script")
🔧 How It Works
- Detection: Scans for
variable CLOB := q'~...~';
patterns - Parsing: Extracts literal HTML and dynamic PL/SQL segments
- Reconstruction: Builds virtual HTML with safe placeholders
- Analysis: Runs HTML/CSS/JS linters on virtual document
- Mapping: Maps diagnostics back to original PL/SQL positions
- Display: Shows errors/warnings directly in your PL/SQL file
🎨 Syntax Highlighting
qWeave provides rich syntax highlighting for:
- HTML structure within q-quotes
- CSS in
<style>
blocks - JavaScript in
<script>
blocks - PL/SQL expressions in both injection patterns
- Proper scoping and context-aware highlighting
📋 Requirements
- VS Code: 1.84 or higher
- File Types:
.sql
,.pls
,.plsql
,.pks
,.pkb
,.pkg
,.bdy
- Language Mode: PL/SQL or SQL
🐛 Troubleshooting
No diagnostics appearing?
- Ensure file language is set to "PL/SQL" or "SQL"
- Check that your CLOB starts with
variable CLOB := q'~
- Run "qWeave: Run Lint Now" to force analysis
Syntax highlighting not working?
- Reload VS Code window after installation
- Verify file extension is recognized (
.sql
,.plsql
, etc.)
Format Document not available?
- Set qWeave as default formatter in Settings
- Or use Command Palette → "Format Document With..." → qWeave
📄 License
MIT License - see LICENSE file for details.
Made for Oracle PL/SQL developers who build web applications with embedded HTML/CSS/JavaScript.