Add variable validation features to README and CLI; implement linting and strict mode for environment variables in executor and linter. Enhance VSCode extension documentation for improved user guidance.

This commit is contained in:
sebseb7
2025-07-22 09:59:12 +02:00
parent 85537b26bf
commit 9e73900197
5 changed files with 66 additions and 5 deletions

View File

@@ -57,8 +57,24 @@ dump "login_page"
- Unknown HTML elements
- Generic element selectors
- Semantic misuse (e.g., `click` on input fields)
- **Undefined variables**: Variables that are not commonly defined environment variables
### Info
- Environment variable usage
- Command placement suggestions
- Best practice tips
- Best practice tips
## Variable Validation
The extension now provides enhanced validation for environment variables:
- **Common variables** like `$PASSWORD`, `$PASSWORDMAIL`, `$EMAIL`, `$USERNAME`, `$API_KEY`, `$TOKEN`, `$BASE_URL` show as info messages
- **Undefined variables** that are not commonly defined show as warnings
- Use the CLI with `--strict-variables` flag to treat undefined variables as errors during execution
## CLI Integration
The extension works with the PlayWrong CLI which supports:
- `--lint` - Run linter before execution
- `--strict` - Treat linter warnings as errors
- `--strict-variables` - Treat undefined variables as errors during execution