Validation rules define the code quality standards enforced by goLLM. These rules help maintain consistent code quality across your project.
max_line_lengthmax_function_linesmax_file_linesmax_cyclomatic_complexitymax_function_paramsforbid_print_statementstrueprint() statements in favor of logging.forbid_global_variablestruerequire_docstringstruerequire_type_hintsfalsenaming_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"