Skip to main content

HAML-Lint

VersionLanguageWebsite
0.26.0+ (default: 0.37.1)HAML (Ruby)https://github.com/sds/haml-lint

HAML-Lint is a static analysis tool to help keep your HAML files clean and readable. In addition to HAML-specific style and lint checks, it can check them by integrated RuboCop rules.

Getting Started#

To start using HAML-Lint, enable it in your repository settings.

Default Configuration#

You can configure HAML-Lint via a file named .haml-lint.yml. But, if this file does not exist in your repository, Sider uses the default configuration instead.

Similarly, if a .rubocop.yml file does not exist, Sider uses the default configuration for RuboCop.

See also the HAML-Lint configuration for details.

Configuration#

Here is an example configuration via sider.yml:

linter:  haml_lint:    target: src    include_linter:      - EmptyScript      - LineLength      - MultilinePipe    exclude_linter:      - TagName    config: my-haml-lint.yml    exclude:      - app/views/layouts/application.html.haml    parallel: true

You can use several options to fine-tune HAML-Lint to your project.

NameTypeDefault
root_dirstring-
dependenciesstring[], map[]-
targetstring, string[].
include_linterstring, string[]-
exclude_linterstring, string[]-
configstring-
excludestring, string[]-
parallelbooleantrue

target#

This option allows you to specify files or directories you want to analyze. Glob is also available.

file#

caution

This option is deprecated. Use the target option instead.

include_linter#

This option allows you to specify rule names you want to run. See also the --include-linter option.

exclude_linter#

This option allows you to specify rule names you don't want to run. See also the --exclude-linter option.

config#

This option allows you to specify your config file path for HAML-Lint. See also the --config option and "Default Configuration".

exclude#

This option allows you to exclude files from being analyzed. See also the --exclude option.

parallel#

This option allows you to run linters in parallel (since 0.36.0). See also the --parallel option.