Skip to content

Commit

Permalink
preprocessor: remove Step as a mode of matching
Browse files Browse the repository at this point in the history
Sanitisers and comparators are configured at the site or page level to
work against commands. This configuration allows for them to match based
on one of three modes: the full command, the command prefix, or the step
name.

The step name matching mode is not implemented and by definition is not
used and does not work.

In this CL we remove it, in favour of per statement-tag directives that
(in a later CL) will allow for more precise setting of
sanitisers/comparators.  (Step-level setting applies, in the general
case, to the list of statements contain therein... which doesn't really
make much sense, except where there is just one command in a script
block).

Preprocessor-No-Write-Cache: true
Signed-off-by: Paul Jolly <[email protected]>
Change-Id: I86a0629a9a9344923ce0672e6c5a7a232be4e079
Dispatch-Trailer: {"type":"trybot","CL":1176699,"patchset":7,"ref":"refs/changes/99/1176699/7","targetBranch":"alpha"}
  • Loading branch information
myitcv authored and cueckoo committed Feb 12, 2024
1 parent 314fe60 commit fc4759b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions internal/cmd/preprocessor/cmd/sanitisers.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ type kindAndCommand struct {
// equal to the value set.
CommandPrefix string `json:"commandPrefix"`

// Step defines that X should apply for the specific multi-step script
// command step (steps names are unique).
Step string `json:"step"`

// stmt is a parsed version of Command or CommandPrefix.
stmt *syntax.Stmt
}
Expand Down
6 changes: 0 additions & 6 deletions internal/cmd/preprocessor/cmd/schema.cue
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,9 @@ package preprocessor
{
command!: string
commandPrefix?: _|_
step?: _|_
} | {
command?: _|_
commandPrefix!: string
step?: _|_
} | {
command?: _|_
commandPrefix?: _|_
step!: string
}
}

Expand Down

0 comments on commit fc4759b

Please sign in to comment.