Comments (6)
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.
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.
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.
Never mind, I think I found a way to do this directly in my repo: giovannipizzi/wannier90@01d1231
from fprettify.
is line splitting going to be implemented? It would be very helpful for legacy code
from fprettify.
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)
- Recursive flag does not work when input is a single file HOT 2
- Streamline and document testing mechanism
- Indenting line labels HOT 1
- config file example HOT 4
- Can comments starting in column 1 be indented? HOT 2
- Feature request: Support the letters q and Q in the expression of quadruple precision variables.
- Feature Request: add optional double colon `::`
- Support for coarray syntax
- `--enable-replacements` breaks multi-line Fortran statements HOT 1
- Variable names confused w/ relational operators
- indentation fails at multiple subroutine definitions in preprocessor directives HOT 3
- Request to vertically align code blocks via various characters HOT 3
- Allow only single indentation width for function/subroutine calls that span multiple lines HOT 2
- not possible to both --disable-whitespace and enable intrinsic case formatting
- define maximum number of empty lines
- Lower case variables? HOT 4
- Lines are split improperly with --enable-replacement HOT 3
- Deactivation doesn't disable indentation
- Indentation broken for named select case statements HOT 3
- DO LOOP Format Issue? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fprettify.