-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make everything prettier #46
Conversation
testFile
Outdated
@@ -0,0 +1 @@ | |||
hello{ hi] {}) { test. hel { . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for creating this. There are some more rules that came up to my mind, but don't worry if they are too complex to create a script for:
Enforce empty line between method name and first line of code or local variables
dummyMethod
^ self
and
dummyMethod
|local|
^ self
instead of
dummyMethod
^ self
and
dummyMethod
|local|
^ self
Remove space before/after |
|local1 local2|
instead of
| local1 local2 |
Enforce spaces around @
12 @ 34
instead of
12@34
format.sh
Outdated
sed -i 's/_/:=/g' $files | ||
|
||
#Spaces befor dots | ||
sed -i 's/[ ]\+\./\./g' $files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some cases where we want to have spaces in front of (as well as after) dots: Array literals (e.g. {1 . 2 . 3}
).
Do you think it will be possible to create an exception for this?
chooseFileMatchingSuffixes: {'svg'. 'svgz'} | ||
label: 'Choose an SVG file (.svg,.svgz)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your rules seem to be a bit to aggressive. String literals (as well as comments, I don't know whether there are some cases) shouldn't be changed
Spaces around @ is easy. But I'm not really sure if I like it. But take a look yourself :) |
Personally, I don't care whether there are spaces around |
1581894
to
dcfd3a6
Compare
dcfd3a6
to
716c5df
Compare
Apply sed magic to make codestyle more consistent.