Skip to content

Last list item if commented will be indented two spaces after formatting #112

@djgoku

Description

@djgoku

Originally posted here: #74 (comment)

input yaml:

repos:
  - repo: https://github.com/antonbabenko/pre-commit-terraform
    rev: v1.77.2
    hooks:
      # - id: infracost_breakdown
      - id: terraform_fmt
      # - id: terraform_providers_lock
      - id: terraform_validate
      # - id: terrascan

output yaml:

repos:
  - repo: https://github.com/antonbabenko/pre-commit-terraform
    rev: v1.77.2
    hooks:
      # - id: infracost_breakdown
      - id: terraform_fmt
      # - id: terraform_providers_lock
      - id: terraform_validate
        # - id: terrascan <-- two leading spaces

Metadata

Metadata

Assignees

No one assigned

    Labels

    yaml_v3_problemA bug in the underlying yaml library. These issues are vastly harder to fix.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions