-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
6d59f18
commit 85fa989
Showing
44 changed files
with
3,669 additions
and
1,923 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[ | ||
{ | ||
// Synopsis: A rule with a sub-selector precondition. | ||
"apiVersion": "github.com/microsoft/PSRule/v1", | ||
"kind": "Rule", | ||
"metadata": { | ||
"name": "Json.Subselector.Precondition" | ||
}, | ||
"spec": { | ||
"where": { | ||
"field": "kind", | ||
"equals": "api" | ||
}, | ||
"condition": { | ||
"field": "resources", | ||
"count": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
// Synopsis: A rule with a sub-selector filter. | ||
"apiVersion": "github.com/microsoft/PSRule/v1", | ||
"kind": "Rule", | ||
"metadata": { | ||
"name": "Json.Subselector.Filter" | ||
}, | ||
"spec": { | ||
"condition": { | ||
"field": "resources", | ||
"where": { | ||
"type": ".", | ||
"equals": "Microsoft.Web/sites/config" | ||
}, | ||
"allOf": [ | ||
{ | ||
"field": "properties.detailedErrorLoggingEnabled", | ||
"equals": true | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
// Synopsis: A rule with a sub-selector filter. | ||
"apiVersion": "github.com/microsoft/PSRule/v1", | ||
"kind": "Rule", | ||
"metadata": { | ||
"name": "Json.Subselector.FilterOr" | ||
}, | ||
"spec": { | ||
"condition": { | ||
"anyOf": [ | ||
{ | ||
"field": "resources", | ||
"where": { | ||
"type": ".", | ||
"equals": "Microsoft.Web/sites/config" | ||
}, | ||
"allOf": [ | ||
{ | ||
"field": "properties.detailedErrorLoggingEnabled", | ||
"equals": true | ||
} | ||
] | ||
}, | ||
{ | ||
"field": "resources", | ||
"exists": false | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
|
||
# | ||
# YAML-based rules for documentation | ||
# | ||
|
||
--- | ||
# Synopsis: A rule with a sub-selector precondition. | ||
apiVersion: github.com/microsoft/PSRule/v1 | ||
kind: Rule | ||
metadata: | ||
name: Yaml.Subselector.Precondition | ||
spec: | ||
where: | ||
field: 'kind' | ||
equals: 'api' | ||
condition: | ||
field: resources | ||
count: 10 | ||
|
||
--- | ||
# Synopsis: A rule with a sub-selector filter. | ||
apiVersion: github.com/microsoft/PSRule/v1 | ||
kind: Rule | ||
metadata: | ||
name: Yaml.Subselector.Filter | ||
spec: | ||
condition: | ||
field: resources | ||
where: | ||
type: '.' | ||
equals: 'Microsoft.Web/sites/config' | ||
allOf: | ||
- field: properties.detailedErrorLoggingEnabled | ||
equals: true | ||
|
||
--- | ||
# Synopsis: A rule with a sub-selector filter. | ||
apiVersion: github.com/microsoft/PSRule/v1 | ||
kind: Rule | ||
metadata: | ||
name: Yaml.Subselector.FilterOr | ||
spec: | ||
condition: | ||
anyOf: | ||
|
||
- field: resources | ||
where: | ||
type: '.' | ||
equals: 'Microsoft.Web/sites/config' | ||
allOf: | ||
- field: properties.detailedErrorLoggingEnabled | ||
equals: true | ||
|
||
- field: resources | ||
exists: false |
This file contains 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
Oops, something went wrong.