Skip to content

Commit

Permalink
fix codesmells
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Sep 27, 2023
1 parent c60f7c9 commit 8221fd6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ class Generator {
* @param {Object} [parseOptions={}] AsyncAPI Parser parse options. Check out {@link https://www.github.com/asyncapi/parser-js|@asyncapi/parser} for more information. Remember to use the right options to the right parser depending on the template you are using.
* @return {Promise}
*/
//NOSONAR
// eslint-disable-next-line sonarjs/cognitive-complexity
// NOSONAR
async generate(asyncapiDocument, parseOptions = {}) {

Check warning on line 163 in lib/generator.js

View workflow job for this annotation

GitHub Actions / Test NodeJS PR - ubuntu-latest

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed
const isAlreadyParsedDocument = isAsyncAPIDocument(asyncapiDocument);
const isParsableCompatible = asyncapiDocument || typeof asyncapiString === 'string';
Expand Down

0 comments on commit 8221fd6

Please sign in to comment.