Closed hverlin closed 1 week ago
@firecow @ANGkeith Let me know if these changes are ok. I will then add tests.
console
/assert
before. Should I switch to writeStreams
?yaml
under the .gitlab-ci-local
. I think this is useful outside validation in case you want to inspect what was parsed without having to always do gcl --preview > /tmp/my-pipeline.yml
looks and sounds good to me, but lets see what firecow has to say
Regarding schema validation, output was done directly using console/assert before. Should I switch to writeStreams?
In general, i think we use assert
/writeStreams
, most of the console
's be introduced by me 😅
@firecow Anything you would change here before I add tests?
@hverlin Nah, nothing much. All looks good.
Validation errors:
test must NOT have additional properties
Is it possible to print exactly what properties are additional?
I reused code from https://github.com/apideck-libraries/better-ajv-errors, and I am now getting better error message.
Given
test:
needs: [types]
when: 'manual2'
artifacts:
reports:
junit: 3
script: ''
data: "test"
Invalid .gitlab-ci.yml configuration
• 'data' property is not expected to be here at test
• property 'script' must not have fewer than 1 characters at test.script
• 'when' property must be one of [on_success, on_failure, always, never, manual, delayed] (found manual2) at test.when
• 'junit' property type must be string at test.artifacts.reports.junit
@ANGkeith I'll let you review this as well, before I'm merging.
very nice
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
83.9% Coverage on New Code
0.0% Duplication on New Code
Fix #1263 #1255
Given