-
Notifications
You must be signed in to change notification settings - Fork 0
Add advanced SPL command and function parameter validation to Language Server #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: behemothsecurity <97615419+behemothsecurity@users.noreply.github.com>
…cumentation Co-authored-by: behemothsecurity <97615419+behemothsecurity@users.noreply.github.com>
…atures Co-authored-by: behemothsecurity <97615419+behemothsecurity@users.noreply.github.com>
…sting results Co-authored-by: behemothsecurity <97615419+behemothsecurity@users.noreply.github.com>
Co-authored-by: behemothsecurity <97615419+behemothsecurity@users.noreply.github.com>
|
@copilot
|
… as unknown Co-authored-by: behemothsecurity <97615419+behemothsecurity@users.noreply.github.com>
Fixed in commit 8e2c55a. The issue was that validation was only checking the enhanced database (26 commands), not the basic database (64 commands). Now: ✅ Commands like The validation logic now:
Tested with new unit test showing eval commands work correctly. |
Advanced SPL Command and Function Validation Implementation ✅
Summary
Successfully implemented comprehensive parameter validation for SPL commands and functions in the SyntaxTide VS Code extension. The implementation adds real-time validation of command arguments and function parameters, catching syntax errors as users write SPL queries.
Recent Fix
Fixed validation logic (commit 8e2c55a):
evalwere incorrectly flagged as unknownAll Implementation Tasks Complete ✅
Key Deliverables
Core Implementation (5 new files, 5 modified):
Testing Infrastructure (6 files):
Documentation (4 files updated/created):
Validation Features Demonstrated
Command Validation:
Function Validation:
Testing Results ✅
Unit Tests: All passing
Performance:
Ready for Production ✅
The implementation is complete, tested, documented, and ready for use. The validation logic correctly handles:
Original prompt
Now I'd like us to add function and commands parameter validation. I notice now that I can write bad SPLs but the validation doesn't catch it.
I'd like you to propose a solution to perform more advanced forms of validation for commands and functions.
I further want you to pay very close attention to the usual syntax of a SPL and further enrich highlighting and LSP where possible. You may further research query-languages/splunk/ANALYSIS but also query-languages/splunk/documentation to browse and leverage more advanced SPL knowledge where needed.
Ensure you update the relevant README and CHANGELOG after your implement the feature
[Chronological Review: The conversation began with the user requesting a review of recent research on Splunk Processing Language (SPL) to enhance syntax highlighting. The user then reported issues with the setup script, syntax highlighting, and variable visibility in the Language Server Protocol (LSP). The user expressed dissatisfaction with the handling of YAML files and requested improvements to the TextMate grammar. The conversation progressed to developing a proof of concept LSP for SPL, followed by deep dives into SPL documentation for comprehensive feature coverage. The user requested updates to the README and changelog, and improvements to variable extraction and validation. The conversation culminated in a request for advanced validation for SPL commands and functions, emphasizing the need for enriched highlighting and LSP functionality.][Intent Mapping:
[Technical Inventory:
[Code Archaeology:
src/server.ts: To be reviewed and improved for formatting and conventions.tests/lsp-test.yaml: Used for testing LSP functionality.tests/lsp-test-variables.yaml: Used for variable extraction testing.tests/query-highlighting.yaml: Related to syntax highlighting issues.src/spl-commands-database.ts: To be checked for recent changes.[Progress Assessment:
[Context Validation: All critical information for continuation is captured, including user requests for improvements, specific files to check, and the need for documentation updates.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: The user aimed to enhance syntax highlighting and LSP functionality for SPL, improve variable management, and implement advanced validation for SPL commands and functions. - Session Context: The conversation evolved from initial research and setup issues to developing a proof of concept LSP, addressing syntax highlighting problems, and enhancing variable extraction and validation. - User Intent Evolution: The user's needs s...
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.