mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2025-10-30 14:17:54 +00:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user