github.com/exercism/v2-configlet@v3.9.2+incompatible/cmd/lint_example_test.go (about)

     1  package cmd
     2  
     3  import (
     4  	"os"
     5  	"path/filepath"
     6  
     7  	"github.com/exercism/configlet/ui"
     8  )
     9  
    10  func ExampleLint() {
    11  	ui.Out = os.Stdout
    12  	originalNoHTTP := noHTTP
    13  	noHTTP = true
    14  	defer func() { noHTTP = originalNoHTTP }()
    15  
    16  	lintTrack(filepath.FromSlash("../fixtures/numbers"))
    17  	// Output:
    18  	// -> An exercise with slug 'bajillion' is referenced in config.json, but no implementation was found.
    19  	// -> The implementation for 'three' is missing an example solution.
    20  	// -> The implementation for 'two' is missing a test suite.
    21  	// -> The exercise 'one' was found in config.json, but does not have a UUID.
    22  	// -> An implementation for 'zero' was found, but config.json specifies that it should be foregone (not implemented).
    23  }
    24  
    25  func ExampleLintMaintainers() {
    26  	ui.ErrOut = os.Stdout
    27  	originalNoHTTP := noHTTP
    28  	noHTTP = true
    29  	defer func() { noHTTP = originalNoHTTP }()
    30  
    31  	lintTrack(filepath.FromSlash("../fixtures/broken-maintainers"))
    32  	// Output:
    33  	// -> invalid config ../fixtures/broken-maintainers/config/maintainers.json -- invalid character '}' looking for beginning of object key string
    34  }