-
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.
- Loading branch information
1 parent
3340ae6
commit 6e674b4
Showing
10 changed files
with
1,782 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
codecov: | ||
notify: | ||
require_ci_to_pass: no | ||
# dev should be the baseline for reporting | ||
branch: master | ||
|
||
comment: | ||
layout: "reach, diff" | ||
behavior: default | ||
|
||
coverage: | ||
range: 50..80 | ||
round: down | ||
precision: 0 | ||
|
||
status: | ||
project: | ||
default: | ||
# Set the overall project code coverage requirement to 70% | ||
target: 80 | ||
patch: | ||
default: | ||
# Set the pull request requirement to not regress overall coverage by more than 5% | ||
# and let codecov.io set the goal for the code changed in the patch. | ||
target: auto | ||
threshold: 5 |
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,10 @@ | ||
|
||
/**/.vs/ | ||
/**/bin/ | ||
/**/obj/ | ||
/artifacts/ | ||
/build/ | ||
/reports/ | ||
/**/*.user | ||
/src/**/*-help.xml | ||
/src/**/*.help.txt |
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,3 @@ | ||
# Change log | ||
|
||
## Unreleased |
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,66 @@ | ||
# PSRule | ||
|
||
A PowerShell module with commands to validate objects on the pipeline. | ||
|
||
| AppVeyor (Windows) | Codecov (Windows) | | ||
| --- | --- | | ||
| [![av-image][]][av-site] | [![cc-image][]][cc-site] | | ||
|
||
[av-image]: https://ci.appveyor.com/api/projects/status/pl7tu7ktue388n7s | ||
[av-site]: https://ci.appveyor.com/project/BernieWhite/PSRule | ||
[cc-image]: https://codecov.io/gh/BernieWhite/PSRule/branch/master/graph/badge.svg | ||
[cc-site]: https://codecov.io/gh/BernieWhite/PSRule | ||
|
||
## Disclaimer | ||
|
||
This project is to be considered a **proof-of-concept** and **not a supported Microsoft product**. | ||
|
||
## Modules | ||
|
||
The following modules are included in this repository. | ||
|
||
| Module | Description | Latest version | | ||
| ------ | ----------- | -------------- | | ||
| PSRule | A PowerShell rules engine. | Unreleased | | ||
|
||
## Getting started | ||
|
||
### Prerequsits | ||
|
||
- Windows PowerShell 5.1 or PowerShell Core 6.0 | ||
|
||
## Language reference | ||
|
||
PSRule extends PowerShell with domain specific language (DSL) keywords and cmdlets. | ||
|
||
### Keywords | ||
|
||
The following language keywords are used by the `PSRule` module: | ||
|
||
- [Rule](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#Rule) - | ||
- [Exists](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#Exists) - | ||
- [Match](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#Match) - | ||
- [AnyOf](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#AnyOf) - | ||
- [AllOf](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#AllOf) - | ||
- [Within](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#Within) - | ||
- [When](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#When) - | ||
|
||
### Commands | ||
|
||
The following commands exist in the `PSRule` module: | ||
|
||
- [Invoke-RuleEngine](docs/commands/PSRule/en-US/Invoke-RuleEngine.md) | ||
|
||
## Changes and versioning | ||
|
||
Modules in this repository will use the [semantic versioning](http://semver.org/) model to declare breaking changes from v1.0.0. Prior to v1.0.0, breaking changes may be introduced in minor (0.x.0) version increments. For a list of module changes please see the [change log](CHANGELOG.md). | ||
|
||
## Maintainers | ||
|
||
- [Bernie White](https://github.com/BernieWhite) | ||
|
||
## License | ||
|
||
This project is [licensed under the MIT License](LICENSE). | ||
|
||
[psg-psrule]: https://www.powershellgallery.com/packages/PSRule |
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,114 @@ | ||
--- | ||
external help file: PSRule-help.xml | ||
Module Name: PSRule | ||
online version: | ||
schema: 2.0.0 | ||
--- | ||
|
||
# Invoke-RuleEngine | ||
|
||
## SYNOPSIS | ||
|
||
Evaluate pipeline objects against matching rules. | ||
|
||
## SYNTAX | ||
|
||
``` | ||
Invoke-RuleEngine [-Path] <String> [[-ConfigurationData] <Object>] [-InputObject] <PSObject> | ||
[[-Status] <String[]>] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
|
||
Evaluate pipeline objects against matching rules. | ||
|
||
## EXAMPLES | ||
|
||
### Example 1 | ||
|
||
```powershell | ||
PS C:\> @{ Name = 'Item 1' } | Invoke-RuleEngine . | ||
``` | ||
|
||
{{ Add example description here }} | ||
|
||
## PARAMETERS | ||
|
||
### -ConfigurationData | ||
{{Fill ConfigurationData Description}} | ||
|
||
```yaml | ||
Type: Object | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 1 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -InputObject | ||
The pipeline object to process rules for. | ||
```yaml | ||
Type: PSObject | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: True | ||
Position: 2 | ||
Default value: None | ||
Accept pipeline input: True (ByValue) | ||
Accept wildcard characters: False | ||
``` | ||
### -Path | ||
A path to one or more rules to evaluate. | ||
```yaml | ||
Type: String | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: True | ||
Position: 0 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -Status | ||
Filter output to only show rules with a specific status. | ||
```yaml | ||
Type: String[] | ||
Parameter Sets: (All) | ||
Aliases: | ||
Accepted values: Success, Failed | ||
|
||
Required: False | ||
Position: 3 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### CommonParameters | ||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). | ||
## INPUTS | ||
### System.Management.Automation.PSObject | ||
## OUTPUTS | ||
### System.Object | ||
## NOTES | ||
## RELATED LINKS |
Oops, something went wrong.