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
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| program_text | Yes | ||
| program_name | No | program.chpl | |
| fix | No | ||
| custom_rules | No |