This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 646
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposal to implement collapsing (#500)
* With this commit: 1. Add new setting "go.blockImportsOnly" 2. Add parsing of package name for single import lines 3. When the user adds an import manually and there is already one or more single imports, collapse it all into a block if go.blockImportsOnly is true. * WTC: 1. Fix linter issues * Remove unused import * With this commit: 1. Back out package name parsing 2. Remove setting from package.json (always use block imports) 3. Switch up how block import is created to preserve comments and special imports * Post rebase cleanup * Add tests
- Loading branch information
1 parent
acecbf2
commit 3790d5f
Showing
6 changed files
with
96 additions
and
15 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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package hello | ||
|
||
import ( | ||
"fmt" | ||
"math" | ||
) | ||
|
||
func one() { | ||
fmt.Print(math.Max(1, 2)) | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
package hello |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package hello | ||
|
||
import "fmt" | ||
import . "math" // comment | ||
|
||
func two() { | ||
fmt.Print(Max(1, 2)) | ||
} |
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