Slim-Lint – configurable tool for analyzing Slim templates

Slim-Lint is a command-line utility for checking Slim templates for style, consistency, and common problems.

It helps keep Slim files clean and readable, supports a configurable set of built-in linters, and integrates with RuboCop so Ruby code embedded in templates can be analysed too. The tool can be run manually, wired into source control hooks, or used in CI workflows to catch issues early in development.

This is free and open source software.

Key Features

  • Lints Slim template files from the command line, including recursive directory scans and explicit file lists.
  • Uses a `.slim-lint.yml` configuration file to control linter behaviour, file inclusion, and file exclusion rules.
  • Includes built-in checks for issues such as empty lines, line length, redundant divs, tag case, tabs, trailing whitespace, and more.
  • Integrates with RuboCop to apply static analysis to Ruby code contained in Slim templates.
  • Supports inline disabling and enabling of specific slim-lint linters and RuboCop cops for selected code sections.
  • Can ignore frontmatter used by static site generators such as Jekyll.
  • Works with editor integrations, Git hooks, GitHub Actions, and Rake tasks.

Website: github.com/sds/slim-lint
Support:
Developer: Shane da Silva
License: MIT License

Slim-Lint is written in Ruby. Learn Ruby with our recommended free books and free tutorials.


Related Software

Ruby Linters
RuboCopRuby static code analyzer and formatter
ReekExamines Ruby classes, modules, and methods
BrakemanStatic analysis tool
ERB LintLint your ERB or HTML files

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments