Skip to content

Conversation

nvuillam
Copy link
Member

This pull request introduces functionality for users to define and build custom MegaLinter flavors, resulting in smaller, more efficient Docker images.

Key changes:

  • Adds a custom-flavor command to the runner to initialize custom flavor files.
  • Implements custom flavor Dockerfile generation based on a configuration file (megalinter-custom-flavor.yml).
  • Adds a new Docker image for building custom flavors.
  • Updates documentation to guide users through the custom flavor creation process.
  • Updates linter versions.

@Copilot Copilot AI review requested due to automatic review settings July 13, 2025 23:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for defining and building custom MegaLinter flavors to produce smaller, tailored Docker images for users.

  • Introduces a new --custom-flavor-setup runner command and a generate_custom_flavor_file method to scaffold and produce a megalinter-custom-flavor.yml.
  • Implements Dockerfile generation logic (generate_custom_flavor_dockerfile) and a builder image for custom flavors.
  • Updates documentation, schemas, and CI workflows to guide users through custom flavor creation and publishing.

Reviewed Changes

Copilot reviewed 44 out of 47 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
megalinter/custom_flavor_factory.py Adds Dockerfile generation from megalinter-custom-flavor.yml.
megalinter/MegaLinter.py Generates megalinter-custom-flavor.yml based on used linters.
mega-linter-runner/lib/runner.js Adds --custom-flavor-setup option and corresponding setup logic.
test_custom_flavor.py Basic test for custom flavor file generation.
docs/custom-flavors.md Documentation for the custom flavor workflow.
Comments suppressed due to low confidence (2)

test_custom_flavor.py:61

  • Instead of returning True/False, use assertions (e.g., assert os.path.exists(custom_flavor_file)) so pytest can detect failures automatically.
            return True

.github/workflows/deploy-RELEASE.yml:110

  • This workflow is building the custom flavor Dockerfile instead of the flavor-builder image. Update to use the correct builder Dockerfile (e.g., Dockerfile-flavor-builder).
          file: Dockerfile-custom-flavor

Comment on lines +27 to +32
required_fields = ["flavor_name", "flavor_description", "linters", "docker_image"]
for field in required_fields:
if field not in custom_flavor_config:
logging.error(f"Missing required field '{field}' in custom flavor configuration")
return False

Copy link

Copilot AI Jul 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key flavor_description does not match the test YAML which uses description. Either update the schema and test file to use flavor_description or accept description in the code.

Suggested change
required_fields = ["flavor_name", "flavor_description", "linters", "docker_image"]
for field in required_fields:
if field not in custom_flavor_config:
logging.error(f"Missing required field '{field}' in custom flavor configuration")
return False
required_fields = ["flavor_name", "linters", "docker_image"]
for field in required_fields:
if field not in custom_flavor_config:
logging.error(f"Missing required field '{field}' in custom flavor configuration")
return False
# Check for flavor description
if "flavor_description" not in custom_flavor_config and "description" not in custom_flavor_config:
logging.error("Missing required field 'flavor_description' or 'description' in custom flavor configuration")
return False

Copilot uses AI. Check for mistakes.

// Build MegaLinter docker image name with flavor and release version
const release = options.release in ["stable"] ? DEFAULT_RELEASE : options.release;
const release =
options.release in ["stable"] ? DEFAULT_RELEASE : options.release;
Copy link

Copilot AI Jul 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the in operator checks for property names, not array membership. Replace with ['stable'].includes(options.release) to properly test if options.release equals 'stable'.

Suggested change
options.release in ["stable"] ? DEFAULT_RELEASE : options.release;
["stable"].includes(options.release) ? DEFAULT_RELEASE : options.release;

Copilot uses AI. Check for mistakes.

Copy link
Contributor

github-actions bot commented Jul 13, 2025

🦙 MegaLinter status: ❌ ERROR

❌ SPELL / cspell - 1 error
test-custom-flavor.yml:11:22     - Unknown word (myuser)     -- registry: "ghcr.io/myuser"
	 Suggestions: [muser, mauser, mouser, Mauser, muse]
CSpell: Files checked: 751, Issues found: 1 in 1 file.


You can skip this misspellings by defining the following .cspell.json file at the root of your repository
Of course, please correct real typos before :)

{
    "version": "0.2",
    "language": "en",
    "ignorePaths": [
        "**/node_modules/**",
        "**/vscode-extension/**",
        "**/.git/**",
        "**/.pnpm-lock.json",
        ".vscode",
        "package-lock.json",
        "megalinter-reports"
    ],
    "words": [
        "myuser"
    ]
}


You can also copy-paste megalinter-reports/.cspell.json at the root of your repository

🤖 AI-Powered Fix Suggestions for SPELL_CSPELL (by openai gpt-4.1-mini)

  1. Summary:
    The linter found one spelling issue in test-custom-flavor.yml at line 11, column 22: the word "myuser" is flagged as unknown.

  2. Explanation & Fix:

  • CSpell treats "myuser" as a misspelled or unknown word because it’s not in its dictionary.
  • This often happens with usernames, project-specific terms, or technical jargon.
  1. How to fix:
  • If "myuser" is a valid username or term, add it to your custom dictionary (e.g., .cspell.json) under "words" to prevent future false positives.
  • Alternatively, if it’s a placeholder, consider replacing it with a more generic or documented term.
  • If it’s a typo, correct it accordingly.

Example .cspell.json addition:

{
  "words": ["myuser"]
}

This will suppress the warning for "myuser" in all files.

❌ PYTHON / flake8 - 5 errors
.automation/build.py:2715:29: E999 SyntaxError: '(' was never closed
megalinter/MegaLinter.py:967:121: E501 line too long (132 > 120 characters)
megalinter/MegaLinter.py:986:121: E501 line too long (125 > 120 characters)
test_custom_flavor.py:11:1: E402 module level import not at top of file
test_custom_flavor.py:12:1: E402 module level import not at top of file

🤖 AI-Powered Fix Suggestions for PYTHON_FLAKE8 (by openai gpt-4.1-mini)

  1. Summary of main issues:
  • SyntaxError (E999) in .automation/build.py due to an unclosed parenthesis, which breaks code parsing.
  • Line length violations (E501) in megalinter/MegaLinter.py where lines exceed the configured max of 120 characters.
  • Import statements (E402) in test_custom_flavor.py not placed at the top of the file, violating PEP8 import order.
  1. How to fix:
  • For E999: Locate the line with the unclosed parenthesis and add the missing closing ) to fix the syntax error. This is critical as it prevents the file from running or being parsed.
  • For E501: Break long lines into multiple shorter lines using line continuation, implicit line joining inside parentheses, or by assigning parts to variables.
  • For E402: Move all import statements to the very top of the file, before any other code or statements.

Example fix for E501:

# Original line too long
result = some_function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)

# Fixed by breaking into multiple lines
result = some_function(
    arg1, arg2, arg3, arg4,
    arg5, arg6, arg7, arg8
)

Address the syntax error first, then fix line lengths and import order for clean, PEP8-compliant code.

❌ PYTHON / mypy - 1 error
.automation/build.py:2715: error: '(' was never closed  [syntax]
Found 1 error in 1 file (errors prevented further checking)

🤖 AI-Powered Fix Suggestions for PYTHON_MYPY (by openai gpt-4.1-mini)

  1. Summary:
    The error '(' was never closed [syntax] indicates a syntax mistake where an opening parenthesis '(' in .automation/build.py at line 2715 is missing its corresponding closing parenthesis ')`. This prevents mypy from parsing the file and halts further type checking.

  2. How to fix:

  • Open .automation/build.py and navigate to line 2715.
  • Check for any function calls, tuples, or expressions starting with '(' that lack a matching ')'.
  • Add the missing closing parenthesis to properly close the expression.
  • Verify balanced parentheses throughout the surrounding code block to avoid similar issues.
  • After fixing, rerun mypy to confirm the syntax error is resolved.

Example fix:

# Before (missing closing parenthesis)
result = some_function(arg1, arg2

# After (added closing parenthesis)
result = some_function(arg1, arg2)

Ensuring all parentheses are balanced will allow mypy to parse and type-check the file correctly.

❌ PYTHON / pylint - 28 errors
************* Module build
.automation/build.py:2715:28: E0001: Parsing failed: ''(' was never closed (build, line 2715)' (syntax-error)
************* Module megalinter.MegaLinter
megalinter/MegaLinter.py:210:19: E1101: Instance of 'MockLinter' has no 'apply_fixes' member (no-member)
megalinter/MegaLinter.py:244:20: E1101: Instance of 'MockLinter' has no 'master' member (no-member)
megalinter/MegaLinter.py:251:20: E1101: Instance of 'MockLinter' has no 'master' member (no-member)
megalinter/MegaLinter.py:261:15: E1101: Instance of 'MockLinter' has no 'status' member (no-member)
megalinter/MegaLinter.py:263:19: E1101: Instance of 'MockLinter' has no 'return_code' member (no-member)
megalinter/MegaLinter.py:270:15: E1101: Instance of 'MockLinter' has no 'return_code' member (no-member)
megalinter/MegaLinter.py:271:35: E1101: Instance of 'MockLinter' has no 'return_code' member (no-member)
megalinter/MegaLinter.py:273:15: E1101: Instance of 'MockLinter' has no 'number_fixed' member (no-member)
megalinter/MegaLinter.py:678:31: E1101: Instance of 'MockLinter' has no 'file_extensions' member (no-member)
megalinter/MegaLinter.py:679:32: E1101: Instance of 'MockLinter' has no 'file_names_regex' member (no-member)
megalinter/MegaLinter.py:790:12: E1101: Instance of 'MockLinter' has no 'collect_files' member (no-member)
megalinter/MegaLinter.py:791:19: E1101: Instance of 'MockLinter' has no 'files' member (no-member)
megalinter/MegaLinter.py:791:42: E1101: Instance of 'MockLinter' has no 'lint_all_files' member (no-member)
************* Module megalinter.custom_flavor_factory
megalinter/custom_flavor_factory.py:17:11: E0601: Using variable 'os' before assignment (used-before-assignment)
megalinter/custom_flavor_factory.py:94:0: E0001: Cannot import 'build' due to ''(' was never closed (build, line 2715)' (syntax-error)
************* Module megalinter.utilstest
megalinter/utilstest.py:607:12: E1101: Instance of 'MockLinter' has no 'output_sarif' member (no-member)
megalinter/utilstest.py:608:16: E1101: Instance of 'MockLinter' has no 'cli_lint_mode' member (no-member)
megalinter/utilstest.py:609:16: E1101: Instance of 'MockLinter' has no 'name' member (no-member)
megalinter/utilstest.py:615:15: E1101: Instance of 'MockLinter' has no 'name' member (no-member)
megalinter/utilstest.py:617:20: E1101: Instance of 'MockLinter' has no 'total_number_errors' member (no-member)
megalinter/utilstest.py:618:56: E1101: Instance of 'MockLinter' has no 'name' member (no-member)
megalinter/utilstest.py:619:27: E1101: Instance of 'MockLinter' has no 'total_number_errors' member (no-member)
megalinter/utilstest.py:623:15: E1101: Instance of 'MockLinter' has no 'cli_lint_warnings_count' member (no-member)
megalinter/utilstest.py:625:20: E1101: Instance of 'MockLinter' has no 'total_number_warnings' member (no-member)
megalinter/utilstest.py:626:58: E1101: Instance of 'MockLinter' has no 'name' member (no-member)
megalinter/utilstest.py:627:27: E1101: Instance of 'MockLinter' has no 'total_number_warnings' member (no-member)
************* Module server.server_worker
server/server_worker.py:221:28: E1101: Instance of 'MockLinter' has no 'reporters' member (no-member)

🤖 AI-Powered Fix Suggestions for PYTHON_PYLINT (by openai gpt-4.1-mini)

  1. Summary of main issues:
  • Syntax error in .automation/build.py at line 2715: an opening parenthesis '(' is never closed, causing parsing failure and import errors.
  • Numerous E1101 (no-member) errors indicating that the MockLinter class instances are accessed with attributes/methods that do not exist.
  • E0601 (used-before-assignment) in custom_flavor_factory.py for variable os, likely due to incorrect import or variable shadowing.
  1. General advice to fix critical issues:
  • Fix the syntax error in .automation/build.py by locating line 2715 and ensuring all parentheses are properly closed. This will resolve parsing and import errors cascading from this file.
  • Review the MockLinter class definition: add the missing attributes/methods (apply_fixes, master, status, return_code, etc.) or mock them properly if used in tests. Alternatively, adjust code to not access non-existent members.
  • For E0601, ensure os is imported at the top of custom_flavor_factory.py and not overwritten by a local variable.
  • After fixing syntax and class definitions, rerun pylint to confirm resolution.

Example fix for syntax error:

# Before (unclosed '(')
some_function_call(arg1, arg2

# After (closed '(')
some_function_call(arg1, arg2)

Example fix for missing member:

class MockLinter:
    def __init__(self):
        self.apply_fixes = False
        self.master = None
        # define other missing members similarly

Prioritize fixing the syntax error first, as it blocks imports and causes many downstream errors.

❌ PYTHON / ruff - 2 errors
.automation/build.py:2719:58: SyntaxError: unexpected EOF while parsing
     |
2717 |             level=logging.INFO,
2718 |             format=logging_format,
2719 |             handlers=[logging.StreamHandler(sys.stdout)],
     |                                                          ^
     |

megalinter/custom_flavor_factory.py:18:12: F823 Local variable `os` referenced before assignment
   |
16 | def generate_custom_flavor_dockerfile(custom_flavor_file):
17 |     """Generate Dockerfile-custom-flavor from megalinter-custom-flavor.yml"""
18 |     if not os.path.exists(custom_flavor_file):
   |            ^^ F823
19 |         logging.error(f"Custom flavor file not found: {custom_flavor_file}")
20 |         return False
   |

Found 2 errors.

🤖 AI-Powered Fix Suggestions for PYTHON_RUFF (by openai gpt-4.1-mini)

  1. Summary of main issues:
  • SyntaxError: unexpected EOF while parsing in .automation/build.py at line 2719 indicates the file ends prematurely, likely due to a missing closing bracket, quote, or incomplete statement.
  • F823 error in megalinter/custom_flavor_factory.py at line 18 means the local variable os is used before assignment, typically because the os module was not imported or is shadowed.
  1. How to fix:
  • For the SyntaxError, carefully check the code around line 2719 for unclosed parentheses, brackets, or quotes. Add the missing closing syntax to complete the statement.
  • For the F823 error, ensure the os module is imported at the top of custom_flavor_factory.py with import os. Also, verify no local variable named os shadows the module.

Example fix for F823:

import os  # Add this at the top of the file

def generate_custom_flavor_dockerfile(custom_flavor_file):
    if not os.path.exists(custom_flavor_file):
        logging.error(f"Custom flavor file not found: {custom_flavor_file}")
        return False

Addressing these will resolve the critical parsing and reference errors blocking linting.

⚠️ PYTHON / bandit - 59 errors
Run started:2025-07-14 00:02:33.082052

Test results:
>> Issue: [B404:blacklist] Consider possible security implications associated with the subprocess module.
   Severity: Low   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/blacklists/blacklist_imports.html#b404-import-subprocess
   Location: ./megalinter/Linter.py:28:0
27	import shutil
28	import subprocess
29	import sys

--------------------------------------------------
>> Issue: [B310:blacklist] Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
   Severity: Medium   Confidence: High
   CWE: CWE-22 (https://cwe.mitre.org/data/definitions/22.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/blacklists/blacklist_calls.html#b310-urllib-urlopen
   Location: ./megalinter/Linter.py:567:24
566	                    with (
567	                        urllib.request.urlopen(remote_config_file) as response,
568	                        open(local_config_file, "wb") as out_file,

--------------------------------------------------
>> Issue: [B310:blacklist] Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
   Severity: Medium   Confidence: High
   CWE: CWE-22 (https://cwe.mitre.org/data/definitions/22.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/blacklists/blacklist_calls.html#b310-urllib-urlopen
   Location: ./megalinter/Linter.py:646:24
645	                    with (
646	                        urllib.request.urlopen(remote_ignore_file) as response,
647	                        open(local_ignore_file, "wb") as out_file,

--------------------------------------------------
>> Issue: [B602:subprocess_popen_with_shell_equals_true] subprocess call with shell=True identified, security issue.
   Severity: High   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/plugins/b602_subprocess_popen_with_shell_equals_true.html
   Location: ./megalinter/Linter.py:1115:22
1114	                stderr=subprocess.STDOUT,
1115	                shell=True,
1116	                cwd=cwd,
1117	                env=subprocess_env,
1118	                executable=(
1119	                    shutil.which("bash") if sys.platform == "win32" else "/bin/bash"
1120	                ),
1121	            )
1122	            return_code = process.returncode
1123	            return_stdout = utils.clean_string(process.stdout, not self.is_formatter)
1124	        else:
1125	            # Use full executable path if we are on Windows
1126	            if sys.platform == "win32":

--------------------------------------------------
>> Issue: [B603:subprocess_without_shell_equals_true] subprocess call - check for execution of untrusted input.
   Severity: Low   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/plugins/b603_subprocess_without_shell_equals_true.html
   Location: ./megalinter/Linter.py:1137:26
1136	            try:
1137	                process = subprocess.run(
1138	                    command,
1139	                    stdout=subprocess.PIPE,
1140	                    stderr=subprocess.STDOUT,
1141	                    env=subprocess_env,
1142	                    cwd=cwd,
1143	                )
1144	                return_code = process.returncode

--------------------------------------------------
>> Issue: [B603:subprocess_without_shell_equals_true] subprocess call - check for execution of untrus

(Truncated to 3636 characters out of 36786)
⚠️ BASH / bash-exec - 2 errors
Results of bash-exec linter (version 5.2.37)
See documentation on https://megalinter.io/beta/descriptors/bash_bash_exec/
-----------------------------------------------

✅ [SUCCESS] .automation/build_schemas_doc.sh
❌ [ERROR] .automation/custom-flavor-entrypoint.sh
    Error: File:[.automation/custom-flavor-entrypoint.sh] is not executable

✅ [SUCCESS] .automation/format-tables.sh
✅ [SUCCESS] .vscode/testlinter.sh
✅ [SUCCESS] build.sh
✅ [SUCCESS] entrypoint.sh
❌ [ERROR] sh/megalinter_exec
    Error: File:[sh/megalinter_exec] is not executable
⚠️ PYTHON / black - 1 error
reformatted megalinter/custom_flavor_factory.py
error: cannot format .automation/build.py: Cannot parse for target version Python 3.13: 2720:0: EOF in multi-line statement
reformatted megalinter/MegaLinter.py
reformatted test_custom_flavor.py

Oh no! 💥 💔 💥
3 files reformatted, 232 files left unchanged, 1 file failed to reformat.
⚠️ REPOSITORY / grype - 30 errors
[0000]  WARN no explicit name and version provided for directory source, deriving artifact ID from the given path (which is not ideal)
NAME                           INSTALLED  FIXED IN  TYPE    VULNERABILITY        SEVERITY  EPSS %  RISK   
ejs                            3.1.6      3.1.7     npm     GHSA-phwq-j96m-2c2q  Critical  99.81   87.9   
tar                            6.0.1      6.1.1     npm     GHSA-3jfq-g458-7qm9  High      99.38   68.2   
requests                       2.24.0     2.31.0    python  GHSA-j8r2-6x86-q33q  Medium    90.36   3.4    
ip                             1.1.5                npm     GHSA-2p57-rm9w-gvfp  High      85.54   2.2    
minimist                       1.2.5      1.2.6     npm     GHSA-xvch-5gv4-984h  Critical  77.42   1.1    
tar                            6.0.1      6.1.9     npm     GHSA-5955-9wpr-37jh  High      75.24   0.7    
ejs                            3.1.6      3.1.10    npm     GHSA-ghr5-ch3p-vcr6  Medium    78.55   0.6    
node-fetch                     2.6.6      2.6.7     npm     GHSA-r683-j2x4-v87g  High      66.25   0.4    
minimatch                      3.0.4      3.0.5     npm     GHSA-f8q6-p94x-37v3  High      61.89   0.3    
semver                         7.3.5      7.5.2     npm     GHSA-c2qf-rxjj-qqgw  High      61.02   0.3    
tar                            6.0.1      6.1.2     npm     GHSA-r628-mhmh-qjhw  High      43.49   0.2    
ansi-regex                     3.0.0      3.0.1     npm     GHSA-93q8-gq69-wqmw  High      42.38   0.1    
cross-spawn                    7.0.3      7.0.5     npm     GHSA-3xgq-45jj-v275  High      39.01   0.1    
ip                             1.1.5      1.1.9     npm     GHSA-78xj-cgh5-2h22  Low       59.63   0.1    
tar                            6.0.1      6.2.1     npm     GHSA-f5x3-32g6-xq36  Medium    43.05   0.1    
tar                            6.1.11     6.2.1     npm     GHSA-f5x3-32g6-xq36  Medium    43.05   0.1    
braces                         3.0.2      3.0.3     npm     GHSA-grv7-fg5c-xmjg  High      37.44   0.1    
@octokit/request-error         2.1.0      5.1.1     npm     GHSA-xx4v-prfh-6cgc  Medium    45.55   0.1    
http-cache-semantics           4.1.0      4.1.1     npm     GHSA-rc47-6667-2j5j  High      37.13   0.1    
@octokit/request               5.6.2      8.4.1     npm     GHSA-rmvr-2pp2-xj38  Medium    43.09   0.1    
micromatch                     4.0.4      4.0.8     npm     GHSA-952p-6rrq-rcjv  Medium    41.20   < 0.1  
@octokit/plugin-paginate-rest  2.17.0     9.2.2     npm     GHSA-h5c3-5r3r-rr8q  Medium    28.53   < 0.1  
requests                       2.24.0     2.32.4    python  GHSA-9hjg-9r4m-mvj7  Medium    21.31   < 0.1  
debug                          4.2.0      4.3.1     npm     GHSA-gxpj-cx7g-858c  Low       28.00   < 0.1  
requests                       2.24.0     2.32.0    python  GHSA-9wx4-h78v-vm56  Medium    13.22   < 0.1  
brace-expansion                1.1.11     1.1.12    npm     GHSA-v6h2-p8h4-qcjw  Low       19.03   < 0.1  
brace-expansion                2.0.1      2.0.2     npm     GHSA-v6h2-p8h4-qcjw  Low       19.03   < 0.1  
tar                            6.0.1      6.1.9     npm     GHSA-qq89-hq3f-393p  High      3.93    < 0.1  
tar                            6.0.1      6.1.7     npm     GHSA-9r2w-394v-53qc  High      3.55    < 0.1  
word-wrap                      1.2.3      1.2.4     npm     GHSA-j8xg-fqg3-53r7  Medium    5.96    < 0.1
[0031] ERROR discovered vulnerabilities at or above the severity threshold
⚠️ SPELL / lychee - 5 errors
[WARN ] WARNING: `--exclude-mail` is deprecated and will soon be removed; E-Mail is no longer checked by default. Use `--include-mail` to enable E-Mail checking.
[403] https://htmlhint.com/integrations/task-runner/ | Network error: Forbidden
[403] https://htmlhint.com/integrations/task-runner/ | Error (cached)
[403] https://htmlhint.com/configuration/ | Network error: Forbidden
[403] https://htmlhint.com/ | Network error: Forbidden
[403] https://htmlhint.com/docs/user-guide/list-rules | Network error: Forbidden
📝 Summary
---------------------
🔍 Total.........2349
✅ Successful....1892
⏳ Timeouts.........0
🔀 Redirected.......0
👻 Excluded.......452
❓ Unknown..........0
🚫 Errors...........5

Errors in megalinter/descriptors/html.megalinter-descriptor.yml
[403] https://htmlhint.com/ | Network error: Forbidden
[403] https://htmlhint.com/integrations/task-runner/ | Error (cached)
[403] https://htmlhint.com/docs/user-guide/list-rules | Network error: Forbidden
[403] https://htmlhint.com/configuration/ | Network error: Forbidden

Errors in README.md
[403] https://htmlhint.com/integrations/task-runner/ | Network error: Forbidden
⚠️ MARKDOWN / markdownlint - 307 errors
.github/copilot-instructions.md:9 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/copilot-instructions.md:156 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/linters/valestyles/proselint/README.md:12:601 MD013/line-length Line length [Expected: 600; Actual: 755]
CHANGELOG.md:1983:87 MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]
docs/badge.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Badge"]
docs/config-activation.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Activation and deactivation"]
docs/config-apply-fixes.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Apply fixes"]
docs/config-cli-lint-mode.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "CLI lint mode"]
docs/config-file.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: ".mega-linter.yml file"]
docs/config-filtering.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Filter linted files"]
docs/config-linters.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Linter specific variables"]
docs/config-postcommands.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Post-commands"]
docs/config-precommands.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Pre-commands"]
docs/config-variables-security.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Environment variables security"]
docs/config-variables.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Common variables"]
docs/configuration.md:9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Configuration"]
docs/descriptors/action_actionlint.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "actionlint"]
docs/descriptors/action.md:8 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "ACTION"]
docs/descriptors/ansible_ansible_lint.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "ansible-lint"]
docs/descriptors/ansible_ansible_lint.md:8:601 MD013/line-length Line length [Expected: 600; Actual: 795]
docs/descriptors/ansible.md:8 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "ANSIBLE"]
docs/descriptors/api_spectral.md:14:601 MD013/line-length Line length [Expected: 600; Actual: 746]
docs/descriptors/api.md:8 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "API"]
docs/descriptors/arm_arm_ttk.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "arm-ttk"]
docs/descriptors/arm.md:8 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "ARM"]
docs/descriptors/bash_bash_exec.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "bash-exec"]
docs/descriptors/bash_shellcheck.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "shellcheck"]
docs/descriptors/bash_shellcheck.md:8:601 MD013/line-length Line length [Expected: 600; Actual: 785]
docs/descriptors/bash_s

(Truncated to 3636 characters out of 38125)

✅ Linters with no issues

checkov, git_diff, hadolint, isort (3 fixes), jscpd, jsonlint, markdown-table-formatter, npm-groovy-lint, prettier, secretlint, shellcheck, shfmt (1 fix), spectral, syft, trivy, trivy-sbom, trufflehog, v8r, v8r, xmllint, yamllint

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Implements the generation of custom MegaLinter flavor Dockerfiles based on a configuration file.

This allows users to define their own flavors with specific linters and dependencies. The changes include:

- Adds logic to parse a custom flavor configuration file (YAML) to specify linters, dependencies, and other configurations.
- Creates a Dockerfile based on the configuration, including installing the necessary linters and setting up the environment.
- Includes a build system that can be run from any repo.
- Adds validation to ensure that required configuration fields are present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant