Skip to content

SALESFORCE

Linters

Linter Additional
sfdx-scanner-apex
SALESFORCE_SFDX_SCANNER_APEX
GitHub stars
sfdx-scanner-aura
SALESFORCE_SFDX_SCANNER_AURA
GitHub stars
sfdx-scanner-lwc
SALESFORCE_SFDX_SCANNER_LWC
GitHub stars
lightning-flow-scanner
SALESFORCE_LIGHTNING_FLOW_SCANNER
GitHub stars

Linted files

Configuration in MegaLinter

Variable Description Default value
SALESFORCE_PRE_COMMANDS List of bash commands to run before the linters None
SALESFORCE_POST_COMMANDS List of bash commands to run after the linters None
SALESFORCE_FILTER_REGEX_INCLUDE Custom regex including filter
SALESFORCE_FILTER_REGEX_EXCLUDE Custom regex excluding filter

Behind the scenes

Installation

  • Dockerfile commands :
# renovate: datasource=npm depName=@salesforce/cli
ARG SALESFORCE_CLI_VERSION=2.61.8
# renovate: datasource=npm depName=@salesforce/plugin-packaging
ARG SALESFORCE_PLUGIN_PACKAGING_VERSION=2.8.12
# renovate: datasource=npm depName=sfdx-hardis
ARG SFDX_HARDIS_VERSION=5.1.0
ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk
ENV PATH="$JAVA_HOME/bin:${PATH}"
RUN sf plugins install @salesforce/plugin-packaging@${SALESFORCE_PLUGIN_PACKAGING_VERSION} \
    && echo y|sf plugins install sfdx-hardis@${SFDX_HARDIS_VERSION} \
    && npm cache clean --force || true \
    && rm -rf /root/.npm/_cacache
ENV SF_AUTOUPDATE_DISABLE=true