Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't handle whitespace consistently between check and file write #20

Open
danielhoherd opened this issue Feb 8, 2021 · 0 comments
Open

Comments

@danielhoherd
Copy link

Running cnf-format -w foo.yaml writes different contents to file than what is checked, causing an always-fail situation.

$ nl foo.yaml
0001  Description: |-
0002    Foo
0003
0004    Bar
0005
0006    Baz
$ cfn-format -w foo.yaml 2>&1 | nl
0001  Semantic difference after formatting:
0002  (>) Description: |-
0003    Foo
0004
0005
0006    Bar
0007
0008
0009    Baz
0010
$ cfn-format -w foo.yaml 2>&1 | nl
0001  Semantic difference after formatting:
0002  (>) Description: |-
0003    Foo
0004
0005
0006    Bar
0007
0008
0009    Baz
0010
$ cfn-format -w foo.yaml 2>&1
Semantic difference after formatting:
(>) Description: |-
  Foo


  Bar


  Baz

$ echo $?
1
$ nl foo.yaml
0001  Description: |-
0002    Foo
0003
0004    Bar
0005
0006    Baz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant