lint_chapel_code
Lints Chapel code using chplcheck, returns warnings and optionally applies automatic fixes.
Instructions
Lints Chapel code using chplcheck and returns warnings and fixed code.
Args: program_text: The Chapel code to lint program_name: The name of the program file fix: Whether to apply automatic fixes to the code custom_rules: List of specific rules to enable (if None, uses default rules)
Returns: A dictionary containing linting results, which may include: - 'warnings': String containing linting warnings - 'fixed_code': The fixed code if fix=True - 'error': Error message if something went wrong - 'stats': Statistics about the linting process
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"program_text": "<program_text>"
},
"name": "lint_chapel_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| program_text | Yes | ||
| program_name | No | program.chpl | |
| fix | No | ||
| custom_rules | No |