Skip to content

Commit d9b04a1

Browse files
style: run go fmt ./...
1 parent 7be7f24 commit d9b04a1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/cmd/lint.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func getCommitMsg(fileInput string) (string, error) {
122122
}
123123

124124
func trimRightSpace(s string) string {
125-
return strings.TrimRightFunc(s, unicode.IsSpace)
125+
return strings.TrimRightFunc(s, unicode.IsSpace)
126126
}
127127

128128
func cleanupMsg(dirtyMsg string) (string, error) {
@@ -134,7 +134,7 @@ func cleanupMsg(dirtyMsg string) (string, error) {
134134
// * strip trailing whitespace
135135
// * collapse consecutive empty lines
136136
// TODO: check via "git config --get" if any of those two hardcoded constants was reconfigured
137-
// TODO: find out if commit messages on windows actually
137+
// TODO: find out if commit messages on windows actually
138138

139139
gitCommentChar := "#"
140140
scissors := gitCommentChar + " ------------------------ >8 ------------------------"
@@ -149,7 +149,7 @@ func cleanupMsg(dirtyMsg string) (string, error) {
149149
if strings.HasPrefix(line, gitCommentChar) {
150150
// strip commentary
151151
continue
152-
}
152+
}
153153
line = trimRightSpace(line)
154154
// strip trailing whitespace
155155
if lastLine == "" && line == "" {
@@ -165,7 +165,7 @@ func cleanupMsg(dirtyMsg string) (string, error) {
165165
lastLine = line
166166
}
167167
if lastLine == "" {
168-
//strip trailing empty line
168+
// strip trailing empty line
169169
cleanMsg = strings.TrimSuffix(cleanMsg, "\n")
170170
}
171171
return cleanMsg, nil

internal/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ func (c ConfigType) String() string {
3939

4040
// LookupConfigPath returns config file path following below order
4141
// 1. env path
42-
// 2. commitlint.yaml in current directory
43-
// 3. use default config
42+
// 2. commitlint.yaml in current directory
43+
// 3. use default config
4444
func LookupConfigPath() (confPath string, typ ConfigType, err error) {
4545
envConf := os.Getenv(CommitlintConfigEnv)
4646
if envConf != "" {

0 commit comments

Comments
 (0)