Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mega-linter-runner

Package Overview
Dependencies
Maintainers
0
Versions
2765
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mega-linter-runner

Local runner for MegaLinter

  • 8.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.6K
increased by20.4%
Maintainers
0
Weekly downloads
 
Created
Source
MegaLinter

MegaLinter Runner

Version Downloads/week Downloads/total GitHub stars

Docker Pulls MegaLinter codecov Secured with Trivy GitHub Sponsors PRs Welcome Tweet

MegaLinter analyzes 37 languages, 15 formats, 16 tooling formats , copy-pastes and spell in your repository sources, generate reports in several formats, and can even apply formatting and auto-fixes with auto-generated commit or PR, to ensure all your projects are clean, whatever IDE/toolbox are used by their developers !

See MegaLinter Online Documentation Web Site

This package allows to run MegaLinter locally before running it in your CD/CI workflow, or simply to locally apply reformatting and fixes without having to install up to date linters for your files

Screenshot

Installation

Pre-requisites

You need to have NodeJS and Docker installed on your computer to run MegaLinter locally with MegaLinter Runner

Global installation

npm install mega-linter-runner -g

Local installation

npm install mega-linter-runner --save-dev

No installation

You can run mega-linter-runner without installation by using npx

Example:

npx mega-linter-runner -r beta -e "'ENABLE=MARKDOWN,YAML'" -e 'SHOW_ELAPSED_TIME=true'

Pre-commit hook

You can run mega-linter-runner as a pre-commit hook

Sample .pre-commit-config.yaml:

repos:
  - repo: https://github.com/oxsecurity/megalinter
    rev: v6.8.0 # Git tag specifying the hook, not mega-linter-runner, version
    hooks:
      - id: megalinter-incremental # Faster, less thorough
        stages:
          - commit
      - id: megalinter-full # Slower, more thorough
        stages:
          - push

See .pre-commit-hooks.yaml for more details.

Usage

mega-linter-runner [OPTIONS] [FILES]

The options are only related to mega-linter-runner. For MegaLinter options, please use a .mega-linter.yml configuration file

OptionDescriptionDefault
-p
--path
Directory containing the files to lintcurrent directory
-f
--flavor
Set this parameter to use a MegaLinter flavorall
-d
--image
You can override the used docker image, including if it's on another docker registry
-e
--env
Environment variables for MegaLinter, following format 'ENV_VAR_NAME=VALUE' for a single value or "'ENV_VAR_NAME=VALUE1,VALUE2'" for a list of values
Warning: Quotes are mandatory
--fixAutomatically apply formatting and fixes in your files
-r
--release
Allows to override MegaLinter version usedv5
-h
--help
Show mega-linter-runner help
-v
--version
Show mega-linter-runner version
-i
--install
Generate MegaLinter configuration files
--container-nameSpecify MegaLinter container name
--remove-containerRemove MegaLinter Docker container when done

You can also use npx mega-linter-runner if you do not want to install the package

Examples

mega-linter-runner
mega-linter-runner -p myFolder --fix
mega-linter-runner -r beta -e "'ENABLE=MARKDOWN,YAML'" -e 'SHOW_ELAPSED_TIME=true'
mega-linter-runner --flavor python --release beta --filesonly path/to/my/file1.py another/path/to/a/file.js and/another/file.py

Configuration

You can generate a ready-to-use .mega-linter.yml configuration file by running npx mega-linter-runner --install at the root of your repository

Runner Install

Linters

Languages

