Skip to content

Provide consistency for end-of-line chars after 'apio format'. #695

@zapta

Description

@zapta

Currently 'apio format' which uses the verible formatter may leave mixed eol chars in a file and create spurious diff due to eol changes.

This issue is to look into it and provide the user with a clear and documented way to set the eol policy during formatting, using the verible formatter flag or a new apio format flag.

Possible policies may look like:

  • No change
  • Force LF
  • Force CR/LF
  • Use the native LF or CR/LF on the underlying system.

Verible formatter usage: https://github.com/chipsalliance/verible/blob/master/verible/verilog/tools/formatter/README.md

Verible formatter flag values
https://github.com/chipsalliance/verible/blob/c1271a00bfb1753a29f37534b4853d9c765eece5/verible/common/formatting/basic-format-style.h#L26

TODO: Add steps to reproduce the problem: formatting on macos, checking in to github, formatting on windows, diff.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions