1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-07-01 00:35:06 +02:00

Add golangci-lint and fix all lint issues.

This commit is contained in:
Alec Thomas
2018-12-31 22:44:27 +11:00
parent e27f19c12f
commit da5ac60d8c
18 changed files with 118 additions and 45 deletions

View File

@ -8,6 +8,7 @@ import (
"testing"
"github.com/alecthomas/assert"
"github.com/alecthomas/chroma"
"github.com/alecthomas/chroma/lexers"
"github.com/alecthomas/chroma/styles"
@ -89,7 +90,8 @@ func TestClassPrefix(t *testing.T) {
}
var styleBuf bytes.Buffer
withPrefix.WriteCSS(&styleBuf, styles.Fallback)
err := withPrefix.WriteCSS(&styleBuf, styles.Fallback)
assert.NoError(t, err)
if !strings.Contains(styleBuf.String(), ".some-prefix-chroma ") {
t.Error("Stylesheets should have a class prefix")
}