Permalink
Browse files

Merge remote-tracking branch 'everyx/master'

  • Loading branch information...
2 parents e6523e8 + d244c2c commit 436fee66c84e7b77dc0e4ef52720ca104a4d244d @mmcgrana committed Feb 23, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 tools/measure.go
View
@@ -7,6 +7,7 @@ import (
"path/filepath"
"regexp"
"strings"
+ "unicode/utf8"
)
func check(err error) {
@@ -31,7 +32,7 @@ func main() {
foundLongLine := false
lines := readLines(sourcePath)
for i, line := range lines {
- if !foundLongLine && !commentPat.MatchString(line) && (len(line) > 58) {
+ if !foundLongLine && !commentPat.MatchString(line) && (utf8.RuneCountInString(line) > 58) {
fmt.Printf("measure: %s:%d\n", sourcePath, i+1)
foundLongLine = true
foundLongFile = true

0 comments on commit 436fee6

Please sign in to comment.