GithubHelp home page GithubHelp logo

Comments (6)

giovannipizzi avatar giovannipizzi commented on August 18, 2024

Hi, at the moment even if the splitting is not done automatically, I would like to stop as an error if the line is too long, and switching this on with a command-line switch. The reason is that I'm using

By looking at the code, the way I would do it is to have a flag that converts WARNING level logs to errors and stop.
What do you think? (Another option: if there is any output from the code, then stop)
Or is there an easy way to say to pre-commit "if there is output in stderr, please stop"?

from fprettify.

pseewald avatar pseewald commented on August 18, 2024

I'd prefer to not introduce such a flag and to stop only for failures. It is not a problem for fprettify to handle long lines. As long as the input code is standard conforming, fprettify should not stop with an error. So I leave it up to you to check the warning message (but I don't know how to do that with pre-commit).

from fprettify.

giovannipizzi avatar giovannipizzi commented on August 18, 2024

I see your point, but at the moment the indentation is wrong and until this issue is fixed we get a "wrong" output... a person can easily split and run again fprettify.

I understand you don't want to change the code, but would you accept an extension (optional for users) to the pre-commit file in your repo, that wraps fprettify and exits with a non-zero error code if there is any output? Most people wouldn't notice but I could use it.

from fprettify.

giovannipizzi avatar giovannipizzi commented on August 18, 2024

Never mind, I think I found a way to do this directly in my repo: giovannipizzi/wannier90@01d1231

from fprettify.

varchasgopalaswamy avatar varchasgopalaswamy commented on August 18, 2024

is line splitting going to be implemented? It would be very helpful for legacy code

from fprettify.

pseewald avatar pseewald commented on August 18, 2024

I still agree that this should be a feature, unfortunately I won't have time in the near future to implement this.

from fprettify.

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.