From b91f3a8c7c9a333f405f254405698a4e1ac3a68e Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Mon, 1 Apr 2024 03:22:05 +0200 Subject: [PATCH] fix some typos and style in code and documentation (#201) Signed-off-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com> --- README.md | 2 +- pkg/config/config.go | 8 ++++---- pkg/gci/testdata.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 851d37d..8560205 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/pkg/config/config.go b/pkg/config/config.go index 33ea8d2..cc43f2f 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -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:"-"` } @@ -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) { diff --git a/pkg/gci/testdata.go b/pkg/gci/testdata.go index 4f60e88..866ae84 100644 --- a/pkg/gci/testdata.go +++ b/pkg/gci/testdata.go @@ -421,7 +421,7 @@ import ( `, }, { - "comment-whithout-whitespace", + "comment-without-whitespace", commonConfig,