LanguageLinterAdditional
BASHbash-exec
BASH_EXEC
BASHshellcheck
BASH_SHELLCHECK
GitHub stars sarif
BASHshfmt
BASH_SHFMT
GitHub stars formatter
Ccpplint
C_CPPLINT
GitHub stars
Cclang-format
C_CLANG_FORMAT
GitHub stars autofix
CLOJUREclj-kondo
CLOJURE_CLJ_KONDO
GitHub stars
CLOJUREcljstyle
CLOJURE_CLJSTYLE
GitHub stars autofix
COFFEEcoffeelint
COFFEE_COFFEELINT
GitHub stars
C++ (CPP)cpplint
CPP_CPPLINT
GitHub stars
C++ (CPP)clang-format
CPP_CLANG_FORMAT
GitHub stars autofix
C# (CSHARP)dotnet-format
CSHARP_DOTNET_FORMAT
GitHub stars formatter
C# (CSHARP)csharpier
CSHARP_CSHARPIER
GitHub stars formatter
C# (CSHARP)roslynator
CSHARP_ROSLYNATOR
GitHub stars formatter
DARTdartanalyzer
DART_DARTANALYZER
downgraded version GitHub stars
GOgolangci-lint
GO_GOLANGCI_LINT
GitHub stars autofix
GOrevive
GO_REVIVE
GitHub stars sarif
GROOVYnpm-groovy-lint
GROOVY_NPM_GROOVY_LINT
GitHub stars autofix sarif
JAVAcheckstyle
JAVA_CHECKSTYLE
GitHub stars sarif
JAVApmd
JAVA_PMD
GitHub stars sarif
JAVASCRIPTeslint
JAVASCRIPT_ES
GitHub stars autofix sarif
JAVASCRIPTstandard
JAVASCRIPT_STANDARD
GitHub stars autofix
JAVASCRIPTprettier
JAVASCRIPT_PRETTIER
GitHub stars formatter
JSXeslint
JSX_ESLINT
GitHub stars autofix sarif
KOTLINktlint
KOTLIN_KTLINT
GitHub stars autofix sarif
KOTLINdetekt
KOTLIN_DETEKT
GitHub stars sarif
LUAluacheck
LUA_LUACHECK
GitHub stars
LUAselene
LUA_SELENE
GitHub stars
LUAstylua
LUA_STYLUA
GitHub stars
MAKEFILEcheckmake
MAKEFILE_CHECKMAKE
GitHub stars
PERLperlcritic
PERL_PERLCRITIC
GitHub stars
PHPphpcs
PHP_PHPCS
GitHub stars sarif
PHPphpstan
PHP_PHPSTAN
downgraded version GitHub stars sarif
PHPpsalm
PHP_PSALM
GitHub stars sarif
PHPphplint
PHP_PHPLINT
GitHub stars sarif
PHPphp-cs-fixer
PHP_PHPCSFIXER
GitHub stars
POWERSHELLpowershell
POWERSHELL_POWERSHELL
GitHub stars autofix
POWERSHELLpowershell_formatter
POWERSHELL_POWERSHELL_FORMATTER
GitHub stars formatter
PYTHONpylint
PYTHON_PYLINT
GitHub stars
PYTHONblack
PYTHON_BLACK
GitHub stars formatter
PYTHONflake8
PYTHON_FLAKE8
GitHub stars
PYTHONisort
PYTHON_ISORT
GitHub stars formatter
PYTHONbandit
PYTHON_BANDIT
GitHub stars sarif
PYTHONmypy
PYTHON_MYPY
GitHub stars
PYTHONpyright
PYTHON_PYRIGHT
GitHub stars
PYTHONruff
PYTHON_RUFF
GitHub stars autofix sarif
Rlintr
R_LINTR
GitHub stars
RAKUraku
RAKU_RAKU
GitHub stars
RUBYrubocop
RUBY_RUBOCOP
GitHub stars autofix
RUSTclippy
RUST_CLIPPY
GitHub stars
SALESFORCEsfdx-scanner-apex
SALESFORCE_SFDX_SCANNER_APEX
GitHub stars
SALESFORCEsfdx-scanner-aura
SALESFORCE_SFDX_SCANNER_AURA
GitHub stars
SALESFORCEsfdx-scanner-lwc
SALESFORCE_SFDX_SCANNER_LWC
GitHub stars
SALESFORCElightning-flow-scanner
SALESFORCE_LIGHTNING_FLOW_SCANNER
GitHub stars
SCALAscalafix
SCALA_SCALAFIX
GitHub stars
SQLsqlfluff
SQL_SQLFLUFF
GitHub stars
SQLtsqllint
SQL_TSQLLINT
GitHub stars
SWIFTswiftlint
SWIFT_SWIFTLINT
GitHub stars autofix
TSXeslint
TSX_ESLINT
GitHub stars autofix sarif
TYPESCRIPTeslint
TYPESCRIPT_ES
GitHub stars autofix sarif
TYPESCRIPTts-standard
TYPESCRIPT_STANDARD
GitHub stars autofix
TYPESCRIPTprettier
TYPESCRIPT_PRETTIER
GitHub stars formatter
Visual Basic .NET (VBDOTNET)dotnet-format
VBDOTNET_DOTNET_FORMAT
GitHub stars formatter

Formats

