Repository navigation
core: call the word after as an alias, in messages, the spec and the docs - #246
Merged
Merged
Conversation
…docs An alias is a word that stands for something longer: the word after `as` on a `for` line, the `each_as` or `as` name in the old syntax and the `$name` that reads it, and a bare word after `named by`. Requirement, check and subject names stay names. The messages, the spec rule `sentence.for.alias`, the ABNF rule `alias` and the docs now use the word. A `$word` in a sentence isn't an alias, so `unknown name $foo` stays as it was. Changes the report: `invalid name` is now `invalid alias`, `name given twice` is `alias given twice`, `unknown name <word>` is `unknown alias <word>` for an old-syntax `$name` or a bare word after `named by`, `<x can't be a name>` is `x can't be an alias`, and the expression text `<invalid name>` and `<name given twice>` are `<invalid alias>` and `<alias given twice>`. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2 of 4 tasks
jbpros
marked this pull request as ready for review
October 17, 2026 21:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second step of #244. ergo called the word that stands for something longer a "name", the same word it uses for requirements, checks and subjects. It's now an alias everywhere a reader meets it. That covers the word after
ason aforline, the old syntax'seach_asandasnames and the$namethat refers to one, and a bare word afternamed by. REFERENCE.md defines it once: "An alias is a short word that stands for something longer:as prmakespran alias for each pull request in turn."name given twicealias given twiceinvalid nameinvalid aliasunknown name <word>unknown alias <word><word> can't be a name<word> can't be an alias<name given twice>,<invalid name>in expressions<alias given twice>,<invalid alias>What stays "name":
$that isn't$paramsor$inputstill saysunknown name $foo: in a sentence, an alias is a bare word, so$fooisn't one. A test says so.<unknown name $input>and<unknown name $params>in old-syntax expressions stay too, since those aren't aliases.The old syntax's
$artifact, a chained subject's parent, now saysunknown aliastoo, since a chain's parent is an alias by #244's decisions.The ABNF rule
nameis nowalias, and the rule idsentence.for.nameis nowsentence.for.alias, with its 17 cites updated. Internal Rego rule names are unchanged.Changes the report: the messages above, in
$well_formedinputs and in expressions.Checks
spec/check_grammar.pyfinds 0 disagreements.🤖 Generated with Claude Code