[WIP] Validate manifests against JSON Schema in CI Tests (#1331)

* Add suggest and psmodule to schema.json
* Fix required fields in schema.json
* Improve url validation in schema.json
* Add validator.exe as a single file validation tool
* Add Scoop.Validator Lib for use in Manifest-Tests
* Add buildscript for Scoop.Validator and validator.exe
* Exclude .dll and packages folder from Project-Tests
* Validate manifests against JSON Schema in CI Tests
* Complete JSON Schema Validation
* Dlls shouldn't be treated as text
This commit is contained in:
Richard Kuhnt
2017-02-17 19:00:56 +01:00
committed by GitHub
parent 02238f0846
commit 1feda7a088
17 changed files with 351 additions and 42 deletions

View File

@@ -4,7 +4,8 @@ $repo_files = @( Get-ChildItem $repo_dir -file -recurse -force )
$project_file_exclusions = @(
$([regex]::Escape($repo_dir.fullname)+'\\.git\\.*$'),
'.sublime-workspace$'
'.sublime-workspace$',
'supporting\\validator\\packages\\*'
)
describe 'Project code' {
@@ -78,7 +79,7 @@ describe 'Style constraints for non-binary project files' {
# gather all files except '*.exe', '*.zip', or any .git repository files
$repo_files |
where-object { $_.fullname -inotmatch $($project_file_exclusions -join '|') } |
where-object { $_.fullname -inotmatch '(.exe|.zip)$' }
where-object { $_.fullname -inotmatch '(.exe|.zip|.dll)$' }
)
$files_exist = ($files.Count -gt 0)