Giter VIP home page Giter VIP logo

Comments (2)

rquadling avatar rquadling commented on June 12, 2024

Interesting issue. One that I came across before. The npm-ini package has a similar issue related to generating INI files (npm/ini@6a3cb38).

Their solution was to use define line endings based upon detecting of the OS, but allow the override if required.

Is that a "better" option? If you are on a Windows environment, it is pretty much a standard thing that the files will be made with CRLF, and so, having to set an option for the expected default behaviour would seem a bit odd.

As the binaries are built for different operating systems, is it acceptable to have the default value for line endings based upon the target OS?

I'm not a go expert, and so whilst this idea may be fine for npm-ini, it may not be "how things are done" in Go apps.

from terraform-docs.

timothy-mcroy avatar timothy-mcroy commented on June 12, 2024

That would require that everyone executing terraform-docs does so from the same OS as well as having the same vcs client configurations, right? Any contributor for my terraform project who used windows when we're on *nix or vice-versa would generate docs that flip the line endings. Plus, you can only run terraform docs --output-check as part of your CI process with one OS, so flipping between them isn't nice either. And that's not really backward compatible, since however many windows clients would suddenly start using CRLF line endings with little explanation.

from terraform-docs.

Related Issues (20)

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.