Skip to content

Commit

Permalink
This should fail checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Livingston committed Aug 18, 2023
1 parent 8961177 commit 650d73e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/go/tagliatelle_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package go_test

import (
"testing"
)

func TestTagliatelleLinter(t *testing.T) {
// These should pass the linter
type foo struct {

Check failure on line 9 in tests/go/tagliatelle_test.go

View workflow job for this annotation

GitHub Actions / Go Build (ubuntu-latest)

type `foo` is unused (unused)
Field1 string `json:"field1"`
Field2 string `json:"fieldOne"`
Field3 string `json:"fieldONE"`

Check failure on line 12 in tests/go/tagliatelle_test.go

View workflow job for this annotation

GitHub Actions / Go Build (ubuntu-latest)

json(camel): got 'fieldONE' want 'fieldOne' (tagliatelle)
}

// These should not pass without comments to disable
type bar struct {

Check failure on line 16 in tests/go/tagliatelle_test.go

View workflow job for this annotation

GitHub Actions / Go Build (ubuntu-latest)

type `bar` is unused (unused)
Field1 string `json:"Field1"`

Check failure on line 17 in tests/go/tagliatelle_test.go

View workflow job for this annotation

GitHub Actions / Go Build (ubuntu-latest)

json(camel): got 'Field1' want 'field1' (tagliatelle)
Field2 string `json:"field_1"`

Check failure on line 18 in tests/go/tagliatelle_test.go

View workflow job for this annotation

GitHub Actions / Go Build (ubuntu-latest)

json(camel): got 'field_1' want 'field1' (tagliatelle)
Field3 string `json:"FieldOne"`

Check failure on line 19 in tests/go/tagliatelle_test.go

View workflow job for this annotation

GitHub Actions / Go Build (ubuntu-latest)

json(camel): got 'FieldOne' want 'fieldOne' (tagliatelle)
Field4 string `json:"FIELD1"`

Check failure on line 20 in tests/go/tagliatelle_test.go

View workflow job for this annotation

GitHub Actions / Go Build (ubuntu-latest)

json(camel): got 'FIELD1' want 'field1' (tagliatelle)
}

// Temporary sanity check
panic("testing")
}

0 comments on commit 650d73e

Please sign in to comment.