node_modules/eslint-plugin-sonarjs/lib/utils/locations.js
/**
 * Wrapper for `context.report`, supporting secondary locations and cost.
 * Encode those extra information in the issue message when rule is executed
 * in Sonar* environment.
 */
Wrapper for `context.report`, supporting secondary locations and cost.
Encode those extra information in the issue message when rule is executed
in Sonar* environment.
Wrapper for ` context . report ` supporting secondary locations and cost . Encode those extra information in the issue message when rule is executed in Sonar * environment .
function report(context, reportDescriptor, secondaryLocations = [], cost) {
    const { message } = reportDescriptor;
    if (context.options[context.options.length - 1] === "sonar-runtime") {
        const encodedMessage = { secondaryLocations, message, cost };
        reportDescriptor.message = JSON.stringify(encodedMessage);
    }
    context.report(reportDescriptor);
}
function report ( context , reportDescriptor , secondaryLocations = [ ] , cost ) { const { message } = reportDescriptor ; if ( context . options [ context . options . length - 1 ] === "sonar-runtime" ) { const encodedMessage = { secondaryLocations , message , cost } ; reportDescriptor . message = JSON . stringify ( encodedMessage ) ; } context . report ( reportDescriptor ) ; }
Wrapper for `context.report`, supporting secondary locations and cost.
Wrapper for ` context . report ` supporting secondary locations and cost .