Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-spike committed Oct 28, 2024
1 parent 976a000 commit d81882f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
32 changes: 15 additions & 17 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,18 @@ run:
# skip-files:
# - sample

# issues:
# exclude-rules:
# - path: info/as_parser_test\.go
# linters:
# - lll # Test code is allowed to have long lines
# - path: asconfig/generate_test\.go
# linters:
# - dupl # Test code is allowed to have duplicate code
# - path: asconfig/asconfig_test\.go
# linters:
# - dupl # Test code is allowed to have duplicate code
# - path: '(.+)test\.go'
# linters:
# - govet # Test code field alignment for sake of space is not a concern
# - linters:
# - lll
# source: "// "
issues:
exclude-rules:
- path: info/as_parser_test\.go
linters:
- lll # Test code is allowed to have long lines
- path: asconfig/generate_test\.go
linters:
- dupl # Test code is allowed to have duplicate code
- path: asconfig/asconfig_test\.go
linters:
- dupl # Test code is allowed to have duplicate code
- path: '(.+)test\.go'
linters:
- govet # Test code field alignment for sake of space is not a concern
- wsl # Auto generated tests cuddle assignments
4 changes: 2 additions & 2 deletions cmd/writers/indexList.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ func calculateIndexSize(index *protos.IndexDefinition, status *protos.IndexStatu
// Each index record has ~500 bytes of overhead + the vector size
indexRecSize := 500 + vectorSize
// The total size is the number of records times the size of each record
indexSize := indexRecSize * status.GetIndexHealerVerticesValid()
return indexSize
return indexRecSize * status.GetIndexHealerVerticesValid()
}

// formatBytes converts bytes to human readable string format
Expand Down Expand Up @@ -190,6 +189,7 @@ func formatBytes(bytes int64) string {

func getPercentUnmerged(status *protos.IndexStatusResponse) string {
unmergedCount := status.GetUnmergedRecordCount()

verticies := status.GetIndexHealerVerticesValid()
if verticies == 0 {
return "0%"
Expand Down

0 comments on commit d81882f

Please sign in to comment.