Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing Linting configurations across multiple projects, locally and in github action #1669

Closed
SoumayaMauthoorMOJ opened this issue Jul 29, 2022 · 1 comment
Labels
question Further information is requested

Comments

@SoumayaMauthoorMOJ
Copy link
Contributor

SoumayaMauthoorMOJ commented Jul 29, 2022

I can see that you specify linting config files in https://github.com/oxsecurity/megalinter/tree/main/TEMPLATES.

I would like to create a set of linting config files for my team which can be shared across multiple Github projects, when running megalinter locally, through pre-commit hook and in Github action.

Is that possible?

So for example I could create an internal composite github action within my organisation with all of the linting config files. All of the github repos could use this internal composite action. But how could I reference the linting config files from the docker image ?

@SoumayaMauthoorMOJ SoumayaMauthoorMOJ added the question Further information is requested label Jul 29, 2022
@nvuillam
Copy link
Member

nvuillam commented Jul 30, 2022

@SoumayaMauthoorMOJ this is possible using EXTENDS in your .mega-linter.yml config file :)

Example of .mega-linter.yml with extension

EXTENDS: https://raw.githubusercontent.com/lars-reimann/.github/main/.mega-linter.yml

There may be an issue with properties priority, if you see it please notify here -> #1516

You can also define ENV var MEGALINTER_CONFIG to use a remove .mega-linter.yml config file

Example: MEGALINTER_CONFIG=https://raw.githubusercontent.com/lars-reimann/.github/main/.mega-linter.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants