Skip to content

hackfmt overindents docblocks if input contains tabs #8211

@ssandler

Description

@ssandler

HHVM Version

hh_client --version
hh-4a60dc2e4ccbca67883a3d945806d07d57db8a5e-3.24.6 Tue Apr  3 14:35:32 2018

hhvm --version
HipHop VM 3.24.6-0-slack (rel)
Compiler: 1522791322_N
Repo schema: bda5c3fb6f702a10e423d69e81f99d2e5ee0664c

Operating System and Version

MacOS High Sierra

Standalone code, or other way to reproduce the problem

https://gist.github.com/ssandler/a4b49b290640d92b615f1373c6b0de17

Using the above file, run this command:

hackfmt --in-place --indent-width 8 --tabs --line-width 160 test.php

This only repros if the file starts off with tab indenting to begin with, so make sure that wherever you paste this into, you have tabs in the file.

Actual result

Each time I run hackfmt, it indents part of the docblock by one level.
fmt

Expected result

The code should be unchanged by formatting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions