diff --git a/.automation/build.py b/.automation/build.py index 8aa430a5621..a0e2c4272da 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -2280,14 +2280,22 @@ def move_to_file(file_path, start, end, target_file, keep_in_source=False): with open(file_path, "w", encoding="utf-8") as file: file.write(file_content) logging.info("Updated " + file.name + " between " + start + " and " + end) - bracket_content = ( - bracket_content.replace("####", "#THREE#") - .replace("###", "#TWO#") - .replace("##", "#ONE#") - .replace("#THREE#", "###") - .replace("#TWO#", "##") - .replace("#ONE#", "#") - ) + if "" diff --git a/docs/config-apply-fixes.md b/docs/config-apply-fixes.md index a01c2bfb08e..dbbb4cf0d66 100644 --- a/docs/config-apply-fixes.md +++ b/docs/config-apply-fixes.md @@ -6,7 +6,7 @@ description: Use MegaLinter to auto apply corrections on your repository files -## Apply fixes +# Apply fixes Mega-linter is able to apply fixes provided by linters. To use this capability, you need 3 **env variables** defined at top level @@ -17,7 +17,7 @@ Only for GitHub Action Workflow file if you use it: - **APPLY_FIXES_EVENT**: `all`, `push`, `pull_request`, `none` _(use none in case of use of [Updated sources reporter](reporters/UpdatedSourcesReporter.md))_ - **APPLY_FIXES_MODE**: `commit` to create a new commit and push it on the same branch, or `pull_request` to create a new PR targeting the branch. -### Apply fixes issues +## Apply fixes issues You may see **github permission errors**, or workflows not run on the new commit. @@ -32,7 +32,7 @@ To solve these issues, you can apply one of the following solutions. - [Create Classic Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token#creating-a-token), then copy the PAT value - [Define secret variable](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) named **PAT** on your repository, and paste the PAT value -### Notes +## Notes - You can use [**Updated sources reporter**](reporters/UpdatedSourcesReporter.md) if you don't want fixes to be automatically applied on git branch, but **download them in a zipped file** and manually **extract them in your project** - If used, **APPLY_FIXES_EVENT** and **APPLY_FIXES_MODE** can not be defined in `.mega-linter.yml`config file, they must be set as environment variables diff --git a/docs/config-cli-lint-mode.md b/docs/config-cli-lint-mode.md index 45ec722a349..c41238aa483 100644 --- a/docs/config-cli-lint-mode.md +++ b/docs/config-cli-lint-mode.md @@ -6,7 +6,7 @@ description: Cli lint mode can be list_of_files, project or files -## CLI lint mode +# CLI lint mode Each linter has a lint mode by default, visible in its MegaLinter documentation ([example](https://megalinter.io/latest/descriptors/repository_trivy/#how-the-linting-is-performed)): diff --git a/docs/config-file.md b/docs/config-file.md index 4ed6af6045a..748ec280706 100644 --- a/docs/config-file.md +++ b/docs/config-file.md @@ -6,7 +6,7 @@ description: Use config file with auto-completion to customize MegaLinter behavi -## .mega-linter.yml file +# .mega-linter.yml file MegaLinter configuration variables are defined in a **.mega-linter.yml** file at the root of the repository or with **environment variables**. You can see an example config file in this repo: [**.mega-linter.yml**](https://github.com/oxsecurity/megalinter/blob/main/.mega-linter.yml) diff --git a/docs/config-filtering.md b/docs/config-filtering.md index f3f52c9766c..3829cc05e9c 100644 --- a/docs/config-filtering.md +++ b/docs/config-filtering.md @@ -6,7 +6,7 @@ description: Exclude files from linting -## Filter linted files +# Filter linted files If you need to lint only a folder or exclude some files from linting, you can use optional environment parameters `FILTER_REGEX_INCLUDE` and `FILTER_REGEX_EXCLUDE` You can apply filters to a single linter by defining variable `_FILTER_REGEX_INCLUDE` and `_FILTER_REGEX_EXCLUDE` diff --git a/docs/config-linters.md b/docs/config-linters.md index 01411e0c027..8066c31b9b2 100644 --- a/docs/config-linters.md +++ b/docs/config-linters.md @@ -6,7 +6,7 @@ description: Every linters has its own variables that can be customized -## Linter specific variables +# Linter specific variables See variables related to a single linter behavior in [linters documentations](supported-linters.md) diff --git a/docs/config-postcommands.md b/docs/config-postcommands.md index 09fdd63648d..524b15fcfd0 100644 --- a/docs/config-postcommands.md +++ b/docs/config-postcommands.md @@ -6,7 +6,7 @@ description: Customize your MegaLinter run by running commands after linters are -## Post-commands +# Post-commands MegaLinter can run custom commands after running linters (for example, running additional tests) diff --git a/docs/config-precommands.md b/docs/config-precommands.md index fec0559e9bd..e7f861c46e5 100644 --- a/docs/config-precommands.md +++ b/docs/config-precommands.md @@ -6,7 +6,7 @@ description: Customize your MegaLinter run by installing linters extensions with -## Pre-commands +# Pre-commands MegaLinter can run custom commands before running linters (for example, installing an plugin required by one of the linters you use) diff --git a/docs/config-variables-security.md b/docs/config-variables-security.md index 3da3132f423..9f714451a8c 100644 --- a/docs/config-variables-security.md +++ b/docs/config-variables-security.md @@ -6,7 +6,7 @@ description: Hide from linter executables the environment variables that can con -## Environment variables security +# Environment variables security MegaLinter runs on a docker image and calls the linters via command line to gather their results. diff --git a/docs/config-variables.md b/docs/config-variables.md index 566ba7949f4..58c1b3eda4b 100644 --- a/docs/config-variables.md +++ b/docs/config-variables.md @@ -6,7 +6,7 @@ description: List of common variables that you can use to customize MegaLinter b -## Common variables +# Common variables | **ENV VAR** | **Default Value** | **Notes** | |----------------------------------------------------------------------|-----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| diff --git a/docs/install-assisted.md b/docs/install-assisted.md index 1c15f94bc71..95290f4caf0 100644 --- a/docs/install-assisted.md +++ b/docs/install-assisted.md @@ -6,7 +6,7 @@ description: Setup MegaLinter in 5 minutes thanks to its assisted installation t -## Assisted installation +# Assisted installation Just run `npx mega-linter-runner --install` at the root of your repository and answer questions, it will generate ready to use configuration files for MegaLinter :) diff --git a/docs/install-azure.md b/docs/install-azure.md index be68fe67465..98d69ffadc9 100644 --- a/docs/install-azure.md +++ b/docs/install-azure.md @@ -6,7 +6,7 @@ description: Manual instructions to setup MegaLinter as an Azure Pipelines job -## Azure Pipelines +# Azure Pipelines Use the following Azure Pipelines [YAML template](https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema) diff --git a/docs/install-bitbucket.md b/docs/install-bitbucket.md index 5058057ecf3..10b9c608b9c 100644 --- a/docs/install-bitbucket.md +++ b/docs/install-bitbucket.md @@ -6,7 +6,7 @@ description: Manual instructions to setup MegaLinter as a Bitbucket Pipelines jo -## Bitbucket Pipelines +# Bitbucket Pipelines 1. Create a `bitbucket-pipelines.yml` file on the root directory of your repository diff --git a/docs/install-concourse.md b/docs/install-concourse.md index c7a6ce4e0c1..237a5dae4f6 100644 --- a/docs/install-concourse.md +++ b/docs/install-concourse.md @@ -6,9 +6,9 @@ description: Manual instructions to setup MegaLinter as a Concourse job -## Concourse +# Concourse -### Pipeline step +## Pipeline step Use the following `job.step` in your pipeline template @@ -38,7 +38,7 @@ Note: make sure you have `job.plan.get` step which gets `repo` containing your r cd repo export DEFAULT_WORKSPACE=$(pwd) bash -ex /entrypoint.sh - # doing this because concourse doesn't work as other CI systems + ## doing this because concourse doesn't work as other CI systems # params: # PARALLEL: true # DISABLE: SPELL @@ -49,7 +49,7 @@ Note: make sure you have `job.plan.get` step which gets `repo` containing your r OR -### Use it as reusable task +## Use it as reusable task Create reusable concourse task which can be used with multiple pipelines @@ -67,7 +67,7 @@ image_resource: inputs: - name: repo -# uncomment this if you want reports as task output +## uncomment this if you want reports as task output # output: # - name: reports # path: repo/megalinter-reports diff --git a/docs/install-docker.md b/docs/install-docker.md index 70e48847b3e..d7a5c0bd17f 100644 --- a/docs/install-docker.md +++ b/docs/install-docker.md @@ -6,7 +6,7 @@ description: Manual instructions to run MegaLinter as a docker image -## Docker container +# Docker container You can also run megalinter with its Docker container, just execute this command: diff --git a/docs/install-drone.md b/docs/install-drone.md index 051d6c0c9f5..041b44be4c7 100644 --- a/docs/install-drone.md +++ b/docs/install-drone.md @@ -6,7 +6,7 @@ description: Manual instructions to setup MegaLinter as a Drone CI job -## Drone CI +# Drone CI **Warning: Drone CI support is experimental and is undergoing heavy modifications (see issue [#2047](https://github.com/oxsecurity/megalinter/issues/2047)).** @@ -32,7 +32,7 @@ steps: This uses the [Drone CI docker runner](https://docs.drone.io/pipeline/docker/overview/), so it's needed to install and configure it beforehand on your Drone CI server. -### (Optional) Adjusting trigger rules +## (Optional) Adjusting trigger rules The Drone CI workflow should trigger automatically for every scenario (push, pull request, sync…) however, you can _optionally_ change this behavior by changing the trigger. For example: diff --git a/docs/install-github.md b/docs/install-github.md index 9e1ec8d6071..a9347a48e9a 100644 --- a/docs/install-github.md +++ b/docs/install-github.md @@ -6,7 +6,7 @@ description: Manual instructions to setup MegaLinter in a GitHub Action Workflow -## GitHub Action +# GitHub Action 1. Create a new file in your repository called `.github/workflows/mega-linter.yml` 2. Copy the [example workflow from below](https://raw.githubusercontent.com/oxsecurity/megalinter/main/TEMPLATES/mega-linter.yml) into that new file, no extra configuration required diff --git a/docs/install-gitlab.md b/docs/install-gitlab.md index 260de47ac51..d70e15c7887 100644 --- a/docs/install-gitlab.md +++ b/docs/install-gitlab.md @@ -6,7 +6,7 @@ description: Manual instructions to setup MegaLinter as a Gitlab Pipeline job -## GitLab CI +# GitLab CI Create or update `.gitlab-ci.yml` file at the root of your repository diff --git a/docs/install-jenkins.md b/docs/install-jenkins.md index c05f1b7ddf1..648432cdcc7 100644 --- a/docs/install-jenkins.md +++ b/docs/install-jenkins.md @@ -6,7 +6,7 @@ description: Manual instructions to setup MegaLinter as a Jenkins job -## Jenkins +# Jenkins Add the following stage in your Jenkinsfile diff --git a/docs/install-locally.md b/docs/install-locally.md index b81f938438d..ac659ccc47b 100644 --- a/docs/install-locally.md +++ b/docs/install-locally.md @@ -6,7 +6,7 @@ description: Manual instructions to run MegaLinter locally on your computer -## Run MegaLinter locally +# Run MegaLinter locally [![Version](https://img.shields.io/npm/v/mega-linter-runner.svg)](https://npmjs.org/package/mega-linter-runner) [![Downloads/week](https://img.shields.io/npm/dw/mega-linter-runner.svg)](https://npmjs.org/package/mega-linter-runner) diff --git a/docs/install-version.md b/docs/install-version.md index f7a05793548..1d46f0efa68 100644 --- a/docs/install-version.md +++ b/docs/install-version.md @@ -6,7 +6,7 @@ description: You can use latest release or beta version of MegaLinter, know the -## Which version to use ? +# Which version to use ? The following instructions examples are using latest MegaLinter stable version (**v6** , always corresponding to the [latest release](https://github.com/oxsecurity/megalinter/releases))