-
Notifications
You must be signed in to change notification settings - Fork 52
[Request] Verification method to assure that code is formatted properly #15
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
Comments
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
when do you want to use that option? |
Formatting helps our team check-in code that looks as if it were written by one person, which helps readability. Being able to verify that these files have been formatted correctly on tools like Travis CI or TeamCity would help our team make sure that code being checked in is in fact formatted. |
@Paden release typescript-fromatter 0.4.0. try it out. |
I'm seeing a problem with
I'm using a fairly standard Any ideas? |
@myitcv I can't reproduce your issue. I got below result.
If you do not solve the problem, please make a new Issue. |
Thanks for checking. Can I just ask, what platform are you working on? Linux/Mac/Windows? |
I'm using Mac OS X. |
That's my fault, because I didn't accurately copy my failing example. In any case I think I've worked out what's going on. Let me try again, showing
Notice the blank line on the end (GitHub shows it in a strange way). Checking via
This means that This code then gobbles both line feeds, and adds back only one. If the intention here is to ensure we only have one line feed at the end of the file, I'm good with that. However, the problem arises when used in the mode (Indeed this is confirmed by the fact that if you run So I think all of our problems here are solved by replacing Thoughts? |
Worth noting that this |
I've just raised #19 to flesh out a fix for this |
Something like:
The files would not be changed, only verified according to the specs.
The text was updated successfully, but these errors were encountered: