Skip to content
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

fix some typos and style in code and documentation #201

Merged
merged 1 commit into from Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -38,7 +38,7 @@ GCI splits all import blocks into different sections, now support six section ty
- localmodule: Put imports from local packages in a separate group

The priority is standard > default > custom > blank > dot > alias > localmodule, all sections sort alphabetically inside.
By default, blank , dot and alias sections are not used and the corresponding lines end up in the other groups.
By default, blank, dot, and alias sections are not used, and the corresponding lines end up in the other groups.

All import blocks use one TAB(`\t`) as Indent.

Expand Down
8 changes: 4 additions & 4 deletions pkg/config/config.go
Expand Up @@ -39,8 +39,8 @@ type YamlConfig struct {
SectionStrings []string `yaml:"sections"`
SectionSeparatorStrings []string `yaml:"sectionseparators"`

// Since history issue, Golangci-lint needs Analyzer to run and GCI add an Anzlyzer layer to integrate.
// The ModPath param is only from analyer.go, no need to set it in all other places.
// Since history issue, Golangci-lint needs Analyzer to run and GCI add an Analyzer layer to integrate.
// The ModPath param is only from analyzer.go, no need to set it in all other places.
ModPath string `yaml:"-"`
}

Expand Down Expand Up @@ -98,8 +98,8 @@ func ParseConfig(in string) (*Config, error) {
}

// configureSections now only do golang module path finding.
// Since history issue, Golangci-lint needs Analyzer to run and GCI add an Anzlyzer layer to integrate.
// The path param is from analyer.go, in all other places should pass empty string.
// Since history issue, Golangci-lint needs Analyzer to run and GCI add an Analyzer layer to integrate.
// The path param is from analyzer.go, in all other places should pass empty string.
func configureSections(sections section.SectionList, path string) error {
for _, sec := range sections {
switch s := sec.(type) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/gci/testdata.go
Expand Up @@ -421,7 +421,7 @@ import (
`,
},
{
"comment-whithout-whitespace",
"comment-without-whitespace",

commonConfig,

Expand Down