Repository navigation
·
45 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Changed
- A
fromline with more than one name needseveryto read a list, andeveryworks on a child subject, as spec 0.6 says.every artifact.pull_requestsreplacesartifact.pull_requests, andevery trail.artifactsreplacestrail.artifacts. Withoutevery,$min_subjectsfails asunusableand names the list and the fix. A line that ends at text, a number or true or false gives that value as a subject, the subjects of a line must be of one type,everyreads one list per name, a name it reads as a list must be one in every item,every deploymentis written wrong withdeployment is a subject: write deployment whose … to narrow it, without every, and a list beforenamed by each ofsays to use a child subject. A failure for mixed types, or for a name that is a list in some items only, lists the items it names infailed_items, and a child subject of such a line is still read under each parent. Reports change for every policy that reads a list through a path of two names or more, see spec/CHANGELOG.md. - Names resolve where spec 0.6 says, from their root or against the focus. A bare name on the right of the phrase after
everyorsomereads the subject's field, and so do a name written with a dot and anamed byfield there.whoseandthatafterevery,some,count of,sum ofand on aforitem read the value the path ends at, socount of approvers.username whose state is "APPROVED"fails asnot_an_object. The subject's name followed by a step, likepr.author, reads the subject's field inside a relative clause. In afromline, the right side of asomeoreverycondition reads the candidate subject. Reports change for policies that write these, see spec/CHANGELOG.md. This version follows spec 0.6, so a policy saysergo_spec: v0.6, and the report'sergosaysv0.6. - As spec 0.6 also says:
pr named by kandpr[0]are allowed inside a relative clause; awhosethat compares a field with itself sayswrite pr.x;distinctno longer makes a bare name on the right written wrong; asum ofwhosewhose, or the right side of itsthat, reads a name of the value it adds is written wrong; anamed byon the right ofeveryorsomereads the subject's key whatever the path starts at,$paramsand$inputincluded;named by pr.ktakes the key from the subject inside a relative clause, after any path; a root name in awhoseor on the right ofeveryorsomeis read once, up front, so a problem with it fails the row even on an empty list; awhosethat compares a field with itself gives no advice when the subject's name needs double quotes; and messages name a value past the list after its item and a colon, list every item acount oforsum ofcouldn't read, say a root name no item can use once, and a root name's problem inside a relative clause once with no item, and an item of its own list once, likeitem 2 of $params.envs is null, which isn't an object, name anamed bykey that can't be read, name the item initem 2 of xs: k is missingforpr named by kin a relative clause, and write the item's path in full when a name on the right is spelled the same. - As spec 0.6 says,
containsanddoes not containread one value and never walk a list on their right side, so a list the path meets on the way fails asunusable, and a path like$input.kor$input.m named by keyon a list input asnot_an_objectwith$input is [...], which isn't an object, while a list it ends at is still one value.$refslist such a path as written, with the valuenull. The list afternamed by each ofnever walks a list either, and a message names text, a number or a list that stops the read of its keys. A right side that walks a list names the value where the read stopped when another item holds a list there, where it saiditem 1 of o is null. Reports change for policies that write these, see spec/CHANGELOG.md. - As spec 0.6 says,
every,some,count of,sum of, aforitem without a position and the right side of the phrases that take a list read each item of a list a path starts at, whether it is the subject, a part, aforalias or$input, and so does a secondforitem that starts at an alias holding a list. With the subjecttholding[{"name": "a"}, {"name": "b"}],every name is "a"fails asvaluewithitem 2 of t: name is "b", where it failed asnot_an_object. A check that also reads the subject's own field outside those, likeevery name is otheror aforsentenceo is boss, still fails asnot_an_object, once. The right side of a list phrase afterevery, in awhoseor in athatnow reads a list in the middle of a name or an alias that is a list item by item, likeevery xs.v is in ys.v, where it failed asunusableornot_an_object. A path from$inputon a list input,named byforms included, says$input is [...], which isn't an object, and$input[0].idon[1]fails asunusablewhere it failed asabsent. Aforitem that isn't an object is named by its value,item 2 of t is 3, which isn't an object, where it saidis null. A check that can't use a param or anamed bykey no longer says the list it reads isn't an object, inevery,count ofandsum of, and a root name inside awhosethat isn't a list, or that is missing ornullin an item of the subject, is said once, with no item. - A path that meets
nullpartway along fails asnull, where it failed asabsent, and the message names the step that isnull, as spec 0.6 says:c.z is 1withcnullsaysc is null, where it saidc.z is missing, andpl.z is 1with the partplnullsayspl is null. The same goes for$input,$params, a parent's field, aforalias and a position on anullsubject, alias or$input.existsanddoes not existkeep their causes and name the step. A key read from a field right after thenullstill decides. Awhosecondition on afromline reads the same way, so its$appliesrow fails asnullwithc is null, while afromline that walks through thenull, likeevery prs.c.z, still fails$min_subjectsasabsent. A key read from a field after thenullis named too, after the step, likes is null; p is 3, which isn't text. require: someon a child subject needs a passing subject under each parent, as spec 0.6 says (require.some.parent). A commit whose pull requests all fail makesevery commit.pull_requestswithrequire: somenot_met, where an approved pull request of another commit made itmet. The failing subjects under a parent that has a passing one are no longer violations or counted incauses. Reports change for policies that use it, see spec/CHANGELOG.md.- A requirement on a child subject checks the ids of every ancestor of its subject too, the parent and the grandparent, on a new
$unique_ancestor_idsrow whose subject is the ancestor, as spec 0.6 says (unique_ids.ancestors). Two commits with the same sha now make a requirement on their pull requestsnot_met, underrequire: sometoo, where they counted as one commit and the requirement could bemet. Reports of every requirement on a child subject change, see spec/CHANGELOG.md. - A name under a
forline that doesn't depend on the item, a field of the subject or of a part,$paramsor$inputwith or without a path, or an alias of an earlier line, is read once, before any item, as spec 0.6 says (for.roots). When a compare oris inphrase reads it as a value, a problem with it fails the check on an empty list too, with or without, if any,, and the message names it once with no item in front, whatever its cause:z is missing, where it saiditem 1 of xs: z is missing; item 2 of xs: z is missing. Without, if any,the empty list is named after it,$params.q is "s", which isn't a number; xs is []. A name that depends on the item, the line's own alias or anamed bykey read from the item, keeps the item in front. What each item says on its own follows the names, without them:z is missing; item 1 of xs: m.v is 1; item 2 of xs: m.v is 3, and the cause is the worst of all.$paramsor$inputread alone, like$params is 3withnullparams, is such a name too, andfailed_itemslists every item that failed, also when a name is said once, som.v is in $params.qwithqholding text lists both items, where it listed none. A check that doesn't read$paramskeeps its usual message and the causeunusablewhen the params aren't an object. A root in awhoseon theforline no longer hides what an item says on its own, whichever clause comes first:every xs whose k is in pr.z and whose v is 1 as mwithpr.zholding"s"sayspr.z is "s", which isn't a list; item 2 of xs: v is "x", which isn't a number, where it said onlypr.z is "s", which isn't a list. A list on a later line that doesn't depend on the item is said before the items' problems. Anamed bykey read from the item undernullparams says what missing params say. In acount oforsum of, a$paramsor$inputname that is missing ornullis named before the others, like$params.l is missing; pr.l is missingforcount of xs whose w is in pr.l and whose v is in $params.l is 0, where it saidpr.l is missing; $params.l is missing. Reports change for policies that write these. - Under a
forline,is,count of,sum ofand anamed bykey read a root once, before any item, as spec 0.6 says (for.roots). A root that is missing,nullor of the wrong type fails the check on an empty list too, and is named once with no item in front:z is 1withzholding"s"saysz is "s", which isn't a number,count of z is 1saysz is "s", which isn't a list or an object, andm.t named by z is 1withzholding3saysz is 3, which isn't text, where it said it for each item. A key the row can't read is named before what each item says on its own. An object thatcount oforsum ofreads fails on an empty list too, withz is {"a": 1}, which isn't a list, with or without awhose, as it does with items. Acount oforsum ofroot is said once with items, where it was said for each item:count of z is at least m.vwithzholding"s"saysz is "s", which isn't a list or an object. A sentence that reads two roots isn't said again after them, and a root named before an item's own problem counts towards the cause, sozz is 3, which isn't text; item 1 of ws: w[0] named by zz is missingfails asunusable, notabsent. A name that depends on the item and can't be read, likei.tholding"s"inevery items as i, every $params.l whose v is at least i.t as x, makes the causeunusablewhere a missing ornullitem of$params.lgaveabsentornull, with the same message. The names of one sentence are said worst cause first and then by name. Reports change for policies that write these. - A check that reads a list or patterns from a
$paramsor$inputpath, likex is in $params.l,w contains all of $input.requiredors matches $params.p, lists that path in its row'sinputsafter the field it checks, asis at leastlists its right side, as spec 0.6 says (path.right_inputs). The entry is there whatever the cause: a list that is missing ornullis listed asnull, and one that isn't a list with what it holds.x is in $params.lon{"x": 3}with{"l": [1, 2]}has theinputsxand$params.l, where it hadxalone. The same goes for the assertions of aforline, an$appliesrow and anany_ofrow, and for$params.m named by kafter these phrases, which was left out wherew named by kwas listed. The rows ofevery,someandcount oflist such a path from$inputwhere they list the right side ofis at least, like$input.linevery xs.n is in $input.l, and still leave out one from$params, asis at leastdoes, and aforline's own row lists one from either, like$params.lforx.n is in $params.l, as it lists$params.zforx.n is at least $params.z. A violation lists a ref the row lists once, where it would list it twice. Changes the report of every such check.
Fixed
- A
count ofafterthatthat reads a part or the subject's own name, likecount of xs that is count of cov.z is 1, counts the part's list, as spec 0.6 says, where it failed asnot_an_objectbecause the items weren't objects. With the partcov: cand the input{"c": {"z": [1, 2]}, "xs": [2, 5]}the check now passes. The same goes foreveryandsomewith such athat, on aforitem and in anany_ofoption, and a part that is missing,nullor not a list now fails asabsent,nullorunusableand names the part, likecov.z is missing. A parent's name and aforalias already worked. - A root name that a
whose, or the phrase aftereveryorsome, reads as a list and that isn't one, likepr.zincount of xs whose v is in pr.z is 0withpr.zholding"s", fails asunusablewithpr.z is "s", which isn't a liston an empty list too, as spec 0.6 says, where the check passed, or failed asvalueon aforitem. A$paramsor$inputname there already failed on an empty list, and now names itself, like$params.q is "s", which isn't a list, where the message wascount of xs whose v is in $params.q is 0 is false. A root of the wrong type for any other phrase fails the same way, before any item and on an empty list too, with no item in front, likepr.z is "s", which isn't a numberforis at least, as spec 0.6 says. A root in a sentence under aforline is named once, with no item, and a root that reads the alias of the first item in the second item fails on an empty list too, likeitem 1 of ys: m.q is "s", which isn't a list. - A part that holds a list, like
plinm.v is in pl.zunderevery xs as mwithhas: {pl: c}andcholding[{"z": 1}], fails theforcheck asunusablewithpl is [{"z": 1}], which isn't an object, aspl.z is 1does, as spec 0.6 says (for.roots).count of xs whose v is in pl.z is 0is read the same way. When the params aren't an object and a check that reads$paramsalso has tied items, the message names$paramsfirst and then the tie, and the cause isambiguous. - Every root name in a relative clause that fails is named, whatever its cause, in the order the sentence reads them, like
$params.l is null; pr.l is "s", which isn't a list, and in front of what the items say when an item fails in a worse way, as spec 0.6 says, where a message could name only the roots with the row's cause, or only the first of two wrong-typed lists. A check's own row that fails asabsentornullnames a side read from the subject that is missing ornulltoo, likec.z is missing, and d is null. A list in the middle of the name on the right of a phrase that doesn't take a list now saysc is [], which isn't an object, where it saidc is []. Aforalias afteris incounts as such a root too, likeitem 1 of ys: m.q is "s", which isn't a list, and a missing one inevery xs whose v is in m.q, if any, existson an empty list saysitem 1 of ys: m.q is missing, where it saiditem 1 of ys: xs is missing. A walk whose ref step can't be read names its path and then each root its phrase can't read, likexs named by $params.k is missing; q is missing, where it named only the root.