Sha256: 67fc2d5544b3d3a63aa3d2e5c1ca61227be5573f1692c93a1798a91a3a154d4f

Contents?: true

Size: 1.07 KB

Versions: 23

Compression:

Stored size: 1.07 KB

Contents

# Discourage the use of large template files (`TemplateLength`)

This check exists to discourage the use of large template files. Use partials and functions to componentize your app.

## Check Details

This check is aimed at eliminating large template files.

:-1: Examples of **incorrect** code for this check:

- Files that have more lines than the threshold

:+1: Examples of **correct** code for this check:

- Files that have less lines than the threshold

## Check Options

The default configuration for this check is the following:

```yaml
TemplateLength:
  enabled: true
  max_length: 600
```

### `max_length`

The `max_length` (Default: `200`) option determines the maximum number of lines allowed inside a liquid file.

## When Not To Use It

If you don't care about template lengths, then it's safe to disable this rule.

## Version

This check has been introduced in PlatformOS Check 0.0.1.

## Resources

- [Rule Source][codesource]
- [Documentation Source][docsource]

[codesource]: /lib/platformos_check/checks/template_length.rb
[docsource]: /docs/checks/template_length.md

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
platformos-check-0.4.12 docs/checks/template_length.md
platformos-check-0.4.11 docs/checks/template_length.md
platformos-check-0.4.10 docs/checks/template_length.md
platformos-check-0.4.9 docs/checks/template_length.md
platformos-check-0.4.8 docs/checks/template_length.md
platformos-check-0.4.7 docs/checks/template_length.md
platformos-check-0.4.6 docs/checks/template_length.md
platformos-check-0.4.5 docs/checks/template_length.md
platformos-check-0.4.4 docs/checks/template_length.md
platformos-check-0.4.3 docs/checks/template_length.md
platformos-check-0.4.2 docs/checks/template_length.md
platformos-check-0.4.1 docs/checks/template_length.md
platformos-check-0.4.0 docs/checks/template_length.md
platformos-check-0.3.3 docs/checks/template_length.md
platformos-check-0.3.1 docs/checks/template_length.md
platformos-check-0.3.0 docs/checks/template_length.md
platformos-check-0.2.2 docs/checks/template_length.md
platformos-check-0.2.1 docs/checks/template_length.md
platformos-check-0.2.0 docs/checks/template_length.md
platformos-check-0.1.0 docs/checks/template_length.md