Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make sure validation of invalid document exits 1 #877

Closed
wants to merge 4 commits into from

Conversation

shawakash
Copy link

Description

  • Fixes the issue fail-severity warn info  #861 having validation exit code error by checking the return status
  • Added a enum for validation return status

Related issue(s)
Resolves #861

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@shawakash
Copy link
Author

shawakash commented Nov 4, 2023

@smoya @Souvikns Please review it

@shawakash shawakash changed the title Fix: #861 fail-severity warn info fix: #861 fail-severity warn info Nov 4, 2023
@derberg derberg changed the title fix: #861 fail-severity warn info fix: make sure validation of invalid document exits 1 Nov 6, 2023
derberg
derberg previously approved these changes Nov 6, 2023
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Souvikns ?

Comment on lines 32 to 33
await validate(this, specFile, flags);
if(await validate(this, specFile, flags) == ValidationStatus.Invalid) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually why validate twice?

also this.exit(0) is not really necessary

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derberg changed it

@Souvikns
Copy link
Member

@shawakash there are some lint issues.

Copy link

sonarcloud bot commented Dec 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@shawakash
Copy link
Author

@Souvikns fixed the lint issue

@peter-rr
Copy link
Member

peter-rr commented Mar 21, 2024

@Souvikns @derberg
Should we close this PR as the bug related is already solved by #1068 ?

@Souvikns
Copy link
Member

We can close it, but this PR adds some refactoring, that we can use.

@peter-rr
Copy link
Member

peter-rr commented Mar 22, 2024

We can close it, but this PR adds some refactoring, that we can use.

@Souvikns
Yeah, we can keep it as a refactor then. Should we change the PR title from fix: to refactor: in that case?

@shawakash
Do you need some help to move forward with this PR?

@derberg
Copy link
Member

derberg commented Apr 10, 2024

there are conflicts so I suggest you @peter-rr to open separate PR with refactor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fail-severity warn info
5 participants