samplecheck

package
v0.1.74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package samplecheck holds sample files of the eval protocol to the protocol's rules by spec's own code, its recipe sample-check: the runner refuses a sample by the same code as sample-check. The recipe runs from the repository's root, with the spec submodule there, in the toolchain of the devcontainer: Node and buf. A repository other than spec writes no check of its own.

Index

Constants

View Source
const Justfile = "spec/justfile"

Justfile is spec's justfile from the repository's root, where its recipe sample-check is.

Variables

This section is empty.

Functions

func Parse

func Parse(out string, files []string) map[string][]int

Parse reads what sample-check printed: the lines of each of the files that it names as breaking a rule, ascending and each once. A line naming another file is not read.

func Run

func Run(files []string) (map[string][]int, error)

Run is Check by spec's recipe: just -f spec/justfile sample-check with the files, from the working directory, which is to be the repository's root. An exit status of 1 names the files that break a rule; any other but 0 is a check that could not run.

Types

type Check

type Check func(files []string) (map[string][]int, error)

Check holds the files, by their paths from the working directory or absolute within it, to the rules, and gives the lines of each file that breaks one, ascending: the places sample-check names, and no message, which could quote a part of a sheet. A file it gives none of keeps every rule. The error is a check that could not run: no spec submodule, no just, a path it refuses, or buf failing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL