Skip to main content
smarty-lint is a linter for Smarty 3 template files that checks for common issues such as incorrect operator usage, naming conventions, empty blocks, and unquoted strings. CodeRabbit runs smarty-lint v0.3.3.

Files

smarty-lint runs on files with the following extension:
  • .tpl

Configuration

boolean
default:true
Enable smarty-lint
.coderabbit.yaml
CodeRabbit lints each template under review with the nearest smartylint.json, looking first in the template’s own directory and then in its parent directories. File patterns in a smartylint.json are relative to the directory that contains it, and a template is linted only if it matches the patterns of its own config. Templates under review are the only ones linted, even when a config’s patterns match other files. Templates with no smartylint.json in their directory or above it are linted with a temporary config that lists just those templates. If smartylint.js is present, CodeRabbit skips smarty-lint rather than executing a JavaScript config file. CodeRabbit runs only smarty-lint’s bundled rules. Rule modules in your repository can’t add custom rules or replace the bundled ones.

When we skip smarty-lint

CodeRabbit will skip running smarty-lint when:
  • No .tpl files are found in the pull request.
  • smarty-lint is already running in GitHub workflows.
  • smartylint.js is present in the repository.