Skip to content

Commit

Permalink
Merge branch 'main' into fix-jsonwriter
Browse files Browse the repository at this point in the history
  • Loading branch information
timburks authored Feb 29, 2024
2 parents ae8d136 + fe4fc1e commit 4ce4770
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metrics/vocabulary/vocabulary.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ func WriteCSV(v *metrics.Vocabulary, filename string) error {
filename = "vocabulary-operation.csv"
}
f4, ferror := os.Create(filename)
defer f4.Close()
if ferror != nil {
return ferror
}
defer f4.Close()

for _, s := range v.Schemas {
temp := fmt.Sprintf("%s,\"%s\",%d\n", "schemas", s.Word, int(s.Count))
f4.WriteString(temp)
Expand Down
3 changes: 3 additions & 0 deletions plugins/gnostic-analyze/summarize/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ var stats []statistics.DocumentStatistics

// walker is called for each summary file found.
func walker(p string, info os.FileInfo, err error) error {
if err != nil {
return err
}
basename := path.Base(p)
if basename != "summary.json" {
return nil
Expand Down

0 comments on commit 4ce4770

Please sign in to comment.