Skip to content

Commit

Permalink
add example of every expression to generic linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Larry Hitchon committed Mar 31, 2018
1 parent 1e1e4d2 commit 562913d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions example-files/config/generic.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ other_stuff:
contraptions:
- serial_number: S1000
size: 10
locations:
- city: Seattle
- city: San Francisco
- serial_number: S2000
size: 20
locations:
- city: New York
- serial_number: S3000
size: 4000
locations:
- city: Paris
- city: Munich
- city: Florence
11 changes: 11 additions & 0 deletions example-files/rules/generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@ rules:
value: 1000
value_type: integer

- id: CONTRAPTION_LOCATIONS
message: Contraption location must have city
resource: contraption
severity: FAILURE
assertions:
- every:
key: locations
assertions:
- key: city
op: present

0 comments on commit 562913d

Please sign in to comment.