Git Product home page Git Product logo

yamlfmt's People

Contributors

devopsjonas avatar edasl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

priximmo

yamlfmt's Issues

formatted output is not yamllint friendly

Hi

Thanks for your library. It is very easy to get installed. I believe it is a great start.

I had a go with your tool and left some feedback for you.

Cheers.

I understand that you may not have imagined I would use your tool in this way. I thought I had better to log an issue for your discretion. Here is where I got started with the file below. I would like it to be yaml lint compliant:

./changelog.yml
  1:1       warning  missing document start "---"  (document-start)
  17:81     error    line too long (82 > 80 characters)  (line-length)

After running your tool against it, I got more warnings instead:

./changelog.yml
  1:1       warning  missing document start "---"  (document-start)
  4:1       error    wrong indentation: expected 2 but found 0  (indentation)
  7:5       error    wrong indentation: expected 2 but found 4  (indentation)
  13:5      error    wrong indentation: expected 2 but found 4  (indentation)
  13:81     error    line too long (115 > 80 characters)  (line-length)
  18:81     error    line too long (86 > 80 characters)  (line-length)
  24:5      error    wrong indentation: expected 2 but found 4  (indentation)
  24:81     error    line too long (81 > 80 characters)  (line-length)
  25:81     error    line too long (85 > 80 characters)  (line-length)
  33:5      error    wrong indentation: expected 2 but found 4  (indentation)
  36:5      error    wrong indentation: expected 2 but found 4  (indentation)
  42:5      error    wrong indentation: expected 2 but found 4  (indentation)
  50:5      error    wrong indentation: expected 2 but found 4  (indentation)
  50:81     error    line too long (84 > 80 characters)  (line-length)
  61:5      error    wrong indentation: expected 2 but found 4  (indentation)
  67:5      error    wrong indentation: expected 2 but found 4  (indentation)
  71:5      error    wrong indentation: expected 2 but found 4  (indentation)
  78:5      error    wrong indentation: expected 2 but found 4  (indentation)

Comments not preserved and keys reordered in output

yamlfmt produces output that has no comments that were in the input and also keys in maps are sorted so it might look very different from the original input.

I would find it very useful if there was support for a less intrusive formatting that keeps the comments and original layout of the input file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.