Skip to content

Commit 4012b42

Browse files
committed
tixing fypo in method name
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
1 parent dabb38e commit 4012b42

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

analyzer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ func (a *Analyzer) NotifyReviewEvent(ctx context.Context, e *lookout.ReviewEvent
126126
}, nil
127127
}
128128

129-
// faltternPath flattens relative path and puts it inside tmp.
130-
func faltternPath(file string, tmp string) string {
129+
// flattenPath flattens relative path and puts it inside tmp.
130+
func flattenPath(file string, tmp string) string {
131131
nFile := strings.Join(strings.Split(file, string(os.PathSeparator)), artificialSep)
132132
nPath := path.Join(tmp, nFile)
133133
return nPath
@@ -163,7 +163,7 @@ func revertOriginalPathIn(text string, tmp string) string {
163163
// It only loggs any errors and does not fail. All files saved this way will
164164
// be in the root of the same dir.
165165
func tryToSaveTo(file *lookout.File, tmp string) {
166-
flatPath := faltternPath(file.Path, tmp)
166+
flatPath := flattenPath(file.Path, tmp)
167167
err := ioutil.WriteFile(flatPath, file.Content, 0644)
168168
if err != nil {
169169
log.Errorf(err, "failed to write a file %q", flatPath)

analyzer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ var pathTests = []struct {
8989
func TestPathTransformations(t *testing.T) {
9090
for _, tt := range pathTests {
9191
t.Run(tt.in, func(t *testing.T) {
92-
assert.Equal(t, tt.out, faltternPath(tt.in, "/tmp"))
92+
assert.Equal(t, tt.out, flattenPath(tt.in, "/tmp"))
9393
assert.Equal(t, tt.in, revertOriginalPath(tt.out, "/tmp"))
9494
})
9595
}

0 commit comments

Comments
 (0)