diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..9aca9c7 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,6 @@ +pipeline: + compliance: + image: golang:1.18 + commands: + - go test -race ./... + - go vet ./... \ No newline at end of file diff --git a/README.md b/README.md index ac687b9..cf5568e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ A JSON schema and loader for [chroma](https://github.com/alecthomas/chroma). [schema.json](schema/schema.json) provides a [JSON schema](https://json-schema.org). +Chroma themes are conventionally named `.chroma.json`. + ## Styles There is a valid [catppuccin](https://github.com/catppuccin) style in [catppuccin.json](schema/testdata/catppuccin.json). diff --git a/cmd/chromajson/main.go b/cmd/chromajson/main.go index d3726eb..e886dab 100644 --- a/cmd/chromajson/main.go +++ b/cmd/chromajson/main.go @@ -14,7 +14,7 @@ import ( func main() { fs := flag.NewFlagSet("chromajson", flag.ExitOnError) - styleFlag := fs.String("style", ".style.json", "Chroma JSON style config") + styleFlag := fs.String("style", ".chroma.json", "Chroma JSON style config") lintFlag := fs.Bool("lint", false, "Lint config and exit") if err := fs.Parse(os.Args[1:]); err != nil { fmt.Println(err) diff --git a/schema/schema_test.go b/schema/schema_test.go index 3870508..9d4361c 100644 --- a/schema/schema_test.go +++ b/schema/schema_test.go @@ -25,7 +25,7 @@ func TestLint(t *testing.T) { t.Run(tc.Name, func(t *testing.T) { assert := is.New(t) - fi, err := testdata.Open(fmt.Sprintf("testdata/%s.json", tc.Name)) + fi, err := testdata.Open(fmt.Sprintf("testdata/%s.chroma.json", tc.Name)) assert.NoErr(err) // Should open file defer fi.Close() diff --git a/schema/testdata/bad.json b/schema/testdata/bad.chroma.json similarity index 100% rename from schema/testdata/bad.json rename to schema/testdata/bad.chroma.json diff --git a/schema/testdata/catppuccin.json b/schema/testdata/catppuccin.chroma.json similarity index 100% rename from schema/testdata/catppuccin.json rename to schema/testdata/catppuccin.chroma.json diff --git a/schema/testdata/minimal.json b/schema/testdata/minimal.chroma.json similarity index 100% rename from schema/testdata/minimal.json rename to schema/testdata/minimal.chroma.json