FormatLinterAdditional
CSSstylelint
CSS_STYLELINT
GitHub stars autofix
ENVdotenv-linter
ENV_DOTENV_LINTER
GitHub stars autofix
GRAPHQLgraphql-schema-linter
GRAPHQL_GRAPHQL_SCHEMA_LINTER
GitHub stars
HTMLdjlint
HTML_DJLINT
GitHub stars
HTMLhtmlhint
HTML_HTMLHINT
GitHub stars
JSONjsonlint
JSON_JSONLINT
GitHub stars
JSONeslint-plugin-jsonc
JSON_ESLINT_PLUGIN_JSONC
GitHub stars autofix sarif
JSONv8r
JSON_V8R
GitHub stars
JSONprettier
JSON_PRETTIER
GitHub stars formatter
JSONnpm-package-json-lint
JSON_NPM_PACKAGE_JSON_LINT
GitHub stars
LATEXchktex
LATEX_CHKTEX
MARKDOWNmarkdownlint
MARKDOWN_MARKDOWNLINT
GitHub stars formatter
MARKDOWNremark-lint
MARKDOWN_REMARK_LINT
GitHub stars formatter
MARKDOWNmarkdown-link-check
MARKDOWN_MARKDOWN_LINK_CHECK
downgraded version GitHub stars
MARKDOWNmarkdown-table-formatter
MARKDOWN_MARKDOWN_TABLE_FORMATTER
GitHub stars formatter
PROTOBUFprotolint
PROTOBUF_PROTOLINT
GitHub stars autofix
RSTrst-lint
RST_RST_LINT
GitHub stars
RSTrstcheck
RST_RSTCHECK
GitHub stars
RSTrstfmt
RST_RSTFMT
formatter
XMLxmllint
XML_XMLLINT
autofix
YAMLprettier
YAML_PRETTIER
GitHub stars formatter
YAMLyamllint
YAML_YAMLLINT
GitHub stars
YAMLv8r
YAML_V8R
GitHub stars

Tooling formats

Tooling formatLinterAdditional
ACTIONactionlint
ACTION_ACTIONLINT
GitHub stars
ANSIBLEansible-lint
ANSIBLE_ANSIBLE_LINT
GitHub stars sarif
APIspectral
API_SPECTRAL
GitHub stars
ARMarm-ttk
ARM_ARM_TTK
GitHub stars
BICEPbicep_linter
BICEP_BICEP_LINTER
GitHub stars
CLOUDFORMATIONcfn-lint
CLOUDFORMATION_CFN_LINT
GitHub stars sarif
DOCKERFILEhadolint
DOCKERFILE_HADOLINT
GitHub stars sarif
EDITORCONFIGeditorconfig-checker
EDITORCONFIG_EDITORCONFIG_CHECKER
GitHub stars
GHERKINgherkin-lint
GHERKIN_GHERKIN_LINT
GitHub stars
KUBERNETESkubeconform
KUBERNETES_KUBECONFORM
GitHub stars
KUBERNETEShelm
KUBERNETES_HELM
GitHub stars
KUBERNETESkubescape
KUBERNETES_KUBESCAPE
downgraded version GitHub stars sarif
PUPPETpuppet-lint
PUPPET_PUPPET_LINT
GitHub stars autofix
SNAKEMAKEsnakemake
SNAKEMAKE_LINT
GitHub stars
SNAKEMAKEsnakefmt
SNAKEMAKE_SNAKEFMT
GitHub stars formatter
TEKTONtekton-lint
TEKTON_TEKTON_LINT
GitHub stars
TERRAFORMtflint
TERRAFORM_TFLINT
GitHub stars sarif
TERRAFORMterrascan
TERRAFORM_TERRASCAN
downgraded version GitHub stars sarif
TERRAFORMterragrunt
TERRAFORM_TERRAGRUNT
GitHub stars autofix
TERRAFORMterraform-fmt
TERRAFORM_TERRAFORM_FMT
GitHub stars formatter

Other

Code quality checkerLinterAdditional
COPYPASTEjscpd
COPYPASTE_JSCPD
GitHub stars
REPOSITORYcheckov
REPOSITORY_CHECKOV
GitHub stars sarif
REPOSITORYdevskim
REPOSITORY_DEVSKIM
GitHub stars sarif
REPOSITORYdustilock
REPOSITORY_DUSTILOCK
GitHub stars sarif
REPOSITORYgit_diff
REPOSITORY_GIT_DIFF
GitHub stars
REPOSITORYgitleaks
REPOSITORY_GITLEAKS
GitHub stars sarif
REPOSITORYgrype
REPOSITORY_GRYPE
downgraded version GitHub stars sarif
REPOSITORYkics
REPOSITORY_KICS
GitHub stars sarif
REPOSITORYls-lint
REPOSITORY_LS_LINT
GitHub stars
REPOSITORYsecretlint
REPOSITORY_SECRETLINT
GitHub stars sarif
REPOSITORYsemgrep
REPOSITORY_SEMGREP
GitHub stars sarif
REPOSITORYsyft
REPOSITORY_SYFT
GitHub stars sarif
REPOSITORYtrivy
REPOSITORY_TRIVY
GitHub stars sarif
REPOSITORYtrivy-sbom
REPOSITORY_TRIVY_SBOM
GitHub stars sarif
REPOSITORYtrufflehog
REPOSITORY_TRUFFLEHOG
GitHub stars
SPELLcspell
SPELL_CSPELL
GitHub stars
SPELLproselint
SPELL_PROSELINT
GitHub stars
SPELLvale
SPELL_VALE
GitHub stars
SPELLlychee
SPELL_LYCHEE
GitHub stars

Keywords

FAQs

Package last updated on 23 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc