-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid spurious single-line commas (#75)
Somewhat defensively, nph was putting a comma on a new line after certain complex constructs, in particular when using a complex expression in a parameter list - it turns out that this comma can stay on the same line most of the time, as long as an `nkCommand` is not involved
- Loading branch information
1 parent
c84aa21
commit 8b261be
Showing
9 changed files
with
17 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,14 @@ git ls-files | grep ".nim$" | xargs -n1 nph | |
|
||
! git diff --exit-code > /dev/null || { echo "This repository is already formatted" ; exit 0 ; } | ||
|
||
git commit -am "Formatted with nph $(nph --version)" | ||
git commit -am "Formatted with nph $(nph --version)" --author "nph <[email protected]>" | ||
|
||
echo "# Formatted with nph $(nph --version)" >> .git-blame-ignore-revs | ||
echo "$(git rev-parse HEAD)" >> .git-blame-ignore-revs | ||
|
||
git add .git-blame-ignore-revs | ||
git commit -m "Add $(git rev-parse HEAD) to .git-blame-ignore-revs" | ||
git commit -m "Add $(git rev-parse HEAD) to .git-blame-ignore-revs" --author "nph <[email protected]>" | ||
|
||
echo "The repo has been updated with two commits recording the reformatting and blame information." | ||
echo "You can review the changes with 'git diff HEAD^^' before pushing to a public repository." | ||
echo "If you don't want blame information, remove the last commit with 'git reset --hard HEAD^'." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,10 +94,10 @@ proc commitProject( | |
|
||
try: | ||
exec "git checkout -b nph" | ||
exec "git commit -am \"Formatted with nph $(nph --version)\"" | ||
exec "git commit -am \"Formatted with nph $(nph --version)\" --author \"nph <[email protected]>\"" | ||
except: | ||
exec "git checkout nph" | ||
exec "git commit -am \"Formatted with nph $(nph --version)\" --amend" | ||
exec "git commit -am \"Formatted with nph $(nph --version)\" --amend --author \"nph <[email protected]>\"" | ||
|
||
cd "../.." | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,5 +94,4 @@ else: | |
|
||
discard ( | ||
aaa.bbb.exec do(res: int64): | ||
size = res | ||
).ccc() | ||
size = res).ccc() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters