aboutsummaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/enum_test.go2
-rw-r--r--internal/config/load.go5
-rw-r--r--internal/config/load_test.go13
-rw-r--r--internal/config/print.go2
-rw-r--r--internal/config/print_test.go3
5 files changed, 11 insertions, 14 deletions
diff --git a/internal/config/enum_test.go b/internal/config/enum_test.go
index 2e5b718..06f5640 100644
--- a/internal/config/enum_test.go
+++ b/internal/config/enum_test.go
@@ -13,7 +13,7 @@ import (
// with their String(), so every Conflict and CaseMode value must print as
// the word a configuration uses, and parse back as that same value. A value
// added later without its branch would otherwise print as "Conflict(3)",
-// which krino check refuses (plan 13 review F5).
+// which krino check refuses.
func TestEverySettingValuePrintsAsItselfInAConfig(t *testing.T) {
for _, c := range []struct {
typ, form string
diff --git a/internal/config/load.go b/internal/config/load.go
index c75d000..3a1cbeb 100644
--- a/internal/config/load.go
+++ b/internal/config/load.go
@@ -24,9 +24,8 @@ type Config struct {
// unusedOverrides reports text for a file no part of this configuration
// names: it would otherwise pass as checked while the file on disk was read
-// instead (plan 13 review F4). Text for an included directory this call did
-// not load - an editor holding buffers for several while checking one - is
-// not reported.
+// instead. Text for an included directory this call did not load - an
+// editor holding buffers for several while checking one - is not reported.
func unusedOverrides(over map[string][]byte, used map[string]bool, mainFile string, include []string) []*Diag {
known := map[string]bool{filepath.Clean(mainFile): true}
for _, name := range include {
diff --git a/internal/config/load_test.go b/internal/config/load_test.go
index 5f848af..a629ae5 100644
--- a/internal/config/load_test.go
+++ b/internal/config/load_test.go
@@ -72,9 +72,9 @@ func TestLoadErrors(t *testing.T) {
}
}
-// TestLoadSyntaxErrorStopsAtOneDiag is item C: a krino.conf that fails to
-// parse must report only the syntax error, not also "not in include" for
-// names the caller asked for.
+// TestLoadSyntaxErrorStopsAtOneDiag: a krino.conf that fails to parse must
+// report only the syntax error, not also "not in include" for names the
+// caller asked for.
func TestLoadSyntaxErrorStopsAtOneDiag(t *testing.T) {
root := t.TempDir()
writeFiles(t, root, map[string]string{"krino.conf": `(include "dl"`})
@@ -146,7 +146,7 @@ func TestLoadWithOverriddenText(t *testing.T) {
// TestLoadWithReportsAnUnusedOverride: an override whose path does not name
// a file the load reads - a different spelling of it, or a directory not in
// include - is reported, instead of the file on disk being read as though
-// the unsaved text were fine (plan 13 review F4).
+// the unsaved text were fine.
func TestLoadWithReportsAnUnusedOverride(t *testing.T) {
h := t.TempDir()
t.Setenv("HOME", h)
@@ -180,7 +180,7 @@ func diagText(ds []*Diag) string {
// TestLoadWithOverrideForAnotherIncludedDirectory: checking one directory
// while holding text for another included one is normal for an editor, and
// not an error; only text for a file no configuration file names is
-// reported (plan 13 review F4 follow-up).
+// reported.
func TestLoadWithOverrideForAnotherIncludedDirectory(t *testing.T) {
h := t.TempDir()
t.Setenv("HOME", h)
@@ -201,8 +201,7 @@ func TestLoadWithOverrideForAnotherIncludedDirectory(t *testing.T) {
}
// TestLoadWithRefusesCollidingOverrides: two keys that name the same file
-// would leave which text is read to map order, so they are refused (plan 13
-// review F4 follow-up).
+// would leave which text is read to map order, so they are refused.
func TestLoadWithRefusesCollidingOverrides(t *testing.T) {
h := t.TempDir()
t.Setenv("HOME", h)
diff --git a/internal/config/print.go b/internal/config/print.go
index a2244d0..6ae51e0 100644
--- a/internal/config/print.go
+++ b/internal/config/print.go
@@ -62,7 +62,7 @@ func PrintExclude(x *Exclude) string {
// Pos and End - with text, and returns the new file contents. Every other
// byte of src, comments and layout included, is kept exactly. Offsets that
// do not belong to src - a form parsed from text that has since changed -
-// are an error, not a panic (plan 13 review F6).
+// are an error, not a panic.
func Splice(src []byte, start, end sexp.Pos, text string) ([]byte, error) {
if start.Offset < 0 || end.Offset < start.Offset || end.Offset > len(src) {
return nil, fmt.Errorf("config: splice %d:%d is not inside %d bytes", start.Offset, end.Offset, len(src))
diff --git a/internal/config/print_test.go b/internal/config/print_test.go
index 510fdd9..87b6878 100644
--- a/internal/config/print_test.go
+++ b/internal/config/print_test.go
@@ -87,8 +87,7 @@ func TestSpliceLeavesTheRestAlone(t *testing.T) {
}
// TestSpliceRefusesOffsetsOutsideTheSource: a stale end offset - the file
-// changed since the form was parsed - is an error, not a panic (plan 13
-// review F6).
+// changed since the form was parsed - is an error, not a panic.
func TestSpliceRefusesOffsetsOutsideTheSource(t *testing.T) {
src := []byte("(path \"/tmp\")")
for _, c := range []struct{ start, end int }{{0, len(src) + 2}, {8, 4}, {-1, 3}} {