HAML-Lint Changelog
April 7, 2026 ยท View on GitHub
0.73.0
- Relax
paralleldependency from~> 1.10to>= 1.10
0.72.0
- Fix
SpaceInsideParensviolations in wrapped tag attributes
0.71.0
- Revert
SpaceInsideParensviolations in wrapped tag attributes change
0.70.0
- Fix
SpaceInsideParensviolations in wrapped tag attributes
0.69.0
- Add support for HAML 7.2
0.68.0
- Add support for HAML 7.1
0.67.0
- Add support for HAML 6.4 and 7
0.66.0
- Improve performance of
InstanceVariables,MultilinePipe, andStrictLocalschecks
0.65.1
- Ensure trailing newline inserted in generated TODO file
0.65.0
- Alphabetize generated TODO file
0.64.0
- Further improve performance of RuboCop checks by enabling RuboCop's built-in cache
0.63.0
- Improve performance of RuboCop checks
0.62.0
- Improve
StrictLocalsbehavior toggling via comments
0.61.1
- Allow
StrictLocalsto be disabled by a comment
0.61.0
- Add
StrictLocalslinter to enforce declaring locals at beginning of partial
0.60.0
- Run linters in parallel by default
- Update
InstanceVariableslinter to support :ruby filters
0.59.0
- Speed up load time by preferring
require_relativein internal gem file loading
0.58.0
- Fix
block_keywordmethod returning keywords used as arguments of method call
0.57.0
- Add
GitHubReporter
0.56.0
- Rubocop: Properly pass the whitespace around tag attributes to RuboCop. This allows some improved corrections and fixes bugs.
0.55.0
- Lazily open files to avoid file descriptor exhaustion
0.54.0
- Drop support for Ruby 2.7, which reached EoL in March 2023
- Add support for
--stdin/-sflags for piping from standard input
0.53.0
- Drop Haml 4 compatibility
- Add support for conditional comments in
RuboCoplinter
0.52.0
- Add Haml 6.3 compatibility
- Add
--stderrflag - Fix
node_for_linehelper to return last possible node when nothing matches
0.51.0
- Allow Haml > 6.1
0.50.0
- Update minimum Ruby version to 2.7+
- Disable RuboCop's
Style/RedundantStringEscapecop
0.49.3
- Fix some cases where part of multiline scripts could end up less indented than the starting line of that script.
0.49.2
- Fix handling of interpolation of plain when the plain is spread over multiple lines using pipes
0.49.1
- Fix handling of multiline within interpolation to not crash for auto-correct
0.49.0
- Add
TrailingEmptyLineslinter - Omit warning output for Ruby parser patch version discrepancies
0.48.0
- Fix
Marshal.dumperror when using--paralleloption andRepeatedIdLinter - Improved support for multiline code with RuboCop linting/auto-correction
- Fix handling of ==, !, &, !=, &=, !==, &==
0.47.0
- Bugfixes related to experimental auto-correct with RuboCop
- Fix
Marshal.dumperrors when using--paralleloption
0.46.0
- Add ERB pre-processing for configuration files
- Add experimental auto-correct using RuboCop feature
- Replaced exising RuboCop Linter by a new one which should be more accurate, but may cause difference
- Minimum RuboCop version is now 1.0
- Add
NoPlaceholderslinter
0.45.0
- Add support for referencing configuration files relative to the home directory
0.44.0
- Add
inherit_gemoption to support loading configuration from gems
0.43.0
- Add support for HAML 6.1
0.42.0
- Add support for setting RuboCop configuration in
haml-lint.yml - Fix issue where
forwardablegem requirement not loaded
0.41.0
- Add support for HAML 6 beta
- Fix Ruby extractor to keep newlines in certain cases
0.40.1
- Fix
InstanceVariablescheck in multiline blocks
0.40.0
- Fix
SpaceInsideHashAttributeto allow attributes across multiple lines on HAML 5.2.
0.39.0
- Revert change to
SpaceInsideHashAttributesince it was not compatible across all HAML versions
0.38.0
- Fix config merging behavior so new empty array (the default) does not overwrite old array
- Fix
SpaceInsideHashAttributeto allow attributes across multiple lines - Add
OffenseCountReporter(use by specifying--reporter offense-count)
0.37.1
- Add
Layout/ArgumentAlignmentto list of RuboCop cops ignored by default
0.37.0
- #329 Improve performance by reusing
RuboCop::CLIinstance
0.36.0
- #322 Add support for
--parallelflag to run linters in parallel - #326 Relax
hamlgem version constraint to allow 5.2.x
0.35.0
0.34.2
- Update ignored cops to support cop renames introduced by RuboCop 0.79.0
0.34.1
- Update ignored cops to support cop renames introduced by RuboCop 0.77.0
0.34.0
- #313 Remove explicit dependency on Rake, making it optional as it's only need for the Rake integration
0.33.0
- #312 - Fix handling of
haml-lint:disabledirectives in some cases
0.32.0
0.31.0
- Allow HAML Lint spec helpers to be loaded with
requirein other projects
0.30.0
- Drop support for HAML 4.1 beta
- Fix broken Rake task regression introduced in 0.28.0
0.29.0
- Fix
--auto-gen-configto allow running with an existing configuration file - Fix
configoption for the Rake task to not be ignored - Fix the span of multiline nodes to be more precise
- Ignore
Layout/AlignHashcops by default - Drop support for Ruby 2.3 or older
- Allow
ViewLengthlinter to be disabled inline - Allow comment banners in
LeadingCommentSpacelinter
0.28.0
- Fix
ClassAttributeWithStaticValueto gracefully handle certain malformed attributes - Add ability to include custom linters
- Drop support for Ruby 2.1
- Fix passing absolute filenames ignoring relative path excludes config
0.27.0
- Respect severity levels of RuboCop cops in reported lints
- Fix
--fail-leveland--fail-fastto work when specified together - Fix erroneous
Layout/CommentIndentationcop warnings for HAML multiline comments - Update default RuboCop exclusions to handle new
Layout/ElseAlignment,Layout/EndOfLine,Metrics/BlockNesting, andNaming/FileNamecops which were moved to new namespaces.Style/FinalNewlinewas removed. - Require RuboCop 0.50.0 or newer
- Drop support for Ruby 2.0 since RuboCop dropped support (Ruby 2.1+ is still supported)
0.26.0
- Add support for RuboCop 0.49.0+
- Require RuboCop 0.49.0+ due to breaking upstream change
- Condense generated
.haml-lint_todo.ymlfile by usingenabled: falsefor linters with lints in more than 15 files - Fix
UnnecessaryInterpolationlinter for two-character variables - Add
ViewLengthlinter for checking whether a view has too many lines in it.
0.25.1
- Fix error on nodes with attributes assigned dynamically (#232)
0.25.0
- Add
max_consecutiveoption toConsecutiveCommentslinter - Fix
TrailingWhitespacelinter to report correct line for multiline nodes - Add
InlineStyleslinter to check for use of thestyleattribute - Add support for Haml 5.0.0+
0.24.0
- Add new Indentation linter
- Add
--auto-gen-configto generate a "todo-list" of offenses to fix - Add
inherits_fromto configuration to allow reusability - Prevent crashing when unexpected syntax is discovered
0.23.2
-
Handle different line endings in files
-
Report real line number with lint for LineLength
-
Ensure RepeatedId linter resets between files
0.23.1
- Ensure RepeatedId linter resets between files
0.23.0
- Fix issue with running haml-lint on empty files
- Keep empty lines within Ruby filters
0.22.1
- Include
jsonamongst list produced by--show-reporters
0.22.0
- Allow linters to be toggled with inline comments
- Add new
progressreporter - Allow linter to
--fail-faston first file that has a lint above the given--fail-level - Add new
InstanceVariablelinter to find usage of@instance_variables - Add new
hashreporter to make integrations with other tools simpler - Add new
AlignmentTabsto catch usage of tabs for alignment - Show summary at the end when the
--summaryflag is used - Report syntax errors as a
Syntaxlinter - Add new
IdNameslinter, checking format of#id-strings - Add support for Haml 5
0.21.0
- Stop using temp files for RuboCop (#172)
0.20.0
- Update minimum RuboCop version to 0.47.0+ due to breaking change in RuboCop AST interface
0.19.0
- Relax
rakegem constraint to allow 12.x
0.18.5
- Fix
SpaceBeforeScriptto not error on tags with inline scripts spanning multiple lines with indented vertical pipes - Disable
Style/EndOfLineRuboCop cop by default
0.18.4
- Fix
ClassesBeforeIdsoutput format to handleidEnforcedStyle option better - Add
report_lintRSpec matcher to test lint message
0.18.3
- Disable
Metrics/BlockLengthcop inRuboCoplinter
0.18.2
- Fix
Checkstyleoutput format to handle lints with no associated linter - Ignore comments in
SpaceBeforeScriptlinter
0.18.1
- Fix handling of multiline HAML comments to not pass invalid Ruby code to RuboCop
0.18.0
- Fix
RuboCoplinter'signored_copssetting to not crash when empty string - Include linter name in JSON reporter output
- Allow IDs before classes to be preferred in
ClassesBeforeIdslinter - Respect HAML comments as Ruby code comments so RuboCop cops can be disabled/enabled inline via comments
0.17.1
- Fix
Checkstyleoutput format to properly quote characters in messages
0.17.0
- Add
Checkstyleoutput format - Add
EmptyObjectReferencelinter to report tags with empty object references
0.16.2
- Fix
UnnecessaryStringOutputto not erroneously warn on lines with equal signs in the middle of the line - Fix
skip_frontmatteroption to preserve line numbers
0.16.1
- Fix
RuboCoplinter to ignoreElseAlignmentandFrozenStringLiteralCommentcops by default
0.16.0
- Fix
MultilineScriptto not erroneously reportbegin/rescueblocks - Fix
ClassAttributeWithStaticValueto not erroneously reportclassattributes with method call or instance variable values - Update minimum RuboCop version to 0.36.0 to fix compatibility issues with Astrolabe gem, switching to RuboCop's own implementation instead
- Fix
RuboCoplinter to not erroneously reportStyle/IdenticalConditionalBrancheswarnings
0.15.2
- Assume UTF-8 as the default encoding for all linted files
0.15.1
- Fix
RuboCoplinter to properly parse files containing anonymous blocks with trailing comments - Fix
excludeoption to work with paths prefixed with./ - Fix
RuboCoplinter to not report erroneousStyle/Nextwarnings forifstatements indoblocks
0.15.0
- Improve bug reporting instructions in error message
- Add
Indentationlinter to enforce that spaces or tabs are used for indentation (enabled by default and defaults to spaces) - Add
FinalNewlinelinter to enforce the presence of a final newline in files - Fix
UnnecessaryStringOutputto gracefully handle script output with comments - Add verbose version flag
-V/--verbose-versionto displayhamlandrubyversion information in addition to output of-v/--versionflag
0.14.1
- Fix bug in
UnnecessaryStringOutputwhere false positives would still be reported for literal strings with interpolation
0.14.0
- Change required Ruby version from 1.9.3+ to 2.0.0+ since 1.9.3 has been EOLed
- Fix false positives in
UnnecessaryStringOutputfor strings starting with reserved HAML characters (where enclosing in a string is required) - Add
severitylinter option allowing the severity of a lint to be explicitly specified - Fix
RuboCopto report correct lines for cops reported on interpolated Ruby code in filters
0.13.0
- Rename
haml-lintgem tohaml_lintto follow RubyGems conventions for naming gems
0.12.0
- Fix non-visible line number on light-colored terminal backgrounds
- Allow files without
.hamlextension to be linted when explicitly specified - Ignore
Style/TrailingBlankLineswarnings from RuboCop by default - Fix
RuboCoplinter to not reportStyle/AlignHashwarnings for HAML code with 1.8-style hash rockets spanning multiple lines - Fix
RuboCoplinter to not reportStyle/EmptyElsewarnings for HAML code containingif/elseblocks containing only HAML filters - Add
MultilineScriptlinter to report scripts with trailing operators that should be merged with the following line - Add
AltTextlinter to report missingaltattributes onimgtags - Fix
UnnecessaryStringOutputto not report warnings for strings with methods called on them
0.11.0
- Fix
SpaceInsideHashAttributesnot reporting lints for implicit div tags - Fix
RuboCopfrom incorrectly reportingStyle/AsciiCommentscops for plain text nodes with Unicode characters - Gracefully handle missing configuration files that are explicitly given
- Improve
HamlLint::RakeTaskto support passing a list of files as task arguments. (breaks existing functionality; see README for details) - Add
--[no-]colorflags allowing colored output to be explicitly set
0.10.0
- Fix bug where hash attributes consisting only of strings/symbols written in hashrocket style were not being passed to RuboCop
- Add
SpaceInsideHashAttributeslinter which enforces spaces/no spaces inside tag attributes - Fix bug where the source code of tag hash attributes would be incorrectly extracted for hashes spanning multiple lines
- Include name of cop in lints reported by
RuboCop - Fix
LeadingCommentSpaceto not report lints on comments with multiple leading spaces
0.9.0
- Fix bug in
LeadingCommentSpacewhere empty comment lines would incorrectly report lints. - Fix bug where any
hamlversion 4.0.6 or later would not remove the special end-of-document marker from parse trees - Fix bug where RuboCop's
Style/OneLineConditionalcop would incorrectly be reported for HAML code withif/elsestatements - Fix bug where RuboCop's
Style/SymbolProccop would incorrectly be reported
0.8.0
- Fix bug in
ConsecutiveSilentScriptswhere control statements with nested HAML would incorrectly be reported as silent scripts - Fix bug in
ImplicitDivwhere incorrect lint would be reported fordivtags with dynamic ids or classes - Fix bug in
ClassAttributeWithStaticValuewhere syntax errors in attributes would result in a crash - Add
TrailingWhitespacelinter which checks for whitespace at the end of a line - Fix bug where last statement of HAML document would be removed when using
haml4.1.0.beta.1 - Fix bug where
ObjectReferenceAttributeswould incorrectly report a bug for all tags when usinghaml4.1.0.beta.1
0.7.0
- New lint
UnnecessaryInterpolationchecks for interpolation in inline tag content that can be written more concisely as just the expression - New lint 'UnnecessaryStringOutput` checks for script output of literal strings that could be converted to regular text content
- New lint
ClassesBeforeIdschecks that classes are listed before IDs in tags - Linter name is now included in output when error/warning reported
- New lint
RubyCommentschecks for comments that can be converted to HAML comments - New lint
EmptyScriptchecks for empty scripts (e.g.-followed by nothing) - New lint
LeadingCommentSpacechecks for a space after the#in comments - Fix bug where including and excluding the same linter would result in a crash
- New lint
ConsecutiveCommentschecks for consecutive comments that could be condensed into a single multiline comment - New lint
ConsecutiveSilentScriptschecks for consecutive lines of Ruby code that could be condensed into a single:rubyfilter block - Fix bug in Linter::UnnecessaryStringOutput when tag is empty
- Add
skip_frontmatteroption to configuration which customizes whether frontmatter included at the beginning of HAML files in frameworks like Jekyll/Middleman are ignored - Change parse tree hierarchy to use
HamlLint::Tree::Nodesubclasses instead of theHaml::Parser::ParseNodestruct to make working with it easier - New lint
ObjectReferenceAttributeschecks for the use of the object reference syntax to set the class/id of an element - New lint
HtmlAttributeschecks for the use of the HTML-style attributes syntax when defining attributes for an element - New lint
ClassAttributeWithStaticValuechecks for assigning static values for class attributes in dynamic hashes
0.6.1
- Add rake task integration
- Fix broken
--helpswitch - Silence
LineLengthRuboCop check - Upgrade Rubocop dependency to >= 0.25.0
0.6.0
- Fix crash when reporting a lint from Rubocop that did not include a line number
- Allow
haml-lintto be configured via YAML file, either by automatically loading.haml-lint.ymlif it exists, or via a configuration file explicitly passed in via the--configflag - Update RuboCop dependency to >= 0.24.1
- Rename
RubyScriptlinter toRuboCop - Add customizable
LineLengthlinter to check that the number of columns on each line in a file is no greater than some maximum amount (80 by default) - Gracefully handle invalid file paths and return semantic error code
0.5.2
- Use >= 0.23.0 for RuboCop dependency
0.5.1
- Ignore the
NextRubocop cop - Fix crash when reporting a lint inside string interpolation in a filter
0.5.0
- Ignore the
FileNameRubocop cop - Fix loading correct .rubocop.yml config
0.4.1
- Relax HAML dependency from
4.0.3to4.0+
0.4.0
- Upgrade
rubocopdependency from0.15.0to0.16.0 - Fix broken
--show-lintersflag - Ignore
BlockAlignment,EndAlignment, andIndentationWidthRubocop lints - Fix bug where
SpaceBeforeScriptlinter would incorrectly report lints when the same substring appeared on a line underneath a tag with inline script
0.3.0
- Fix bug in
ScriptExtractorwhere incorrect indentation would be generated for:rubyfilters containing code with block keywords - Differentiate between syntax errors and lint warnings by outputting severity
level for lint (
EandW, respectively). - Upgrade
rubocopdependency to0.15.0
0.2.0
- New lint
ImplicitDiv%divs which are unnecessary due to a class or ID specified on the tag - New lint
TagNameensures tag names are lowercase - Minimum version of Rubocop bumped to
0.13.0 - New lint
MultilinePipeensures the pipe|character is never used for wrapping lines
0.1.0
- New lint
SpaceBeforeScriptensures that Ruby code in HAML indicated with the-and=characters always has one space separating them from code - New lint
RubyScriptintegrates with Rubocop to report lints supported by that tool (respecting any existing.rubocop.ymlconfiguration)