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: reduced the complexity of validate-schema.js #483

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

Gmin2
Copy link
Contributor

@Gmin2 Gmin2 commented Jan 13, 2024

fixes #482

@Gmin2 Gmin2 changed the title reduced the complexity of validate-schema.js fix: reduced the complexity of validate-schema.js Jan 13, 2024
scripts/validate-schemas.js Outdated Show resolved Hide resolved
scripts/validate-schemas.js Outdated Show resolved Hide resolved
scripts/validate-schemas.js Show resolved Hide resolved
console.error(`\n${file}: JSON Schema is not valid:`, errors);
});
if (!validateSchema(filePath, fs.readFileSync(filePath, 'utf8'), schemaValidator)) {
validationErrors.push({ file });
Copy link
Member

Choose a reason for hiding this comment

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

You are skipping a very important part: the collection of the errors. It was here #483 (comment)

@Gmin2 Gmin2 requested a review from smoya January 13, 2024 10:50
@Gmin2
Copy link
Contributor Author

Gmin2 commented Jan 17, 2024

can yu review it
cc @smoya @AnimeshKumar923

Copy link

sonarcloud bot commented Jan 20, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@AnimeshKumar923
Copy link
Contributor

@smoya bringing your kind attention to this. Please have a look...

@smoya
Copy link
Member

smoya commented Jan 25, 2024

Will review ASAP once i come back from holidays (this monday).

Copy link
Member

@smoya smoya left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution!

@smoya
Copy link
Member

smoya commented Jan 29, 2024

/rtm

@asyncapi-bot asyncapi-bot merged commit e1ca27e into asyncapi:master Jan 29, 2024
10 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 6.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Gmin2
Copy link
Contributor Author

Gmin2 commented Jan 29, 2024

LGTM! Thanks for your contribution!

@smoya time to tackle #473

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

Successfully merging this pull request may close these issues.

Reduce cognitive complexity in validate-schemas.js
4 participants