Validation rules define the code quality standards enforced by goLLM. These rules help maintain consistent code quality across your project.
max_line_length
max_function_lines
max_file_lines
max_cyclomatic_complexity
max_function_params
forbid_print_statements
true
print()
statements in favor of logging.forbid_global_variables
true
require_docstrings
true
require_type_hints
false
naming_convention
"snake_case"
"snake_case"
, "camelCase"
, "PascalCase"
{
"validation_rules": {
"max_function_lines": 50,
"max_file_lines": 300,
"max_cyclomatic_complexity": 10,
"max_function_params": 5,
"max_line_length": 88,
"forbid_print_statements": true,
"forbid_global_variables": true,
"require_docstrings": true,
"require_type_hints": false,
"naming_convention": "snake_case"
}
}
You can customize these rules by creating or modifying the gollm.json
file in your project root. Run gollm validate
to check your code against the current rules.
Each rule can have one of the following severity levels:
error
: Will fail the validationwarning
: Will show a warning but pass validationoff
: Disables the ruleTo disable a specific rule, you can either:
false
in the configuration"off"