Skip to content

Adding support to provide custom language param for closure compiler

Yaraslau Kurmyza requested to merge lotask/nodejs-scan:closure-lang-param into master

Hi! We are running sast tools against our codebase, but are experiencing some issues with newer versions of node.js. Basically every ES6 feature is not supported, because of the hardcoded --language_in=ECMASCRIPT5

Example error:

Status: Downloaded newer image for registry.gitlab.com/gitlab-org/security-products/analyzers/nodejs-scan:11-1-stable
Found project in /tmp/app
30 rules loaded
/tmp/app/config/default.js:1: ERROR - This language feature is only supported for ECMASCRIPT6 mode or better: const declaration.
const { name } = require('../package.json')

With this RP, there should be possible to override this with an env flag NODEJS_CLOSURE_LANGUAGE_IN

Thanks!

Merge request reports