From 4682a7fc1e98c33926f92f8fa9e8179355155736 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Wed, 25 Jan 2023 23:06:35 +0100 Subject: [PATCH 01/63] Add csharpier test files --- .../test/csharp_csharpier/fix/csharp_fix_01.cs | 12 ++++++++++++ .../test/csharp_csharpier/fix/csharp_fix_02.cs | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .automation/test/csharp_csharpier/fix/csharp_fix_01.cs create mode 100644 .automation/test/csharp_csharpier/fix/csharp_fix_02.cs diff --git a/.automation/test/csharp_csharpier/fix/csharp_fix_01.cs b/.automation/test/csharp_csharpier/fix/csharp_fix_01.cs new file mode 100644 index 00000000000..43959ee23cb --- /dev/null +++ b/.automation/test/csharp_csharpier/fix/csharp_fix_01.cs @@ -0,0 +1,12 @@ +using System; + +namespace HelloWorld +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} diff --git a/.automation/test/csharp_csharpier/fix/csharp_fix_02.cs b/.automation/test/csharp_csharpier/fix/csharp_fix_02.cs new file mode 100644 index 00000000000..f73ee59ae5e --- /dev/null +++ b/.automation/test/csharp_csharpier/fix/csharp_fix_02.cs @@ -0,0 +1,12 @@ +using System; + +namespace HelloWorld +{ + class Program +{ + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} From c559970ac8a81cef6dbb0ab74a6dc430bc18d3c3 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Wed, 25 Jan 2023 23:08:50 +0100 Subject: [PATCH 02/63] Allow csharpier to fix files --- megalinter/descriptors/csharp.megalinter-descriptor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/megalinter/descriptors/csharp.megalinter-descriptor.yml b/megalinter/descriptors/csharp.megalinter-descriptor.yml index 308e02f48c6..0d02b320ef5 100644 --- a/megalinter/descriptors/csharp.megalinter-descriptor.yml +++ b/megalinter/descriptors/csharp.megalinter-descriptor.yml @@ -57,6 +57,7 @@ linters: cli_lint_mode: list_of_files cli_lint_extra_args: - "--check" + cli_lint_fix_arg_name: "--megalinter-fix-flag" # Workaround for DotnetFormatLinter class behavior cli_lint_fix_remove_args: - "--check" test_folder: csharp_csharpier From 06004d3bf60383f51cf3391b827172e22f029768 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Wed, 25 Jan 2023 23:09:12 +0100 Subject: [PATCH 03/63] Add format_fix test code --- megalinter/linter_factory.py | 4 +- .../tests/test_megalinter/LinterTestRoot.py | 14 ++- .../test_megalinter/helpers/utilstest.py | 85 +++++++++++++++++++ 3 files changed, 100 insertions(+), 3 deletions(-) diff --git a/megalinter/linter_factory.py b/megalinter/linter_factory.py index d8cb1c0efdf..88ea8e69b76 100644 --- a/megalinter/linter_factory.py +++ b/megalinter/linter_factory.py @@ -121,7 +121,7 @@ def build_descriptor_linters(file, linter_init_params=None, linter_names=None): # Build a single linter instance from language and linter name -def build_linter(language, linter_name): +def build_linter(language, linter_name, linter_init_params=None): language_descriptor_file = ( get_descriptor_dir() + os.path.sep @@ -131,7 +131,7 @@ def build_linter(language, linter_name): assert os.path.isfile( language_descriptor_file ), f"Unable to find {language_descriptor_file}" - linters = build_descriptor_linters(language_descriptor_file, None, [linter_name]) + linters = build_descriptor_linters(language_descriptor_file, linter_init_params, [linter_name]) assert ( len(linters) == 1 ), f"Unable to find linter {linter_name} in {language_descriptor_file}" diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 468c8559c5c..27ef1f1336c 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -13,7 +13,15 @@ class LinterTestRoot: linter_name: Optional[str] = None def get_linter_instance(self): - return linter_factory.build_linter(self.descriptor_id, self.linter_name) + return linter_factory.build_linter(self.descriptor_id, self.linter_name, { + "default_linter_activation": True, + "enable_descriptors": [], + "enable_linters": [], + "disable_descriptors": [], + "disable_linters": [], + "disable_errors_linters": [], + "post_linter_status": True, + }) def test_success(self): utilstest.linter_test_setup() @@ -56,3 +64,7 @@ def test_report_sarif(self): linter.pre_test() utilstest.test_linter_report_sarif(self.get_linter_instance(), self) linter.post_test() + + def test_format_fix(self): + utilstest.linter_test_setup() + utilstest.test_linter_format_fix(self.get_linter_instance(), self) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 37703b57f78..03746aabc32 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -1,5 +1,6 @@ import contextlib import difflib +import git import io import json import logging @@ -604,3 +605,87 @@ def assert_file_has_been_updated(file_name, bool_val, test_self): test_self.assertTrue(updated, f"{file_name} has been updated") else: test_self.assertFalse(updated, f"{file_name} has not been updated") + +def test_linter_format_fix(linter, test_self): + if ( + linter.disabled is True + or "all" in getattr(linter, "descriptor_flavors_exclude", []) + ): + raise unittest.SkipTest("Linter has been disabled") + test_folder = linter.test_folder + workspace = config.get("DEFAULT_WORKSPACE") + os.path.sep + test_folder + # Special cases when files must be copied in a temp directory before being linted + if os.path.isdir(workspace + os.path.sep + "fix"): + workspace = workspace + os.path.sep + "fix" + workspace = manage_copy_sources(workspace) + tmp_report_folder = tempfile.gettempdir() + os.path.sep + str(uuid.uuid4()) + assert os.path.isdir(workspace), f"Test folder {workspace} is not existing" + + file_map = {} + + for file in os.listdir(workspace): + full_file = os.path.join(workspace, file) + if os.path.isfile(full_file) is False or "fix" not in full_file: + continue + with open(full_file, "r", encoding="utf-8") as f_expected: + content_expected = f_expected.read() + file_map[full_file] = content_expected + + linter_name = linter.linter_name + env_vars = { + "APPLY_FIXES": linter.name, + "DEFAULT_WORKSPACE": workspace, + "FILTER_REGEX_INCLUDE": r"(fix)", + "TEXT_REPORTER": "true", + "UPDATED_SOURCES_REPORTER": "false", + "REPORT_OUTPUT_FOLDER": tmp_report_folder, + "LOG_LEVEL": "DEBUG", + "ENABLE_LINTERS": linter.name, + "PRINT_ALL_FILES": True, + } + if linter.lint_all_other_linters_files is not False: + env_vars["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" + env_vars.update(linter.test_variables) + mega_linter, output = call_mega_linter(env_vars) + test_self.assertTrue( + len(mega_linter.linters) > 0, "Linters have been created and run" + ) + # Check console output + if linter.cli_lint_mode == "file": + if len(linter.file_names_regex) > 0 and len(linter.file_extensions) == 0: + test_self.assertRegex( + output, rf"\[{linter_name}\] .*{linter.file_names_regex[0]}.* - SUCCESS" + ) + else: + test_self.assertRegex(output, rf"\[{linter_name}\] .*fix.* - SUCCESS") + else: + test_self.assertRegex( + output, + rf"Linted \[{linter.descriptor_id}\] files with \[{linter_name}\] successfully", + ) + # Check text reporter output log + report_file_name = f"SUCCESS-{linter.name}.log" + text_report_file = ( + f"{tmp_report_folder}{os.path.sep}linters_logs" + f"{os.path.sep}{report_file_name}" + ) + test_self.assertTrue( + os.path.isfile(text_report_file), + f"Unable to find text report {text_report_file}", + ) + copy_logs_for_doc(text_report_file, test_folder, report_file_name) + + repo = git.Repo(linter.github_workspace) + + # Check files content + for full_file in file_map: + with open(full_file, "r", encoding="utf-8") as f_produced: + content_expected = file_map[full_file] + content_produced = f_produced.read() + diffs = [ + li + for li in difflib.ndiff(content_expected, content_produced) + if li[0] != " " + ] + assert (len(list(diffs))) > 0, f"No changes in the {full_file} file" + repo.index.checkout([full_file], force=True) From fde16111c4cfdce0c8a05d1d7e5eb20212e010e4 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Wed, 25 Jan 2023 23:39:03 +0100 Subject: [PATCH 04/63] Revert files --- .../tests/test_megalinter/LinterTestRoot.py | 3 +++ .../test_megalinter/helpers/utilstest.py | 20 +++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 27ef1f1336c..55fb74e7728 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -2,6 +2,8 @@ """ Unit tests for Linter class (and sub-classes) """ +import os + from typing import Optional from megalinter import linter_factory @@ -20,6 +22,7 @@ def get_linter_instance(self): "disable_descriptors": [], "disable_linters": [], "disable_errors_linters": [], + "github_workspace": os.getcwd(), "post_linter_status": True, }) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 03746aabc32..ee042f1c684 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -623,13 +623,13 @@ def test_linter_format_fix(linter, test_self): file_map = {} - for file in os.listdir(workspace): - full_file = os.path.join(workspace, file) - if os.path.isfile(full_file) is False or "fix" not in full_file: + for file_name in os.listdir(workspace): + file = os.path.join(workspace, file_name) + if os.path.isfile(file) is False or "fix" not in file: continue - with open(full_file, "r", encoding="utf-8") as f_expected: + with open(file, "r", encoding="utf-8") as f_expected: content_expected = f_expected.read() - file_map[full_file] = content_expected + file_map[file] = content_expected linter_name = linter.linter_name env_vars = { @@ -678,14 +678,14 @@ def test_linter_format_fix(linter, test_self): repo = git.Repo(linter.github_workspace) # Check files content - for full_file in file_map: - with open(full_file, "r", encoding="utf-8") as f_produced: - content_expected = file_map[full_file] + for file in file_map: + with open(file, "r", encoding="utf-8") as f_produced: + content_expected = file_map[file] content_produced = f_produced.read() diffs = [ li for li in difflib.ndiff(content_expected, content_produced) if li[0] != " " ] - assert (len(list(diffs))) > 0, f"No changes in the {full_file} file" - repo.index.checkout([full_file], force=True) + assert (len(list(diffs))) > 0, f"No changes in the {file} file" + repo.index.checkout([os.path.join(linter.github_workspace, file)], force=True) From bb8d9fca85bd156495ca775bc6af2884b4bad5db Mon Sep 17 00:00:00 2001 From: bdovaz Date: Wed, 25 Jan 2023 23:58:28 +0100 Subject: [PATCH 05/63] Skip test for linters that does not format and cannot apply fixes --- megalinter/tests/test_megalinter/helpers/utilstest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index ee042f1c684..b2ee504dde9 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -610,8 +610,9 @@ def test_linter_format_fix(linter, test_self): if ( linter.disabled is True or "all" in getattr(linter, "descriptor_flavors_exclude", []) + or (linter.is_formatter is False and linter.cli_lint_fix_arg_name is None) ): - raise unittest.SkipTest("Linter has been disabled") + raise unittest.SkipTest("Linter does not format and cannot apply fixes") test_folder = linter.test_folder workspace = config.get("DEFAULT_WORKSPACE") + os.path.sep + test_folder # Special cases when files must be copied in a temp directory before being linted From 67a24372dd7c79112c54675f11ecfe44bc97c8f5 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Thu, 26 Jan 2023 17:58:22 +0100 Subject: [PATCH 06/63] Add input test files --- .automation/test/groovy/groovy_fix_01.groovy | 9 +++++++++ .automation/test/groovy/groovy_fix_02.groovy | 9 +++++++++ .automation/test/javascript/javascript_fix_1.js | 3 +++ .automation/test/javascript/javascript_fix_2.js | 4 ++++ .../test/shell_shfmt/shell-shfmt_fix_1.sh | 17 +++++++++++++++++ .../test/shell_shfmt/shell-shfmt_fix_2.sh | 17 +++++++++++++++++ 6 files changed, 59 insertions(+) create mode 100644 .automation/test/groovy/groovy_fix_01.groovy create mode 100644 .automation/test/groovy/groovy_fix_02.groovy create mode 100644 .automation/test/javascript/javascript_fix_1.js create mode 100644 .automation/test/javascript/javascript_fix_2.js create mode 100644 .automation/test/shell_shfmt/shell-shfmt_fix_1.sh create mode 100644 .automation/test/shell_shfmt/shell-shfmt_fix_2.sh diff --git a/.automation/test/groovy/groovy_fix_01.groovy b/.automation/test/groovy/groovy_fix_01.groovy new file mode 100644 index 00000000000..e56c533f684 --- /dev/null +++ b/.automation/test/groovy/groovy_fix_01.groovy @@ -0,0 +1,9 @@ +/* groovylint-disable ClassNameSameAsFilename, CompileStatic, JavaIoPackageAccess */ +class Example { + + static void main(String[] args) { + File file = new File('E:/Example.txt') + println "The file ${file.absolutePath} has ${file.length()} bytes" + } + +} diff --git a/.automation/test/groovy/groovy_fix_02.groovy b/.automation/test/groovy/groovy_fix_02.groovy new file mode 100644 index 00000000000..e56c533f684 --- /dev/null +++ b/.automation/test/groovy/groovy_fix_02.groovy @@ -0,0 +1,9 @@ +/* groovylint-disable ClassNameSameAsFilename, CompileStatic, JavaIoPackageAccess */ +class Example { + + static void main(String[] args) { + File file = new File('E:/Example.txt') + println "The file ${file.absolutePath} has ${file.length()} bytes" + } + +} diff --git a/.automation/test/javascript/javascript_fix_1.js b/.automation/test/javascript/javascript_fix_1.js new file mode 100644 index 00000000000..1d2e726848a --- /dev/null +++ b/.automation/test/javascript/javascript_fix_1.js @@ -0,0 +1,3 @@ +/* eslint capitalized-comments: ["error", "always"] */ + +// lowercase comment diff --git a/.automation/test/javascript/javascript_fix_2.js b/.automation/test/javascript/javascript_fix_2.js new file mode 100644 index 00000000000..8f078ca66c8 --- /dev/null +++ b/.automation/test/javascript/javascript_fix_2.js @@ -0,0 +1,4 @@ +/* eslint multiline-comment-style: ["error", "starred-block"] */ + +// this line +// calls foo() diff --git a/.automation/test/shell_shfmt/shell-shfmt_fix_1.sh b/.automation/test/shell_shfmt/shell-shfmt_fix_1.sh new file mode 100644 index 00000000000..ee5435e5081 --- /dev/null +++ b/.automation/test/shell_shfmt/shell-shfmt_fix_1.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# CMD +HELLO_WORLD=$(echo "Hello World" | cut -f1 -d' ' 2>&1) + +# Load the error code +ERROR_CODE=$? + +# Check the shell +if [ ${ERROR_CODE} -ne 0 ]; then + echo "We did it!" + exit 0 +else + echo "We done goofed it..." + echo "${HELLO_WORLD}" + exit 1 +fi diff --git a/.automation/test/shell_shfmt/shell-shfmt_fix_2.sh b/.automation/test/shell_shfmt/shell-shfmt_fix_2.sh new file mode 100644 index 00000000000..ee5435e5081 --- /dev/null +++ b/.automation/test/shell_shfmt/shell-shfmt_fix_2.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# CMD +HELLO_WORLD=$(echo "Hello World" | cut -f1 -d' ' 2>&1) + +# Load the error code +ERROR_CODE=$? + +# Check the shell +if [ ${ERROR_CODE} -ne 0 ]; then + echo "We did it!" + exit 0 +else + echo "We done goofed it..." + echo "${HELLO_WORLD}" + exit 1 +fi From ee728f3fbcbbe98d54df94ab03a96468afb110d4 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Thu, 26 Jan 2023 21:48:31 +0100 Subject: [PATCH 07/63] Add input test files --- .automation/test/javascript_prettier/javascript_fix_1.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 .automation/test/javascript_prettier/javascript_fix_1.js diff --git a/.automation/test/javascript_prettier/javascript_fix_1.js b/.automation/test/javascript_prettier/javascript_fix_1.js new file mode 100644 index 00000000000..adc240bd164 --- /dev/null +++ b/.automation/test/javascript_prettier/javascript_fix_1.js @@ -0,0 +1 @@ +if(!greeting){return null}; From 64d318c8867b74bcaa9ddca66d5e400705fdfcbf Mon Sep 17 00:00:00 2001 From: bdovaz Date: Thu, 26 Jan 2023 22:05:36 +0100 Subject: [PATCH 08/63] Add config value --- megalinter/tests/test_megalinter/LinterTestRoot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 55fb74e7728..97d569ef719 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -6,7 +6,7 @@ from typing import Optional -from megalinter import linter_factory +from megalinter import config, linter_factory from megalinter.tests.test_megalinter.helpers import utilstest @@ -70,4 +70,8 @@ def test_report_sarif(self): def test_format_fix(self): utilstest.linter_test_setup() + + if self.linter_name == 'prettier': + config.set_value("JAVASCRIPT_DEFAULT_STYLE", "prettier") + utilstest.test_linter_format_fix(self.get_linter_instance(), self) From c31d5ca798c6e454548c4969d90568451e065be0 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Thu, 26 Jan 2023 22:05:51 +0100 Subject: [PATCH 09/63] Add input files --- .../test/javascript_standard/.eslintrc.json | 13 + .../javascript_standard/javascript_bad_1.js | 225 ++++++++++++++++++ .../javascript_standard/javascript_bad_2.js | 225 ++++++++++++++++++ .../javascript_standard/javascript_fix_1.js | 3 + .../javascript_standard/javascript_fix_2.js | 4 + .../javascript_standard/javascript_good_1.js | 215 +++++++++++++++++ .../javascript_standard/javascript_good_2.js | 215 +++++++++++++++++ .../test/javascript_standard/package.json | 11 + .../reports/ERROR-JAVASCRIPT_ES.txt | 11 + .../reports/ERROR-JAVASCRIPT_STANDARD.txt | 8 + .../reports/SUCCESS-JAVASCRIPT_ES.txt | 7 + .../reports/SUCCESS-JAVASCRIPT_STANDARD.txt | 7 + .../expected-JAVASCRIPT_ES.tap.disabled | 7 + .../reports/expected-JAVASCRIPT_STANDARD.tap | 7 + .../test_copy_in_tmp_folder | 0 .../javascript.megalinter-descriptor.yml | 1 + 16 files changed, 959 insertions(+) create mode 100644 .automation/test/javascript_standard/.eslintrc.json create mode 100644 .automation/test/javascript_standard/javascript_bad_1.js create mode 100644 .automation/test/javascript_standard/javascript_bad_2.js create mode 100644 .automation/test/javascript_standard/javascript_fix_1.js create mode 100644 .automation/test/javascript_standard/javascript_fix_2.js create mode 100644 .automation/test/javascript_standard/javascript_good_1.js create mode 100644 .automation/test/javascript_standard/javascript_good_2.js create mode 100644 .automation/test/javascript_standard/package.json create mode 100644 .automation/test/javascript_standard/reports/ERROR-JAVASCRIPT_ES.txt create mode 100644 .automation/test/javascript_standard/reports/ERROR-JAVASCRIPT_STANDARD.txt create mode 100644 .automation/test/javascript_standard/reports/SUCCESS-JAVASCRIPT_ES.txt create mode 100644 .automation/test/javascript_standard/reports/SUCCESS-JAVASCRIPT_STANDARD.txt create mode 100644 .automation/test/javascript_standard/reports/expected-JAVASCRIPT_ES.tap.disabled create mode 100644 .automation/test/javascript_standard/reports/expected-JAVASCRIPT_STANDARD.tap create mode 100644 .automation/test/javascript_standard/test_copy_in_tmp_folder diff --git a/.automation/test/javascript_standard/.eslintrc.json b/.automation/test/javascript_standard/.eslintrc.json new file mode 100644 index 00000000000..b69dd82bc9f --- /dev/null +++ b/.automation/test/javascript_standard/.eslintrc.json @@ -0,0 +1,13 @@ +{ + "env": { + "node": true, + "commonjs": true, + "es2021": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 12 + }, + "rules": { + } +} diff --git a/.automation/test/javascript_standard/javascript_bad_1.js b/.automation/test/javascript_standard/javascript_bad_1.js new file mode 100644 index 00000000000..98e5ee29e32 --- /dev/null +++ b/.automation/test/javascript_standard/javascript_bad_1.js @@ -0,0 +1,225 @@ +var http = require('http') +var createHandler = require( 'github-webhook-handler') + +var handler = createHandler( { path : /webhook, secret : (process.env.SECRET) }) + +var userArray = [ 'user1' ] +here is some garbage = that + +var teamDescription = Team of Robots +var teamPrivacy = 'closed' // closed (visible) / secret (hidden) are options here + +var teamName = process.env.GHES_TEAM_NAME +var teamAccess = 'pull' // pull,push,admin options here +var teamId = '' + +var orgRepos = [] + +// var creator = "" + +var foo = someFunction(); +var bar = a + 1; + +http.createServer(function (req, res) { + handler(req, res, function (err) { + console.log(err) + res.statusCode = 404 + res.end('no such location') + }) +}).listen(3000) + +handler.on('error', function (err) { + console.await.error('Error:', err.message) +}) + +handler.on('repository', function (event) { + if (event.payload.action === 'created') { + const repo = event.payload.repository.full_name + console.log(repo) + const org = event.payload.repository.owner.login + getTeamID(org) + setTimeout(checkTeamIDVariable, 1000) + } +}) + +handler.on('team', function (event) { +// TODO user events such as being removed from team or org + if (event.payload.action === 'deleted') { + // const name = event.payload.team.name + const org = event.payload.organization.login + getRepositories(org) + setTimeout(checkReposVariable, 5000) + } else if (event.payload.action === 'removed_from_repository') { + const org = event.payload.organization.login + getTeamID(org) + // const repo = event.payload.repository.full_name + setTimeout(checkTeamIDVariable, 1000) + } +}) + +function getTeamID (org) { + const https = require('https') + + const options = { + hostname: (process.env.GHE_HOST), + port: 443 + path: '/api/v3/orgs/' + org + '/teams', + method: 'GET', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json' + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + }).on('end', () => { + body = JSON.parse(Buffer.concat(body)) + body.forEach(item => { + if (item.name === teamName) { + teamId = item.id + } + }) + }) + }) + + req.on('error, (error) => { + console.error(error) + }) + + req.end() +} + +function checkTeamIDVariable (repo) { + if (typeof teamId != 'undefined') { + addTeamToRepo(repo, teamId) + } +} + +function checkReposVariable (org) { + if (typeof orgRepos !== 'undefined') { + // for(var repo of orgRepos) { + // addTeamToRepo(repo, teamId) + // } + reCreateTeam(org) + } +} + +function addTeamToRepo (repo, teamId) { + const https = require('https') + const data = JSON.stringify({ + permission: teamAccess + }) + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/teams/' + teamId + '/repos/' + repo, + method: 'PUT', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + } + let body = [] + + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + + body.push(chunk) + + }).on('end', () => { + + body = Buffer.concat(body).toString() + console.log(res.statusCode) + console.log('added team to ' + repo) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.write(data) + req.end() +} + +function reCreateTeam (org) { + const https = require('https') + const data = JSON.stringify({ + name: teamName, + description: teamDescription, + privacy: teamPrivacy + maintainers: userArray, + repo_names: orgRepos + }) + + const options = { + hostname: (process.env.GHE_HOST), + port: 443 + path: '/api/v3/orgs/' + org + '/teams', + method: 'POST', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + } + // const body = [] + const req = https.request(options, (res) => { + if (res.statusCode !== 201) { + console.log('Status code: ' + res.statusCode) + console.log('Added ' + teamName + ' to ' + org + ' Failed') + res.on('data', function (chunk) { + console.log('BODY: ' + chunk) + }) + } else { + console.log('Added ' + teamName ' to ' + org) + } + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.write(data) + req.end() +} + +function getRepositories (org) { + orgRepos = [] + + const https = require('https') + + const options = { + hostname: (process.env.GHE_HOST), + port: '443', + path: '/api/v3/orgs/' + org + "/repos", + method: 'GET', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json' + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + + }).on('end', () => { + body = JSON.parse(Buffer.concat(body)) + body.forEach(item => { + orgRepos.push(item.full_name) + + console.log(item.full_name) + }) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + req.end() +} diff --git a/.automation/test/javascript_standard/javascript_bad_2.js b/.automation/test/javascript_standard/javascript_bad_2.js new file mode 100644 index 00000000000..98e5ee29e32 --- /dev/null +++ b/.automation/test/javascript_standard/javascript_bad_2.js @@ -0,0 +1,225 @@ +var http = require('http') +var createHandler = require( 'github-webhook-handler') + +var handler = createHandler( { path : /webhook, secret : (process.env.SECRET) }) + +var userArray = [ 'user1' ] +here is some garbage = that + +var teamDescription = Team of Robots +var teamPrivacy = 'closed' // closed (visible) / secret (hidden) are options here + +var teamName = process.env.GHES_TEAM_NAME +var teamAccess = 'pull' // pull,push,admin options here +var teamId = '' + +var orgRepos = [] + +// var creator = "" + +var foo = someFunction(); +var bar = a + 1; + +http.createServer(function (req, res) { + handler(req, res, function (err) { + console.log(err) + res.statusCode = 404 + res.end('no such location') + }) +}).listen(3000) + +handler.on('error', function (err) { + console.await.error('Error:', err.message) +}) + +handler.on('repository', function (event) { + if (event.payload.action === 'created') { + const repo = event.payload.repository.full_name + console.log(repo) + const org = event.payload.repository.owner.login + getTeamID(org) + setTimeout(checkTeamIDVariable, 1000) + } +}) + +handler.on('team', function (event) { +// TODO user events such as being removed from team or org + if (event.payload.action === 'deleted') { + // const name = event.payload.team.name + const org = event.payload.organization.login + getRepositories(org) + setTimeout(checkReposVariable, 5000) + } else if (event.payload.action === 'removed_from_repository') { + const org = event.payload.organization.login + getTeamID(org) + // const repo = event.payload.repository.full_name + setTimeout(checkTeamIDVariable, 1000) + } +}) + +function getTeamID (org) { + const https = require('https') + + const options = { + hostname: (process.env.GHE_HOST), + port: 443 + path: '/api/v3/orgs/' + org + '/teams', + method: 'GET', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json' + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + }).on('end', () => { + body = JSON.parse(Buffer.concat(body)) + body.forEach(item => { + if (item.name === teamName) { + teamId = item.id + } + }) + }) + }) + + req.on('error, (error) => { + console.error(error) + }) + + req.end() +} + +function checkTeamIDVariable (repo) { + if (typeof teamId != 'undefined') { + addTeamToRepo(repo, teamId) + } +} + +function checkReposVariable (org) { + if (typeof orgRepos !== 'undefined') { + // for(var repo of orgRepos) { + // addTeamToRepo(repo, teamId) + // } + reCreateTeam(org) + } +} + +function addTeamToRepo (repo, teamId) { + const https = require('https') + const data = JSON.stringify({ + permission: teamAccess + }) + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/teams/' + teamId + '/repos/' + repo, + method: 'PUT', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + } + let body = [] + + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + + body.push(chunk) + + }).on('end', () => { + + body = Buffer.concat(body).toString() + console.log(res.statusCode) + console.log('added team to ' + repo) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.write(data) + req.end() +} + +function reCreateTeam (org) { + const https = require('https') + const data = JSON.stringify({ + name: teamName, + description: teamDescription, + privacy: teamPrivacy + maintainers: userArray, + repo_names: orgRepos + }) + + const options = { + hostname: (process.env.GHE_HOST), + port: 443 + path: '/api/v3/orgs/' + org + '/teams', + method: 'POST', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + } + // const body = [] + const req = https.request(options, (res) => { + if (res.statusCode !== 201) { + console.log('Status code: ' + res.statusCode) + console.log('Added ' + teamName + ' to ' + org + ' Failed') + res.on('data', function (chunk) { + console.log('BODY: ' + chunk) + }) + } else { + console.log('Added ' + teamName ' to ' + org) + } + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.write(data) + req.end() +} + +function getRepositories (org) { + orgRepos = [] + + const https = require('https') + + const options = { + hostname: (process.env.GHE_HOST), + port: '443', + path: '/api/v3/orgs/' + org + "/repos", + method: 'GET', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json' + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + + }).on('end', () => { + body = JSON.parse(Buffer.concat(body)) + body.forEach(item => { + orgRepos.push(item.full_name) + + console.log(item.full_name) + }) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + req.end() +} diff --git a/.automation/test/javascript_standard/javascript_fix_1.js b/.automation/test/javascript_standard/javascript_fix_1.js new file mode 100644 index 00000000000..1d2e726848a --- /dev/null +++ b/.automation/test/javascript_standard/javascript_fix_1.js @@ -0,0 +1,3 @@ +/* eslint capitalized-comments: ["error", "always"] */ + +// lowercase comment diff --git a/.automation/test/javascript_standard/javascript_fix_2.js b/.automation/test/javascript_standard/javascript_fix_2.js new file mode 100644 index 00000000000..8f078ca66c8 --- /dev/null +++ b/.automation/test/javascript_standard/javascript_fix_2.js @@ -0,0 +1,4 @@ +/* eslint multiline-comment-style: ["error", "starred-block"] */ + +// this line +// calls foo() diff --git a/.automation/test/javascript_standard/javascript_good_1.js b/.automation/test/javascript_standard/javascript_good_1.js new file mode 100644 index 00000000000..ad32089f3b5 --- /dev/null +++ b/.automation/test/javascript_standard/javascript_good_1.js @@ -0,0 +1,215 @@ +var http = require('http') +var createHandler = require('github-webhook-handler') +var handler = createHandler({ path: '/webhook', secret: (process.env.SECRET) }) + +var userArray = ['user1'] + +var teamDescription = 'Team of Robots' +var teamPrivacy = 'closed' // closed (visible) / secret (hidden) are options here + +var teamName = process.env.GHES_TEAM_NAME +var teamAccess = 'pull' // pull,push,admin options here +var teamId = '' + +var orgRepos = [] + +// var creator = "" + +http.createServer(function (req, res) { + handler(req, res, function (err) { + console.log(err) + res.statusCode = 404 + res.end('no such location') + }) +}).listen(3000) + +handler.on('error', function (err) { + console.error('Error:', err.message) +}) + +handler.on('repository', function (event) { + if (event.payload.action === 'created') { + const repo = event.payload.repository.full_name + console.log(repo) + const org = event.payload.repository.owner.login + getTeamID(org) + setTimeout(checkTeamIDVariable, 1000) + } +}) + +handler.on('team', function (event) { +// TODO user events such as being removed from team or org + if (event.payload.action === 'deleted') { + // const name = event.payload.team.name + const org = event.payload.organization.login + getRepositories(org) + setTimeout(checkReposVariable, 5000) + } else if (event.payload.action === 'removed_from_repository') { + const org = event.payload.organization.login + getTeamID(org) + // const repo = event.payload.repository.full_name + setTimeout(checkTeamIDVariable, 1000) + } +}) + +function getTeamID (org) { + const https = require('https') + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/orgs/' + org + '/teams', + method: 'GET', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json' + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + }).on('end', () => { + body = JSON.parse(Buffer.concat(body)) + body.forEach(item => { + if (item.name === teamName) { + teamId = item.id + } + }) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.end() +} + +function checkTeamIDVariable (repo) { + if (typeof teamId !== 'undefined') { + addTeamToRepo(repo, teamId) + } +} + +function checkReposVariable (org) { + if (typeof orgRepos !== 'undefined') { + // for(var repo of orgRepos) { + // addTeamToRepo(repo, teamId) + // } + reCreateTeam(org) + } +} + +function addTeamToRepo (repo, teamId) { + const https = require('https') + const data = JSON.stringify({ + permission: teamAccess + }) + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/teams/' + teamId + '/repos/' + repo, + method: 'PUT', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + }).on('end', () => { + body = Buffer.concat(body).toString() + console.log(res.statusCode) + console.log('added team to ' + repo) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.write(data) + req.end() +} + +function reCreateTeam (org) { + const https = require('https') + const data = JSON.stringify({ + name: teamName, + description: teamDescription, + privacy: teamPrivacy, + maintainers: userArray, + repo_names: orgRepos + }) + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/orgs/' + org + '/teams', + method: 'POST', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + } + // const body = [] + const req = https.request(options, (res) => { + if (res.statusCode !== 201) { + console.log('Status code: ' + res.statusCode) + console.log('Added ' + teamName + ' to ' + org + ' Failed') + res.on('data', function (chunk) { + console.log('BODY: ' + chunk) + }) + } else { + console.log('Added ' + teamName + ' to ' + org) + } + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.write(data) + req.end() +} + +function getRepositories (org) { + orgRepos = [] + + const https = require('https') + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/orgs/' + org + '/repos', + method: 'GET', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json' + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + }).on('end', () => { + body = JSON.parse(Buffer.concat(body)) + body.forEach(item => { + orgRepos.push(item.full_name) + console.log(item.full_name) + }) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.end() +} diff --git a/.automation/test/javascript_standard/javascript_good_2.js b/.automation/test/javascript_standard/javascript_good_2.js new file mode 100644 index 00000000000..ad32089f3b5 --- /dev/null +++ b/.automation/test/javascript_standard/javascript_good_2.js @@ -0,0 +1,215 @@ +var http = require('http') +var createHandler = require('github-webhook-handler') +var handler = createHandler({ path: '/webhook', secret: (process.env.SECRET) }) + +var userArray = ['user1'] + +var teamDescription = 'Team of Robots' +var teamPrivacy = 'closed' // closed (visible) / secret (hidden) are options here + +var teamName = process.env.GHES_TEAM_NAME +var teamAccess = 'pull' // pull,push,admin options here +var teamId = '' + +var orgRepos = [] + +// var creator = "" + +http.createServer(function (req, res) { + handler(req, res, function (err) { + console.log(err) + res.statusCode = 404 + res.end('no such location') + }) +}).listen(3000) + +handler.on('error', function (err) { + console.error('Error:', err.message) +}) + +handler.on('repository', function (event) { + if (event.payload.action === 'created') { + const repo = event.payload.repository.full_name + console.log(repo) + const org = event.payload.repository.owner.login + getTeamID(org) + setTimeout(checkTeamIDVariable, 1000) + } +}) + +handler.on('team', function (event) { +// TODO user events such as being removed from team or org + if (event.payload.action === 'deleted') { + // const name = event.payload.team.name + const org = event.payload.organization.login + getRepositories(org) + setTimeout(checkReposVariable, 5000) + } else if (event.payload.action === 'removed_from_repository') { + const org = event.payload.organization.login + getTeamID(org) + // const repo = event.payload.repository.full_name + setTimeout(checkTeamIDVariable, 1000) + } +}) + +function getTeamID (org) { + const https = require('https') + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/orgs/' + org + '/teams', + method: 'GET', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json' + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + }).on('end', () => { + body = JSON.parse(Buffer.concat(body)) + body.forEach(item => { + if (item.name === teamName) { + teamId = item.id + } + }) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.end() +} + +function checkTeamIDVariable (repo) { + if (typeof teamId !== 'undefined') { + addTeamToRepo(repo, teamId) + } +} + +function checkReposVariable (org) { + if (typeof orgRepos !== 'undefined') { + // for(var repo of orgRepos) { + // addTeamToRepo(repo, teamId) + // } + reCreateTeam(org) + } +} + +function addTeamToRepo (repo, teamId) { + const https = require('https') + const data = JSON.stringify({ + permission: teamAccess + }) + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/teams/' + teamId + '/repos/' + repo, + method: 'PUT', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + }).on('end', () => { + body = Buffer.concat(body).toString() + console.log(res.statusCode) + console.log('added team to ' + repo) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.write(data) + req.end() +} + +function reCreateTeam (org) { + const https = require('https') + const data = JSON.stringify({ + name: teamName, + description: teamDescription, + privacy: teamPrivacy, + maintainers: userArray, + repo_names: orgRepos + }) + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/orgs/' + org + '/teams', + method: 'POST', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + } + // const body = [] + const req = https.request(options, (res) => { + if (res.statusCode !== 201) { + console.log('Status code: ' + res.statusCode) + console.log('Added ' + teamName + ' to ' + org + ' Failed') + res.on('data', function (chunk) { + console.log('BODY: ' + chunk) + }) + } else { + console.log('Added ' + teamName + ' to ' + org) + } + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.write(data) + req.end() +} + +function getRepositories (org) { + orgRepos = [] + + const https = require('https') + + const options = { + hostname: (process.env.GHE_HOST), + port: 443, + path: '/api/v3/orgs/' + org + '/repos', + method: 'GET', + headers: { + Authorization: 'token ' + (process.env.GHE_TOKEN), + 'Content-Type': 'application/json' + } + } + let body = [] + const req = https.request(options, (res) => { + res.on('data', (chunk) => { + body.push(chunk) + }).on('end', () => { + body = JSON.parse(Buffer.concat(body)) + body.forEach(item => { + orgRepos.push(item.full_name) + console.log(item.full_name) + }) + }) + }) + + req.on('error', (error) => { + console.error(error) + }) + + req.end() +} diff --git a/.automation/test/javascript_standard/package.json b/.automation/test/javascript_standard/package.json new file mode 100644 index 00000000000..0dc951855e0 --- /dev/null +++ b/.automation/test/javascript_standard/package.json @@ -0,0 +1,11 @@ +{ + "name": "test", + "version": "1.0.0", + "description": "This folder holds the test cases for **Javascript**.", + "main": "javascript_bad_1.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +} diff --git a/.automation/test/javascript_standard/reports/ERROR-JAVASCRIPT_ES.txt b/.automation/test/javascript_standard/reports/ERROR-JAVASCRIPT_ES.txt new file mode 100644 index 00000000000..b689bedd67d --- /dev/null +++ b/.automation/test/javascript_standard/reports/ERROR-JAVASCRIPT_ES.txt @@ -0,0 +1,11 @@ +Results of eslint linter (version 7.15.0) +See documentation on https://megalinter.github.io/descriptors/javascript_eslint/ +----------------------------------------------- + +[ERROR] .automation/test/javascript/javascript_bad_1.js + + .automation/test/javascript/javascript_bad_1.js + 4:40 error Parsing error: Unterminated regular expression + + āœ– 1 problem (1 error, 0 warnings) + diff --git a/.automation/test/javascript_standard/reports/ERROR-JAVASCRIPT_STANDARD.txt b/.automation/test/javascript_standard/reports/ERROR-JAVASCRIPT_STANDARD.txt new file mode 100644 index 00000000000..0b514a827fb --- /dev/null +++ b/.automation/test/javascript_standard/reports/ERROR-JAVASCRIPT_STANDARD.txt @@ -0,0 +1,8 @@ +Results of standard linter (version 15.0.1) +See documentation on https://megalinter.github.io/descriptors/javascript_standard/ +----------------------------------------------- + +[ERROR] .automation/test/javascript/javascript_bad_1.js + standard: Use JavaScript Standard Style (https://standardjs.com) + .automation/test/javascript/javascript_bad_1.js:4:40: Parsing error: Unterminated regular expression + diff --git a/.automation/test/javascript_standard/reports/SUCCESS-JAVASCRIPT_ES.txt b/.automation/test/javascript_standard/reports/SUCCESS-JAVASCRIPT_ES.txt new file mode 100644 index 00000000000..3839abffd54 --- /dev/null +++ b/.automation/test/javascript_standard/reports/SUCCESS-JAVASCRIPT_ES.txt @@ -0,0 +1,7 @@ +Results of eslint linter (version 7.15.0) +See documentation on https://megalinter.github.io/descriptors/javascript_eslint/ +----------------------------------------------- + +[SUCCESS] .automation/test/javascript/javascript_good_1.js + + diff --git a/.automation/test/javascript_standard/reports/SUCCESS-JAVASCRIPT_STANDARD.txt b/.automation/test/javascript_standard/reports/SUCCESS-JAVASCRIPT_STANDARD.txt new file mode 100644 index 00000000000..4fe5ec42730 --- /dev/null +++ b/.automation/test/javascript_standard/reports/SUCCESS-JAVASCRIPT_STANDARD.txt @@ -0,0 +1,7 @@ +Results of standard linter (version 15.0.1) +See documentation on https://megalinter.github.io/descriptors/javascript_standard/ +----------------------------------------------- + +[SUCCESS] .automation/test/javascript/javascript_good_1.js + + diff --git a/.automation/test/javascript_standard/reports/expected-JAVASCRIPT_ES.tap.disabled b/.automation/test/javascript_standard/reports/expected-JAVASCRIPT_ES.tap.disabled new file mode 100644 index 00000000000..9e605d09cd5 --- /dev/null +++ b/.automation/test/javascript_standard/reports/expected-JAVASCRIPT_ES.tap.disabled @@ -0,0 +1,7 @@ +TAP version 13 +1..2 +not ok 1 - javascript_bad_1.js + --- + message: \n/tmp/lint/.automation/test/javascript/javascript_bad_1.js\n 4 39 error Parsing error Unterminated regular expression literal\n\nāœ– 1 problem (1 error, 0 warnings)\n + ... +ok 2 - javascript_good_1.js diff --git a/.automation/test/javascript_standard/reports/expected-JAVASCRIPT_STANDARD.tap b/.automation/test/javascript_standard/reports/expected-JAVASCRIPT_STANDARD.tap new file mode 100644 index 00000000000..42d92b3487d --- /dev/null +++ b/.automation/test/javascript_standard/reports/expected-JAVASCRIPT_STANDARD.tap @@ -0,0 +1,7 @@ +TAP version 13 +1..2 +not ok 1 - javascript_bad_1.js + --- + message: standard Use JavaScript Standard Style (https //standardjs.com)\n /tmp/lint/.automation/test/javascript/javascript_bad_1.js 4 40 Parsing error Unterminated regular expression\n + ... +ok 2 - javascript_good_1.js diff --git a/.automation/test/javascript_standard/test_copy_in_tmp_folder b/.automation/test/javascript_standard/test_copy_in_tmp_folder new file mode 100644 index 00000000000..e69de29bb2d diff --git a/megalinter/descriptors/javascript.megalinter-descriptor.yml b/megalinter/descriptors/javascript.megalinter-descriptor.yml index ed953d53c4f..ce1fc89f4fb 100644 --- a/megalinter/descriptors/javascript.megalinter-descriptor.yml +++ b/megalinter/descriptors/javascript.megalinter-descriptor.yml @@ -110,6 +110,7 @@ linters: name: JAVASCRIPT_STANDARD cli_lint_mode: list_of_files cli_lint_fix_arg_name: "--fix" + test_folder: javascript_standard examples: - "standard myfile.js" - "standard --fix myfile.js" From eb94ba0fe5ef03c8079918d3512fe4f4777d3bda Mon Sep 17 00:00:00 2001 From: bdovaz Date: Thu, 26 Jan 2023 23:19:26 +0100 Subject: [PATCH 10/63] Add input files --- .automation/test/javascript_standard/javascript_fix_1.js | 7 ++++--- .automation/test/javascript_standard/javascript_fix_2.js | 5 +---- megalinter/tests/test_megalinter/LinterTestRoot.py | 8 +++++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.automation/test/javascript_standard/javascript_fix_1.js b/.automation/test/javascript_standard/javascript_fix_1.js index 1d2e726848a..0c6972105a2 100644 --- a/.automation/test/javascript_standard/javascript_fix_1.js +++ b/.automation/test/javascript_standard/javascript_fix_1.js @@ -1,3 +1,4 @@ -/* eslint capitalized-comments: ["error", "always"] */ - -// lowercase comment +function hello (name) { +console.log('hi', name) +} +hello('test') diff --git a/.automation/test/javascript_standard/javascript_fix_2.js b/.automation/test/javascript_standard/javascript_fix_2.js index 8f078ca66c8..c2ac47a95b9 100644 --- a/.automation/test/javascript_standard/javascript_fix_2.js +++ b/.automation/test/javascript_standard/javascript_fix_2.js @@ -1,4 +1 @@ -/* eslint multiline-comment-style: ["error", "starred-block"] */ - -// this line -// calls foo() +console.log("hello there") diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 97d569ef719..73c552f8609 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -71,7 +71,13 @@ def test_report_sarif(self): def test_format_fix(self): utilstest.linter_test_setup() + linter=self.get_linter_instance() + if self.linter_name == 'prettier': config.set_value("JAVASCRIPT_DEFAULT_STYLE", "prettier") - utilstest.test_linter_format_fix(self.get_linter_instance(), self) + if self.linter_name == 'standard': + config.set_value("JAVASCRIPT_DEFAULT_STYLE", "standard") + config.set_value("JAVASCRIPT_STANDARD_ARGUMENTS", config.get("DEFAULT_WORKSPACE").replace("\\", "/") + f"/{linter.test_folder}/*_fix_*.js") + + utilstest.test_linter_format_fix(linter, self) From 9c5951e7bab20e17eeef698aa37deba1564b7401 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Thu, 26 Jan 2023 23:19:48 +0100 Subject: [PATCH 11/63] Remove copy --- megalinter/tests/test_megalinter/helpers/utilstest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index b2ee504dde9..d002f895a90 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -618,7 +618,6 @@ def test_linter_format_fix(linter, test_self): # Special cases when files must be copied in a temp directory before being linted if os.path.isdir(workspace + os.path.sep + "fix"): workspace = workspace + os.path.sep + "fix" - workspace = manage_copy_sources(workspace) tmp_report_folder = tempfile.gettempdir() + os.path.sep + str(uuid.uuid4()) assert os.path.isdir(workspace), f"Test folder {workspace} is not existing" From 93ca9dbd0beb466fb0891baefa46963a22eb0ae5 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Thu, 26 Jan 2023 23:24:26 +0100 Subject: [PATCH 12/63] Fix linter activation --- megalinter/tests/test_megalinter/LinterTestRoot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 73c552f8609..55830fe9b99 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -71,13 +71,15 @@ def test_report_sarif(self): def test_format_fix(self): utilstest.linter_test_setup() - linter=self.get_linter_instance() - if self.linter_name == 'prettier': config.set_value("JAVASCRIPT_DEFAULT_STYLE", "prettier") if self.linter_name == 'standard': config.set_value("JAVASCRIPT_DEFAULT_STYLE", "standard") + + linter=self.get_linter_instance() + + if self.linter_name == 'standard': config.set_value("JAVASCRIPT_STANDARD_ARGUMENTS", config.get("DEFAULT_WORKSPACE").replace("\\", "/") + f"/{linter.test_folder}/*_fix_*.js") utilstest.test_linter_format_fix(linter, self) From fb8fe35c99b69dd6607fa84bb87d16f5e20967f1 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Thu, 26 Jan 2023 22:44:05 +0000 Subject: [PATCH 13/63] [MegaLinter] Apply linters fixes --- megalinter/linter_factory.py | 4 ++- .../tests/test_megalinter/LinterTestRoot.py | 25 ++++++++++++------- .../test_megalinter/helpers/utilstest.py | 5 ++-- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/megalinter/linter_factory.py b/megalinter/linter_factory.py index 88ea8e69b76..57b4321448f 100644 --- a/megalinter/linter_factory.py +++ b/megalinter/linter_factory.py @@ -131,7 +131,9 @@ def build_linter(language, linter_name, linter_init_params=None): assert os.path.isfile( language_descriptor_file ), f"Unable to find {language_descriptor_file}" - linters = build_descriptor_linters(language_descriptor_file, linter_init_params, [linter_name]) + linters = build_descriptor_linters( + language_descriptor_file, linter_init_params, [linter_name] + ) assert ( len(linters) == 1 ), f"Unable to find linter {linter_name} in {language_descriptor_file}" diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 55830fe9b99..6d57ed03263 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -3,7 +3,6 @@ Unit tests for Linter class (and sub-classes) """ import os - from typing import Optional from megalinter import config, linter_factory @@ -15,7 +14,10 @@ class LinterTestRoot: linter_name: Optional[str] = None def get_linter_instance(self): - return linter_factory.build_linter(self.descriptor_id, self.linter_name, { + return linter_factory.build_linter( + self.descriptor_id, + self.linter_name, + { "default_linter_activation": True, "enable_descriptors": [], "enable_linters": [], @@ -24,7 +26,8 @@ def get_linter_instance(self): "disable_errors_linters": [], "github_workspace": os.getcwd(), "post_linter_status": True, - }) + }, + ) def test_success(self): utilstest.linter_test_setup() @@ -71,15 +74,19 @@ def test_report_sarif(self): def test_format_fix(self): utilstest.linter_test_setup() - if self.linter_name == 'prettier': + if self.linter_name == "prettier": config.set_value("JAVASCRIPT_DEFAULT_STYLE", "prettier") - - if self.linter_name == 'standard': + + if self.linter_name == "standard": config.set_value("JAVASCRIPT_DEFAULT_STYLE", "standard") - linter=self.get_linter_instance() + linter = self.get_linter_instance() - if self.linter_name == 'standard': - config.set_value("JAVASCRIPT_STANDARD_ARGUMENTS", config.get("DEFAULT_WORKSPACE").replace("\\", "/") + f"/{linter.test_folder}/*_fix_*.js") + if self.linter_name == "standard": + config.set_value( + "JAVASCRIPT_STANDARD_ARGUMENTS", + config.get("DEFAULT_WORKSPACE").replace("\\", "/") + + f"/{linter.test_folder}/*_fix_*.js", + ) utilstest.test_linter_format_fix(linter, self) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index d002f895a90..9baca15c12f 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -1,6 +1,5 @@ import contextlib import difflib -import git import io import json import logging @@ -13,6 +12,7 @@ from datetime import datetime from distutils.dir_util import copy_tree +import git from git import Repo from megalinter import Megalinter, config, utils from megalinter.constants import ( @@ -606,6 +606,7 @@ def assert_file_has_been_updated(file_name, bool_val, test_self): else: test_self.assertFalse(updated, f"{file_name} has not been updated") + def test_linter_format_fix(linter, test_self): if ( linter.disabled is True @@ -620,7 +621,7 @@ def test_linter_format_fix(linter, test_self): workspace = workspace + os.path.sep + "fix" tmp_report_folder = tempfile.gettempdir() + os.path.sep + str(uuid.uuid4()) assert os.path.isdir(workspace), f"Test folder {workspace} is not existing" - + file_map = {} for file_name in os.listdir(workspace): From 52fc988805448302533a6a1ca7c01be2cd5eec84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Fri, 27 Jan 2023 23:03:40 +0100 Subject: [PATCH 14/63] Add input files --- .automation/test/json/json_fix_1.json | 10 ++++++++++ .automation/test/jsx/jsx_fix_1.jsx | 18 ++++++++++++++++++ .automation/test/kotlin/Kotlinfix1.kt | 12 ++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 .automation/test/json/json_fix_1.json create mode 100644 .automation/test/jsx/jsx_fix_1.jsx create mode 100644 .automation/test/kotlin/Kotlinfix1.kt diff --git a/.automation/test/json/json_fix_1.json b/.automation/test/json/json_fix_1.json new file mode 100644 index 00000000000..8a9dd746c39 --- /dev/null +++ b/.automation/test/json/json_fix_1.json @@ -0,0 +1,10 @@ +{ + "arrow_spacing":{ + "level": "ignore" + }, + "braces_spacing": { + "level": "ignore", + "spaces": 0, + "empty_object_spaces": 0 + } +} diff --git a/.automation/test/jsx/jsx_fix_1.jsx b/.automation/test/jsx/jsx_fix_1.jsx new file mode 100644 index 00000000000..5287bf2331a --- /dev/null +++ b/.automation/test/jsx/jsx_fix_1.jsx @@ -0,0 +1,18 @@ +/* eslint capitalized-comments: ["error"] */ +//a + +/*eslint no-else-return: "error"*/ + +function foo() { + var x = true + var y = 0 + var z = 0 + + if (x) { + return y; + } else { + return z; + } +} + +foo() diff --git a/.automation/test/kotlin/Kotlinfix1.kt b/.automation/test/kotlin/Kotlinfix1.kt new file mode 100644 index 00000000000..5a07ffd6e8f --- /dev/null +++ b/.automation/test/kotlin/Kotlinfix1.kt @@ -0,0 +1,12 @@ +internal abstract class A{ + protected open val v = "" + internal open suspend fun f(v: Any): Any = "" +public lateinit var lv: String + abstract tailrec fun findFixPoint(x: Double = 1.0): Double +} + +class B : A() { + public override val v = "" + override suspend fun f(v: Any): Any = "" + override tailrec fun findFixPoint(x: Double): Double = if (x == Math.cos(x)) x else findFixPoint(Math.cos(x)) +} From ac1ef707e4e59d05cd5fb050c2b7f2025c41601c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sat, 28 Jan 2023 22:29:42 +0100 Subject: [PATCH 15/63] Add input files --- .automation/test/css/css_fix_01.css | 22 ++++++++++++++++++++++ .automation/test/css/css_fix_02.css | 22 ++++++++++++++++++++++ .automation/test/env/env_fix_1.env | 5 +++++ .automation/test/xml/fix/xml_fix_1.xml | 7 +++++++ .automation/test/xml/fix/xml_fix_2.xml | 7 +++++++ .automation/test/yaml/yml_fix_1.yml | 18 ++++++++++++++++++ 6 files changed, 81 insertions(+) create mode 100644 .automation/test/css/css_fix_01.css create mode 100644 .automation/test/css/css_fix_02.css create mode 100644 .automation/test/env/env_fix_1.env create mode 100644 .automation/test/xml/fix/xml_fix_1.xml create mode 100644 .automation/test/xml/fix/xml_fix_2.xml create mode 100644 .automation/test/yaml/yml_fix_1.yml diff --git a/.automation/test/css/css_fix_01.css b/.automation/test/css/css_fix_01.css new file mode 100644 index 00000000000..844dfbfe3fc --- /dev/null +++ b/.automation/test/css/css_fix_01.css @@ -0,0 +1,22 @@ +/** + * Multi-line comment + */ + +.selector-1, +.selector-2, +.selector-3[type="text"] { + background: linear-gradient(#fff, rgba(0 0 0 80%)); + box-sizing: border-box; + display: block; + color: #333; +} + +.selector-a, +.selector-b:not(:first-child) { + padding: 10px !important; + top: calc(calc(1em * 2) / 3); +} + +.selector-x {width: 10%;} +.selector-y { width: 20%; } +.selector-z { width: 30%; } diff --git a/.automation/test/css/css_fix_02.css b/.automation/test/css/css_fix_02.css new file mode 100644 index 00000000000..939ec44d155 --- /dev/null +++ b/.automation/test/css/css_fix_02.css @@ -0,0 +1,22 @@ +/** + * Multi-line comment + */ + +.selector-1, +.selector-2, +.selector-3[type="text"]{ + background: linear-gradient(#fff, rgba(0 0 0 80%)); + box-sizing: border-box; + display: block; + color: #333; +} + +.selector-a, +.selector-b:not(:first-child) { + padding: 10px !important; + top: calc(calc(1em * 2) / 3); +} + +.selector-x { width: 10%; } +.selector-y { width: 20%; } +.selector-z { width: 30%; } diff --git a/.automation/test/env/env_fix_1.env b/.automation/test/env/env_fix_1.env new file mode 100644 index 00000000000..62fb82bd236 --- /dev/null +++ b/.automation/test/env/env_fix_1.env @@ -0,0 +1,5 @@ +db_name=development +DEBUG_HTTP=true +LOGGER_LEVEL=info +MY_ENV= +MY_ENV= diff --git a/.automation/test/xml/fix/xml_fix_1.xml b/.automation/test/xml/fix/xml_fix_1.xml new file mode 100644 index 00000000000..779915d9df0 --- /dev/null +++ b/.automation/test/xml/fix/xml_fix_1.xml @@ -0,0 +1,7 @@ + + + Tove + Jani +Reminder + Don't forget me this weekend! + diff --git a/.automation/test/xml/fix/xml_fix_2.xml b/.automation/test/xml/fix/xml_fix_2.xml new file mode 100644 index 00000000000..71c451b2506 --- /dev/null +++ b/.automation/test/xml/fix/xml_fix_2.xml @@ -0,0 +1,7 @@ + + + Tove + Jani + Reminder +Don't forget me this weekend! + diff --git a/.automation/test/yaml/yml_fix_1.yml b/.automation/test/yaml/yml_fix_1.yml new file mode 100644 index 00000000000..1709b3778b6 --- /dev/null +++ b/.automation/test/yaml/yml_fix_1.yml @@ -0,0 +1,18 @@ +--- +##################### +##################### +## Heres some vars ## +##################### +##################### + +############ +# Env Vars # +############ +env: + browser: true + es6: true + jest: true + +Here: there # good comment + +something: 'For Nothing' From f9ae25837e8618b08f0dc9245462d988e9023b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sat, 28 Jan 2023 23:00:46 +0100 Subject: [PATCH 16/63] Fix xmllint autofix --- megalinter/linters/XmlLintLinter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/megalinter/linters/XmlLintLinter.py b/megalinter/linters/XmlLintLinter.py index ff59c1ff47b..d6348c5e6b4 100644 --- a/megalinter/linters/XmlLintLinter.py +++ b/megalinter/linters/XmlLintLinter.py @@ -21,7 +21,7 @@ def build_lint_command(self, file=None): if self.cli_lint_mode == "file": os.environ["XMLLINT_INDENT"] = config.get("XML_XMLLINT_INDENT", " ") - cmd += f" {self.cli_lint_fix_arg_name} --output {file}" + cmd += ["--output", f"{file}"] else: raise KeyError( f"You can not apply_fixes with cli_lint_mode {self.cli_lint_mode}" From 127504235379ba9533065b02278da913dfa3e159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sat, 28 Jan 2023 23:00:59 +0100 Subject: [PATCH 17/63] xmllint format fix test --- megalinter/tests/test_megalinter/LinterTestRoot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 6d57ed03263..9c31bab9779 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -80,6 +80,10 @@ def test_format_fix(self): if self.linter_name == "standard": config.set_value("JAVASCRIPT_DEFAULT_STYLE", "standard") + if self.linter_name == "xmllint": + config.set_value("XML_XMLLINT_AUTOFORMAT", "true") + config.set_value("XML_XMLLINT_CLI_LINT_MODE", "file") + linter = self.get_linter_instance() if self.linter_name == "standard": From ac94cc0bba6be264b66ae90c47a3938f0c910032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sat, 28 Jan 2023 23:58:59 +0100 Subject: [PATCH 18/63] Add input files --- .automation/test/powershell_formatter/fix/powershell_fix_2.ps1 | 1 + .../test/powershell_formatter/fix/powershell_fix_2.psd1 | 3 +++ .../test/powershell_formatter/fix/powershell_fix_2.psm1 | 1 + 3 files changed, 5 insertions(+) create mode 100644 .automation/test/powershell_formatter/fix/powershell_fix_2.ps1 create mode 100644 .automation/test/powershell_formatter/fix/powershell_fix_2.psd1 create mode 100644 .automation/test/powershell_formatter/fix/powershell_fix_2.psm1 diff --git a/.automation/test/powershell_formatter/fix/powershell_fix_2.ps1 b/.automation/test/powershell_formatter/fix/powershell_fix_2.ps1 new file mode 100644 index 00000000000..b1980ffaa38 --- /dev/null +++ b/.automation/test/powershell_formatter/fix/powershell_fix_2.ps1 @@ -0,0 +1 @@ +write-output "hello world!" diff --git a/.automation/test/powershell_formatter/fix/powershell_fix_2.psd1 b/.automation/test/powershell_formatter/fix/powershell_fix_2.psd1 new file mode 100644 index 00000000000..b0970e12753 --- /dev/null +++ b/.automation/test/powershell_formatter/fix/powershell_fix_2.psd1 @@ -0,0 +1,3 @@ +@{ +'Hello'='World' +} diff --git a/.automation/test/powershell_formatter/fix/powershell_fix_2.psm1 b/.automation/test/powershell_formatter/fix/powershell_fix_2.psm1 new file mode 100644 index 00000000000..b1980ffaa38 --- /dev/null +++ b/.automation/test/powershell_formatter/fix/powershell_fix_2.psm1 @@ -0,0 +1 @@ +write-output "hello world!" From a49d5d6b25af7da13221d2764be7456c227ca6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sat, 28 Jan 2023 23:59:16 +0100 Subject: [PATCH 19/63] Fix powershell formatter autofix --- TEMPLATES/.powershell-formatter.psd1 | 17 ----------------- TEMPLATES/.powershell-psscriptanalyzer.psd1 | 17 ----------------- .../powershell.megalinter-descriptor.yml | 1 + 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 TEMPLATES/.powershell-formatter.psd1 delete mode 100644 TEMPLATES/.powershell-psscriptanalyzer.psd1 diff --git a/TEMPLATES/.powershell-formatter.psd1 b/TEMPLATES/.powershell-formatter.psd1 deleted file mode 100644 index d49e228ef0c..00000000000 --- a/TEMPLATES/.powershell-formatter.psd1 +++ /dev/null @@ -1,17 +0,0 @@ -#Documentation: https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/markdown/Invoke-ScriptAnalyzer.md#-settings -@{ - #CustomRulePath='path\to\CustomRuleModule.psm1' - #RecurseCustomRulePath='path\of\customrules' - #Severity = @( - # 'Error' - # 'Warning' - #) - #IncludeDefaultRules=${true} - ExcludeRules = @( - 'PSMissingModuleManifestField' - ) - #IncludeRules = @( - # 'PSAvoidUsingWriteHost', - # 'MyCustomRuleName' - #) -} diff --git a/TEMPLATES/.powershell-psscriptanalyzer.psd1 b/TEMPLATES/.powershell-psscriptanalyzer.psd1 deleted file mode 100644 index d49e228ef0c..00000000000 --- a/TEMPLATES/.powershell-psscriptanalyzer.psd1 +++ /dev/null @@ -1,17 +0,0 @@ -#Documentation: https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/markdown/Invoke-ScriptAnalyzer.md#-settings -@{ - #CustomRulePath='path\to\CustomRuleModule.psm1' - #RecurseCustomRulePath='path\of\customrules' - #Severity = @( - # 'Error' - # 'Warning' - #) - #IncludeDefaultRules=${true} - ExcludeRules = @( - 'PSMissingModuleManifestField' - ) - #IncludeRules = @( - # 'PSAvoidUsingWriteHost', - # 'MyCustomRuleName' - #) -} diff --git a/megalinter/descriptors/powershell.megalinter-descriptor.yml b/megalinter/descriptors/powershell.megalinter-descriptor.yml index c4ecf928b45..509cfd3a089 100644 --- a/megalinter/descriptors/powershell.megalinter-descriptor.yml +++ b/megalinter/descriptors/powershell.megalinter-descriptor.yml @@ -73,6 +73,7 @@ linters: linter_rules_inline_disable_url: https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules#suppressing-rules config_file_name: .powershell-formatter.psd1 test_folder: powershell_formatter + cli_lint_fix_arg_name: "--megalinter-fix-flag" # Workaround for PowershellLinter class behavior version_extract_regex: "(\\d+) *(\\d+) *(\\d+)" examples: - 'pwsh -NoProfile -NoLogo -Command "Invoke-Formatter -ScriptDefinition ''write-host Hello World''"' From 1b7784c0b6277af018d219fb63ec9ad42990dcdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 00:05:27 +0100 Subject: [PATCH 20/63] Add input files --- .automation/test/powershell/powershell_fix_1.ps1 | 1 + .automation/test/powershell/powershell_fix_1.psd1 | 3 +++ .automation/test/powershell/powershell_fix_1.psm1 | 1 + 3 files changed, 5 insertions(+) create mode 100644 .automation/test/powershell/powershell_fix_1.ps1 create mode 100644 .automation/test/powershell/powershell_fix_1.psd1 create mode 100644 .automation/test/powershell/powershell_fix_1.psm1 diff --git a/.automation/test/powershell/powershell_fix_1.ps1 b/.automation/test/powershell/powershell_fix_1.ps1 new file mode 100644 index 00000000000..61f24684da8 --- /dev/null +++ b/.automation/test/powershell/powershell_fix_1.ps1 @@ -0,0 +1 @@ +write-output "hello world!" diff --git a/.automation/test/powershell/powershell_fix_1.psd1 b/.automation/test/powershell/powershell_fix_1.psd1 new file mode 100644 index 00000000000..7713fe015b9 --- /dev/null +++ b/.automation/test/powershell/powershell_fix_1.psd1 @@ -0,0 +1,3 @@ +@{ +'Hello'='World' +} diff --git a/.automation/test/powershell/powershell_fix_1.psm1 b/.automation/test/powershell/powershell_fix_1.psm1 new file mode 100644 index 00000000000..61f24684da8 --- /dev/null +++ b/.automation/test/powershell/powershell_fix_1.psm1 @@ -0,0 +1 @@ +write-output "hello world!" From 058fa32e97793d6b3c948cff36b999ee192deb98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 16:18:27 +0100 Subject: [PATCH 21/63] Try to fix git error --- megalinter/tests/test_megalinter/LinterTestRoot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 9c31bab9779..5f1ec4e75e2 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -24,7 +24,7 @@ def get_linter_instance(self): "disable_descriptors": [], "disable_linters": [], "disable_errors_linters": [], - "github_workspace": os.getcwd(), + "github_workspace": '.', "post_linter_status": True, }, ) From 7d62197b0fdaaca50422048429eb74addd17d2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 16:42:34 +0100 Subject: [PATCH 22/63] Only use GitPython if repo exists --- .../tests/test_megalinter/helpers/utilstest.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 9baca15c12f..494eb989702 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -13,7 +13,7 @@ from distutils.dir_util import copy_tree import git -from git import Repo +from git import Repo, InvalidGitRepositoryError from megalinter import Megalinter, config, utils from megalinter.constants import ( DEFAULT_DOCKER_WORKSPACE_DIR, @@ -676,7 +676,12 @@ def test_linter_format_fix(linter, test_self): ) copy_logs_for_doc(text_report_file, test_folder, report_file_name) - repo = git.Repo(linter.github_workspace) + repo = None + + try: + repo = git.Repo(linter.github_workspace) + except InvalidGitRepositoryError: # Only the repository exists locally, not inside the container + pass # Check files content for file in file_map: @@ -689,4 +694,6 @@ def test_linter_format_fix(linter, test_self): if li[0] != " " ] assert (len(list(diffs))) > 0, f"No changes in the {file} file" - repo.index.checkout([os.path.join(linter.github_workspace, file)], force=True) + + if repo is not None: + repo.index.checkout([os.path.join(linter.github_workspace, file)], force=True) From edfcc00bc36f29111a41beee44dd39c91ab28b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 16:49:33 +0100 Subject: [PATCH 23/63] Remove unused import --- megalinter/tests/test_megalinter/LinterTestRoot.py | 1 - 1 file changed, 1 deletion(-) diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 5f1ec4e75e2..9922bf9644a 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -2,7 +2,6 @@ """ Unit tests for Linter class (and sub-classes) """ -import os from typing import Optional from megalinter import config, linter_factory From 60334ba92ca24966c4020ed551d7e5d2258716df Mon Sep 17 00:00:00 2001 From: bdovaz Date: Sun, 29 Jan 2023 15:54:34 +0000 Subject: [PATCH 24/63] [MegaLinter] Apply linters fixes --- megalinter/tests/test_megalinter/LinterTestRoot.py | 2 +- megalinter/tests/test_megalinter/helpers/utilstest.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 9922bf9644a..222deba2034 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -23,7 +23,7 @@ def get_linter_instance(self): "disable_descriptors": [], "disable_linters": [], "disable_errors_linters": [], - "github_workspace": '.', + "github_workspace": ".", "post_linter_status": True, }, ) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 494eb989702..f4da86cf8b3 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -13,7 +13,7 @@ from distutils.dir_util import copy_tree import git -from git import Repo, InvalidGitRepositoryError +from git import InvalidGitRepositoryError, Repo from megalinter import Megalinter, config, utils from megalinter.constants import ( DEFAULT_DOCKER_WORKSPACE_DIR, @@ -680,7 +680,7 @@ def test_linter_format_fix(linter, test_self): try: repo = git.Repo(linter.github_workspace) - except InvalidGitRepositoryError: # Only the repository exists locally, not inside the container + except InvalidGitRepositoryError: # Only the repository exists locally, not inside the container pass # Check files content @@ -696,4 +696,6 @@ def test_linter_format_fix(linter, test_self): assert (len(list(diffs))) > 0, f"No changes in the {file} file" if repo is not None: - repo.index.checkout([os.path.join(linter.github_workspace, file)], force=True) + repo.index.checkout( + [os.path.join(linter.github_workspace, file)], force=True + ) From c54334ae2ffb206ac401061c31b7e1a016a6b919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 17:28:14 +0100 Subject: [PATCH 25/63] Add input files --- .automation/test/json/json_fix_1.json | 4 +++- .automation/test/json_prettier/json_fix_1.json | 7 +++++++ megalinter/tests/test_megalinter/LinterTestRoot.py | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .automation/test/json_prettier/json_fix_1.json diff --git a/.automation/test/json/json_fix_1.json b/.automation/test/json/json_fix_1.json index 8a9dd746c39..ef2fbdc7908 100644 --- a/.automation/test/json/json_fix_1.json +++ b/.automation/test/json/json_fix_1.json @@ -1,3 +1,4 @@ +/* eslint jsonc/sort-array-values: ['error', { pathPattern: '.*', order: { type: 'asc' } }] */ { "arrow_spacing":{ "level": "ignore" @@ -5,6 +6,7 @@ "braces_spacing": { "level": "ignore", "spaces": 0, - "empty_object_spaces": 0 + "empty_object_spaces": 0, + "letters": ["c", "b", "a"] } } diff --git a/.automation/test/json_prettier/json_fix_1.json b/.automation/test/json_prettier/json_fix_1.json new file mode 100644 index 00000000000..35adbeb5468 --- /dev/null +++ b/.automation/test/json_prettier/json_fix_1.json @@ -0,0 +1,7 @@ +{ + "array": ["one_item"], + "object":{ + "first-item": 0, + "second-item": 1 + } +} diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 222deba2034..9de20784509 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -92,4 +92,11 @@ def test_format_fix(self): + f"/{linter.test_folder}/*_fix_*.js", ) + if self.linter_name == "eslint-plugin-jsonc": + config.set_value( + "JSON_ESLINT_PLUGIN_JSONC_ARGUMENTS", + config.get("DEFAULT_WORKSPACE").replace("\\", "/") + + f"/{linter.test_folder}/*_fix_*.json", + ) + utilstest.test_linter_format_fix(linter, self) From a223adfab4b5f58826e10873f1ca57da5d219d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 18:42:01 +0100 Subject: [PATCH 26/63] Add input files --- .automation/test/tsx/tsx_fix_1.tsx | 3 +++ .automation/test/tsx/tsx_fix_2.tsx | 3 +++ megalinter/descriptors/tsx.megalinter-descriptor.yml | 8 ++++---- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .automation/test/tsx/tsx_fix_1.tsx create mode 100644 .automation/test/tsx/tsx_fix_2.tsx diff --git a/.automation/test/tsx/tsx_fix_1.tsx b/.automation/test/tsx/tsx_fix_1.tsx new file mode 100644 index 00000000000..618c7ed3e24 --- /dev/null +++ b/.automation/test/tsx/tsx_fix_1.tsx @@ -0,0 +1,3 @@ +import React from 'react'; + +var Hello = diff --git a/.automation/test/tsx/tsx_fix_2.tsx b/.automation/test/tsx/tsx_fix_2.tsx new file mode 100644 index 00000000000..618c7ed3e24 --- /dev/null +++ b/.automation/test/tsx/tsx_fix_2.tsx @@ -0,0 +1,3 @@ +import React from 'react'; + +var Hello = diff --git a/megalinter/descriptors/tsx.megalinter-descriptor.yml b/megalinter/descriptors/tsx.megalinter-descriptor.yml index 88130c769db..c80fc02f6e7 100644 --- a/megalinter/descriptors/tsx.megalinter-descriptor.yml +++ b/megalinter/descriptors/tsx.megalinter-descriptor.yml @@ -14,11 +14,11 @@ linters: eslint requires a custom configuration file applicable to your project. You can create it by typing `npx eslint --init` in the root of your repository - linter_url: https://github.com/yannickcr/eslint-plugin-react - linter_repo: https://github.com/yannickcr/eslint-plugin-react - linter_rules_url: https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules + linter_url: https://github.com/jsx-eslint/eslint-plugin-react + linter_repo: https://github.com/jsx-eslint/eslint-plugin-react + linter_rules_url: https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules linter_banner_image_url: https://d33wubrfki0l68.cloudfront.net/3b5ac7586466159bb6f237b633bfc4f5a8d5acf8/ee0a1/assets/img/posts/eslint-collective.png - linter_rules_configuration_url: https://github.com/yannickcr/eslint-plugin-react#configuration + linter_rules_configuration_url: https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc linter_rules_inline_disable_url: https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments linter_rules_ignore_config_url: https://eslint.org/docs/latest/user-guide/configuring/ignoring-code#the-eslintignore-file linter_megalinter_ref_url: https://eslint.org/docs/user-guide/integrations#source-control From 6cef2b06df47b643dd548e5f54d711c4a2f22c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 18:43:07 +0100 Subject: [PATCH 27/63] Fix git error --- .../tests/test_megalinter/helpers/utilstest.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index f4da86cf8b3..a2390381efd 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -12,7 +12,6 @@ from datetime import datetime from distutils.dir_util import copy_tree -import git from git import InvalidGitRepositoryError, Repo from megalinter import Megalinter, config, utils from megalinter.constants import ( @@ -594,7 +593,7 @@ def assert_is_skipped(skipped_item, output, test_self): def assert_file_has_been_updated(file_name, bool_val, test_self): - repo = Repo(REPO_HOME) + repo = Repo(os.path.realpath(REPO_HOME)) changed_files = [item.a_path for item in repo.index.diff(None)] logging.info("Updated files (git):\n" + "\n".join(changed_files)) updated = False @@ -676,12 +675,7 @@ def test_linter_format_fix(linter, test_self): ) copy_logs_for_doc(text_report_file, test_folder, report_file_name) - repo = None - - try: - repo = git.Repo(linter.github_workspace) - except InvalidGitRepositoryError: # Only the repository exists locally, not inside the container - pass + repo = Repo(os.path.realpath(REPO_HOME)) # Check files content for file in file_map: @@ -695,7 +689,6 @@ def test_linter_format_fix(linter, test_self): ] assert (len(list(diffs))) > 0, f"No changes in the {file} file" - if repo is not None: - repo.index.checkout( - [os.path.join(linter.github_workspace, file)], force=True - ) + repo.index.checkout( + [os.path.join(linter.github_workspace, file)], force=True + ) From 734a16558e8d4a4b89060403d63d377f5971ddb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 18:59:58 +0100 Subject: [PATCH 28/63] Add input files --- .automation/test/typescript/typescript_fix_1.ts | 1 + .automation/test/typescript/typescript_fix_2.ts | 1 + .../descriptors/typescript.megalinter-descriptor.yml | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .automation/test/typescript/typescript_fix_1.ts create mode 100644 .automation/test/typescript/typescript_fix_2.ts diff --git a/.automation/test/typescript/typescript_fix_1.ts b/.automation/test/typescript/typescript_fix_1.ts new file mode 100644 index 00000000000..d208f88b84f --- /dev/null +++ b/.automation/test/typescript/typescript_fix_1.ts @@ -0,0 +1 @@ +const str: String = 'foo'; diff --git a/.automation/test/typescript/typescript_fix_2.ts b/.automation/test/typescript/typescript_fix_2.ts new file mode 100644 index 00000000000..d208f88b84f --- /dev/null +++ b/.automation/test/typescript/typescript_fix_2.ts @@ -0,0 +1 @@ +const str: String = 'foo'; diff --git a/megalinter/descriptors/typescript.megalinter-descriptor.yml b/megalinter/descriptors/typescript.megalinter-descriptor.yml index 17fa0c6b619..a3d528a0828 100644 --- a/megalinter/descriptors/typescript.megalinter-descriptor.yml +++ b/megalinter/descriptors/typescript.megalinter-descriptor.yml @@ -18,11 +18,11 @@ linters: eslint requires a custom configuration file applicable to your project. You can create it by typing `npx eslint --init` in the root of your repository - linter_url: https://eslint.org - linter_repo: https://github.com/eslint/eslint - linter_rules_url: https://eslint.org/docs/rules/ - linter_banner_image_url: https://d33wubrfki0l68.cloudfront.net/3b5ac7586466159bb6f237b633bfc4f5a8d5acf8/ee0a1/assets/img/posts/eslint-collective.png - linter_rules_configuration_url: https://eslint.org/docs/user-guide/configuring + linter_url: https://typescript-eslint.io/ + linter_repo: https://github.com/typescript-eslint/typescript-eslint + linter_rules_url: https://typescript-eslint.io/rules/ + linter_banner_image_url: https://typescript-eslint.io/img/logo.svg + linter_rules_configuration_url: https://typescript-eslint.io/getting-started/#configuration-values linter_rules_inline_disable_url: https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments linter_rules_ignore_config_url: https://eslint.org/docs/latest/user-guide/configuring/ignoring-code#the-eslintignore-file linter_megalinter_ref_url: https://eslint.org/docs/user-guide/integrations#source-control From 38a4f96a4bacd39b78e24f1e9475ec7490785a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 19:05:46 +0100 Subject: [PATCH 29/63] Fix linter error --- megalinter/tests/test_megalinter/helpers/utilstest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index a2390381efd..978d0d81aab 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -12,7 +12,7 @@ from datetime import datetime from distutils.dir_util import copy_tree -from git import InvalidGitRepositoryError, Repo +from git import Repo from megalinter import Megalinter, config, utils from megalinter.constants import ( DEFAULT_DOCKER_WORKSPACE_DIR, From 4a438b1c957920b2ef7d57cd654204101e144d50 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Sun, 29 Jan 2023 18:10:26 +0000 Subject: [PATCH 30/63] [MegaLinter] Apply linters fixes --- megalinter/tests/test_megalinter/helpers/utilstest.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 978d0d81aab..dcae6f6c275 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -689,6 +689,4 @@ def test_linter_format_fix(linter, test_self): ] assert (len(list(diffs))) > 0, f"No changes in the {file} file" - repo.index.checkout( - [os.path.join(linter.github_workspace, file)], force=True - ) + repo.index.checkout([os.path.join(linter.github_workspace, file)], force=True) From 6231623369dec3aab44f932ae1922b7a496fdc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 23:00:49 +0100 Subject: [PATCH 31/63] Add input files --- .automation/test/groovy/groovy_fix_01.groovy | 2 +- .automation/test/groovy/groovy_fix_02.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.automation/test/groovy/groovy_fix_01.groovy b/.automation/test/groovy/groovy_fix_01.groovy index e56c533f684..e4ed7f8f989 100644 --- a/.automation/test/groovy/groovy_fix_01.groovy +++ b/.automation/test/groovy/groovy_fix_01.groovy @@ -1,7 +1,7 @@ /* groovylint-disable ClassNameSameAsFilename, CompileStatic, JavaIoPackageAccess */ class Example { - static void main(String[] args) { + static void main(String[] args){ File file = new File('E:/Example.txt') println "The file ${file.absolutePath} has ${file.length()} bytes" } diff --git a/.automation/test/groovy/groovy_fix_02.groovy b/.automation/test/groovy/groovy_fix_02.groovy index e56c533f684..94c59d4b319 100644 --- a/.automation/test/groovy/groovy_fix_02.groovy +++ b/.automation/test/groovy/groovy_fix_02.groovy @@ -1,5 +1,5 @@ /* groovylint-disable ClassNameSameAsFilename, CompileStatic, JavaIoPackageAccess */ -class Example { +class Example{ static void main(String[] args) { File file = new File('E:/Example.txt') From dce0985d30568518a7e9e46cf166c4311c99a226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 29 Jan 2023 23:46:54 +0100 Subject: [PATCH 32/63] Add input files --- .automation/test/csharp/fix/csharp_fix_01.cs | 12 ++ .automation/test/csharp/fix/csharp_fix_02.cs | 12 ++ .../test/csharp/fix/csharp_project.csproj | 10 + .automation/test/python/python_fix_1.py | 204 ++++++++++++++++++ .automation/test/python/python_fix_2.py | 204 ++++++++++++++++++ .automation/test/ruby/ruby_fix_1.rb | 23 ++ .automation/test/swift/fix/.swiftlint.yml | 10 + .automation/test/swift/fix/LICENSE | 21 ++ .automation/test/swift/fix/README.md | 14 ++ .../test/swift/fix/Sources/AppDelegate.swift | 41 ++++ .../AppIcon.appiconset/Contents.json | 98 +++++++++ .../fix/Sources/Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 +++ .automation/test/swift/fix/Sources/Info.plist | 62 ++++++ .../Preview Assets.xcassets/Contents.json | 6 + .../swift/fix/Sources/SceneDelegate.swift | 61 ++++++ .automation/test/swift/fix/Sources/Task.swift | 21 ++ .../test/swift/fix/Sources/TaskEditView.swift | 52 +++++ .../test/swift/fix/Sources/TaskItemView.swift | 52 +++++ .../test/swift/fix/Sources/TaskListView.swift | 38 ++++ .../test/swift/fix/Sources/UserData.swift | 26 +++ .../typescript_prettier/typescript_fix_1.ts | 1 + .../test/vbdotnet/fix/vb_projecty.vbproj | 9 + .../test/vbdotnet/fix/vbdotnet_fix_1.vb | 7 + .../test/vbdotnet/fix/vbdotnet_fix_2.vb | 7 + .../swift.megalinter-descriptor.yml | 2 +- .../test_megalinter/helpers/utilstest.py | 2 +- 27 files changed, 1024 insertions(+), 2 deletions(-) create mode 100644 .automation/test/csharp/fix/csharp_fix_01.cs create mode 100644 .automation/test/csharp/fix/csharp_fix_02.cs create mode 100644 .automation/test/csharp/fix/csharp_project.csproj create mode 100644 .automation/test/python/python_fix_1.py create mode 100644 .automation/test/python/python_fix_2.py create mode 100644 .automation/test/ruby/ruby_fix_1.rb create mode 100644 .automation/test/swift/fix/.swiftlint.yml create mode 100644 .automation/test/swift/fix/LICENSE create mode 100644 .automation/test/swift/fix/README.md create mode 100644 .automation/test/swift/fix/Sources/AppDelegate.swift create mode 100644 .automation/test/swift/fix/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 .automation/test/swift/fix/Sources/Assets.xcassets/Contents.json create mode 100644 .automation/test/swift/fix/Sources/Base.lproj/LaunchScreen.storyboard create mode 100644 .automation/test/swift/fix/Sources/Info.plist create mode 100644 .automation/test/swift/fix/Sources/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 .automation/test/swift/fix/Sources/SceneDelegate.swift create mode 100644 .automation/test/swift/fix/Sources/Task.swift create mode 100644 .automation/test/swift/fix/Sources/TaskEditView.swift create mode 100644 .automation/test/swift/fix/Sources/TaskItemView.swift create mode 100644 .automation/test/swift/fix/Sources/TaskListView.swift create mode 100644 .automation/test/swift/fix/Sources/UserData.swift create mode 100644 .automation/test/typescript_prettier/typescript_fix_1.ts create mode 100644 .automation/test/vbdotnet/fix/vb_projecty.vbproj create mode 100644 .automation/test/vbdotnet/fix/vbdotnet_fix_1.vb create mode 100644 .automation/test/vbdotnet/fix/vbdotnet_fix_2.vb diff --git a/.automation/test/csharp/fix/csharp_fix_01.cs b/.automation/test/csharp/fix/csharp_fix_01.cs new file mode 100644 index 00000000000..43959ee23cb --- /dev/null +++ b/.automation/test/csharp/fix/csharp_fix_01.cs @@ -0,0 +1,12 @@ +using System; + +namespace HelloWorld +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} diff --git a/.automation/test/csharp/fix/csharp_fix_02.cs b/.automation/test/csharp/fix/csharp_fix_02.cs new file mode 100644 index 00000000000..f73ee59ae5e --- /dev/null +++ b/.automation/test/csharp/fix/csharp_fix_02.cs @@ -0,0 +1,12 @@ +using System; + +namespace HelloWorld +{ + class Program +{ + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} diff --git a/.automation/test/csharp/fix/csharp_project.csproj b/.automation/test/csharp/fix/csharp_project.csproj new file mode 100644 index 00000000000..74abf5c9766 --- /dev/null +++ b/.automation/test/csharp/fix/csharp_project.csproj @@ -0,0 +1,10 @@ + + + + Exe + net6.0 + enable + enable + + + diff --git a/.automation/test/python/python_fix_1.py b/.automation/test/python/python_fix_1.py new file mode 100644 index 00000000000..c927ec778c2 --- /dev/null +++ b/.automation/test/python/python_fix_1.py @@ -0,0 +1,204 @@ +import sys +import json +from os import getenv, path +from pprint import pprint + +import click # pylint: disable=import-error +import requests # pylint: disable=import-error +from dotenv import load_dotenv # pylint: disable=import-error + +j = [1, + 2, + 3 +] + +env = load_dotenv() +api_url = getenv("API_URL", default="https://api.github.com/graphql") +github_token = getenv("GITHUB_TOKEN", default=None) + +if github_token is None: + sys.exit( + "GitHub Token is not set." + + "Please set the GITHUB_TOKEN env variable in your system or " + + "the .env file of your project." + ) + +client_id = getenv("CLIENT_ID", default="copy_labels.py") +headers = { + "Authorization": "bearer {github_token}".format(github_token=github_token), + "Accept": "application/vnd.github.bane-preview+json", + "Content-Type": "application/json", +} + + +def create_label(repo_id, label): + """ + Create label in the supplied repo. + + :param repo_id: Unique ID that represents the repo in GitHub + :type repo_id: str + :param label: Object with label information. + :type label: dict + :return: GitHub API request response + """ + + query_variables = { + "createLabelInput": { + "color": label["color"], + "description": label["description"], + "name": label["name"], + "repositoryId": repo_id, + } + } + + with open( + path.join(path.dirname(__file__), "queries/create_label.gql"), "r" + ) as query_file: + query = "".join(query_file.readlines()) + + payload = {"query": query, "variables": query_variables} + response = requests.post(api_url, data=json.dumps(payload), headers=headers).json() + print("Created label {label}".format(label=label["name"])) + + return response + + +def get_labels(owner, repo): + """ + Gets a list of labels from the supplied repo. + :param owner: Repo owner GitHub login. + :type owner: str + :param repo: Repository name. + :type repo: str + :return: A tuple with the GitHub id for the repository and + a list of labels defined in the repository + """ + + query_variables = { + "owner": owner, + "name": repo, + } + + with open( + path.join(path.dirname(__file__), "queries/get_repo_data.gql"), "r" + ) as query_file: + query = "".join(query_file.readlines()) + + payload = {"query": query, "variables": query_variables} + response = requests.post(api_url, data=json.dumps(payload), headers=headers) + + status_code = response.status_code + result = response.json() + + if status_code >= 200 and status_code <= 300: + repo_id = result["data"]["repository"]["id"] + labels = result["data"]["repository"]["labels"]["nodes"] + + return repo_id, labels + else: + raise Exception( + "[ERROR] getting issue labels. \ + Status Code: {status_code} - Message: {result}".format( + status_code=status_code, result=result["message"] + ) + ) + + +def delete_label(label_id): + """ + Delete the specified label + :param label_id: Label's node id. + :type label_id: str + :return: GitHub API request response. + """ + + query_variables = { + "deleteLabelInput": {"clientMutationId": client_id, "id": label_id} + } + + with open( + path.join(path.dirname(__file__), "queries/delete_label.gql"), "r" + ) as query_file: + query = "".join(query_file.readlines()) + + payload = {"query": query, "variables": query_variables} + result = requests.post(api_url, data=json.dumps(payload), headers=headers).json() + + return result + + +@click.command() +@click.option("--dry", is_flag=True) +@click.argument("source_repo") +@click.argument("target_repo") +def copy_labels(source_repo, target_repo, dry): + """ + Copy labels from the source repository to the target repository. + \f + :param source: The full name of a GitHub repo from where the labels will be + copied from. Eg. github/opensourcefriday + :type source: str + :param target: The full name of a GitHub repo to where the labels will be copied. + Eg. github/opensourcefriday + :type target: str + :return: + """ + source_owner, source_repo_name = source_repo.split("/") + target_owner, target_repo_name = target_repo.split("/") + + try: + print( + "Fetching labels for {source_repo_name} repo.".format( + source_repo_name=source_repo_name + ) + ) + _, source_repo_labels = get_labels(source_owner, source_repo_name) + print( + "Fetched labels for {source_repo_name}".format( + source_repo_name=source_repo_name + ) + ) + + print( + "Fetching labels for {target_repo_name} repo.".format( + target_repo_name=target_repo_name + ) + ) + target_repo_id, target_repo_labels = get_labels(target_owner, target_repo_name) + print( + "Fetched labels for {target_repo_name}".format( + target_repo_name=target_repo_name + ) + ) + + filtered_labels = list( + filter(lambda x: x not in target_repo_labels, source_repo_labels) + ) + + if dry: + print("This is just a dry run. No labels will be copied/created.") + print( + "{label_count} labels would have been created.".format( + label_count=len(filtered_labels) + ) + ) + pprint(filtered_labels, indent=4) + else: + print( + "Preparing to created {label_count} labels in {target_repo}".format( + label_count=len(filtered_labels), target_repo=target_repo + ) + ) + + for label in filtered_labels: + create_label(target_repo_id, label) + except Exception as error: + sys.exit(error) + + print("Done") + + +if __name__ == "__main__": + # Pylint doesn't know that @click.command takes care of injecting the + # function parameters. Disabling Pylint error. + copy_labels() # pylint: disable=no-value-for-parameter diff --git a/.automation/test/python/python_fix_2.py b/.automation/test/python/python_fix_2.py new file mode 100644 index 00000000000..c927ec778c2 --- /dev/null +++ b/.automation/test/python/python_fix_2.py @@ -0,0 +1,204 @@ +import sys +import json +from os import getenv, path +from pprint import pprint + +import click # pylint: disable=import-error +import requests # pylint: disable=import-error +from dotenv import load_dotenv # pylint: disable=import-error + +j = [1, + 2, + 3 +] + +env = load_dotenv() +api_url = getenv("API_URL", default="https://api.github.com/graphql") +github_token = getenv("GITHUB_TOKEN", default=None) + +if github_token is None: + sys.exit( + "GitHub Token is not set." + + "Please set the GITHUB_TOKEN env variable in your system or " + + "the .env file of your project." + ) + +client_id = getenv("CLIENT_ID", default="copy_labels.py") +headers = { + "Authorization": "bearer {github_token}".format(github_token=github_token), + "Accept": "application/vnd.github.bane-preview+json", + "Content-Type": "application/json", +} + + +def create_label(repo_id, label): + """ + Create label in the supplied repo. + + :param repo_id: Unique ID that represents the repo in GitHub + :type repo_id: str + :param label: Object with label information. + :type label: dict + :return: GitHub API request response + """ + + query_variables = { + "createLabelInput": { + "color": label["color"], + "description": label["description"], + "name": label["name"], + "repositoryId": repo_id, + } + } + + with open( + path.join(path.dirname(__file__), "queries/create_label.gql"), "r" + ) as query_file: + query = "".join(query_file.readlines()) + + payload = {"query": query, "variables": query_variables} + response = requests.post(api_url, data=json.dumps(payload), headers=headers).json() + print("Created label {label}".format(label=label["name"])) + + return response + + +def get_labels(owner, repo): + """ + Gets a list of labels from the supplied repo. + :param owner: Repo owner GitHub login. + :type owner: str + :param repo: Repository name. + :type repo: str + :return: A tuple with the GitHub id for the repository and + a list of labels defined in the repository + """ + + query_variables = { + "owner": owner, + "name": repo, + } + + with open( + path.join(path.dirname(__file__), "queries/get_repo_data.gql"), "r" + ) as query_file: + query = "".join(query_file.readlines()) + + payload = {"query": query, "variables": query_variables} + response = requests.post(api_url, data=json.dumps(payload), headers=headers) + + status_code = response.status_code + result = response.json() + + if status_code >= 200 and status_code <= 300: + repo_id = result["data"]["repository"]["id"] + labels = result["data"]["repository"]["labels"]["nodes"] + + return repo_id, labels + else: + raise Exception( + "[ERROR] getting issue labels. \ + Status Code: {status_code} - Message: {result}".format( + status_code=status_code, result=result["message"] + ) + ) + + +def delete_label(label_id): + """ + Delete the specified label + :param label_id: Label's node id. + :type label_id: str + :return: GitHub API request response. + """ + + query_variables = { + "deleteLabelInput": {"clientMutationId": client_id, "id": label_id} + } + + with open( + path.join(path.dirname(__file__), "queries/delete_label.gql"), "r" + ) as query_file: + query = "".join(query_file.readlines()) + + payload = {"query": query, "variables": query_variables} + result = requests.post(api_url, data=json.dumps(payload), headers=headers).json() + + return result + + +@click.command() +@click.option("--dry", is_flag=True) +@click.argument("source_repo") +@click.argument("target_repo") +def copy_labels(source_repo, target_repo, dry): + """ + Copy labels from the source repository to the target repository. + \f + :param source: The full name of a GitHub repo from where the labels will be + copied from. Eg. github/opensourcefriday + :type source: str + :param target: The full name of a GitHub repo to where the labels will be copied. + Eg. github/opensourcefriday + :type target: str + :return: + """ + source_owner, source_repo_name = source_repo.split("/") + target_owner, target_repo_name = target_repo.split("/") + + try: + print( + "Fetching labels for {source_repo_name} repo.".format( + source_repo_name=source_repo_name + ) + ) + _, source_repo_labels = get_labels(source_owner, source_repo_name) + print( + "Fetched labels for {source_repo_name}".format( + source_repo_name=source_repo_name + ) + ) + + print( + "Fetching labels for {target_repo_name} repo.".format( + target_repo_name=target_repo_name + ) + ) + target_repo_id, target_repo_labels = get_labels(target_owner, target_repo_name) + print( + "Fetched labels for {target_repo_name}".format( + target_repo_name=target_repo_name + ) + ) + + filtered_labels = list( + filter(lambda x: x not in target_repo_labels, source_repo_labels) + ) + + if dry: + print("This is just a dry run. No labels will be copied/created.") + print( + "{label_count} labels would have been created.".format( + label_count=len(filtered_labels) + ) + ) + pprint(filtered_labels, indent=4) + else: + print( + "Preparing to created {label_count} labels in {target_repo}".format( + label_count=len(filtered_labels), target_repo=target_repo + ) + ) + + for label in filtered_labels: + create_label(target_repo_id, label) + except Exception as error: + sys.exit(error) + + print("Done") + + +if __name__ == "__main__": + # Pylint doesn't know that @click.command takes care of injecting the + # function parameters. Disabling Pylint error. + copy_labels() # pylint: disable=no-value-for-parameter diff --git a/.automation/test/ruby/ruby_fix_1.rb b/.automation/test/ruby/ruby_fix_1.rb new file mode 100644 index 00000000000..4490da4ab92 --- /dev/null +++ b/.automation/test/ruby/ruby_fix_1.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +# Rails Console only +# This script will output all active webhooks currently being processed by an instance. +# Replace ARRAY_OF_URLS_CALLING_INSTANCE and GHES_URL with the appropriate values before running + +# Prior to running this script, compile a list of the top URLs containing the phrase webhook +# This should be ran prior to entering the Rails Console with the command: +# grep -B1 --no-group-separator 'Faraday::TimeoutError' hookshot-logs/resqued.log | sed -n 1~2p | +# \ grep -v 'Faraday::TimeoutError: request timed out' | sort | uniq -c |sort -rn | head -n 20 + +File.open("/tmp/urls.txt", "w") do |file| + Hook.active.map do |h| + urls = [ARRAY_OF_URLS_CALLING_INSTANCE] + next if urls.include? h.url + + begin + file.puts "https://GHES_URL/api/v3/repos/#{h.installation_target.full_name}/hooks/#{h.id}" + rescue StandardError => e + puts e.message + end + end +end diff --git a/.automation/test/swift/fix/.swiftlint.yml b/.automation/test/swift/fix/.swiftlint.yml new file mode 100644 index 00000000000..fa72f524612 --- /dev/null +++ b/.automation/test/swift/fix/.swiftlint.yml @@ -0,0 +1,10 @@ +included: + - Sources +line_length: 200 +disabled_rules: + - anonymous namespace + - identifier_name + - multiple_closures_with_trailing_closure + - trailing_comma + - trailing_newline + - vertical_whitespace diff --git a/.automation/test/swift/fix/LICENSE b/.automation/test/swift/fix/LICENSE new file mode 100644 index 00000000000..b907ae93289 --- /dev/null +++ b/.automation/test/swift/fix/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Suyeol Jeon (xoul.kr) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.automation/test/swift/fix/README.md b/.automation/test/swift/fix/README.md new file mode 100644 index 00000000000..2fb8bf1fca3 --- /dev/null +++ b/.automation/test/swift/fix/README.md @@ -0,0 +1,14 @@ +# SwiftUITodo + +SwiftUITodo is an example to-do list application using [SwiftUI](https://developer.apple.com/xcode/swiftui/) which is first introduced in WWDC19 keynote. + +![screenshot](https://user-images.githubusercontent.com/931655/58843349-f6dbf400-8626-11e9-8227-fbd369c29515.png) + +## Requirements + +* Xcode 11 Beta +* Swift 5.1 + +## License + +SwiftUITodo is under MIT license. See the [LICENSE](LICENSE) file for more info. diff --git a/.automation/test/swift/fix/Sources/AppDelegate.swift b/.automation/test/swift/fix/Sources/AppDelegate.swift new file mode 100644 index 00000000000..2d883d066df --- /dev/null +++ b/.automation/test/swift/fix/Sources/AppDelegate.swift @@ -0,0 +1,41 @@ +// +// AppDelegate.swift +// SwiftUITodo +// +// Created by Suyeol Jeon on 03/06/2019. +// Copyright Ā© 2019 Suyeol Jeon. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + func abc(a: String ,b: String) { } + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/.automation/test/swift/fix/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json b/.automation/test/swift/fix/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..b542ec24d24 --- /dev/null +++ b/.automation/test/swift/fix/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/.automation/test/swift/fix/Sources/Assets.xcassets/Contents.json b/.automation/test/swift/fix/Sources/Assets.xcassets/Contents.json new file mode 100644 index 00000000000..2d92bd53fdb --- /dev/null +++ b/.automation/test/swift/fix/Sources/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/.automation/test/swift/fix/Sources/Base.lproj/LaunchScreen.storyboard b/.automation/test/swift/fix/Sources/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000000..865e9329f37 --- /dev/null +++ b/.automation/test/swift/fix/Sources/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.automation/test/swift/fix/Sources/Info.plist b/.automation/test/swift/fix/Sources/Info.plist new file mode 100644 index 00000000000..e8bb4c651e8 --- /dev/null +++ b/.automation/test/swift/fix/Sources/Info.plist @@ -0,0 +1,62 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UILaunchStoryboardName + LaunchScreen + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/.automation/test/swift/fix/Sources/Preview Content/Preview Assets.xcassets/Contents.json b/.automation/test/swift/fix/Sources/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000000..da4a164c918 --- /dev/null +++ b/.automation/test/swift/fix/Sources/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/.automation/test/swift/fix/Sources/SceneDelegate.swift b/.automation/test/swift/fix/Sources/SceneDelegate.swift new file mode 100644 index 00000000000..443dfb16b8c --- /dev/null +++ b/.automation/test/swift/fix/Sources/SceneDelegate.swift @@ -0,0 +1,61 @@ +// +// SceneDelegate.swift +// SwiftUITodo +// +// Created by Suyeol Jeon on 03/06/2019. +// Copyright Ā© 2019 Suyeol Jeon. All rights reserved. +// + +import UIKit +import SwiftUI + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + + // Use a UIHostingController as window root view controller + let window = UIWindow(frame: UIScreen.main.bounds) + window.rootViewController = UIHostingController(rootView: NavigationView { + TaskListView().environmentObject(UserData()) + }) + self.window = window + window.makeKeyAndVisible() + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/.automation/test/swift/fix/Sources/Task.swift b/.automation/test/swift/fix/Sources/Task.swift new file mode 100644 index 00000000000..9f83bb01a76 --- /dev/null +++ b/.automation/test/swift/fix/Sources/Task.swift @@ -0,0 +1,21 @@ +// +// Task.swift +// SwiftUITodo +// +// Created by Suyeol Jeon on 03/06/2019. +// Copyright Ā© 2019 Suyeol Jeon. All rights reserved. +// + +import SwiftUI + +struct Task: Equatable, Hashable, Codable, Identifiable { + let id: UUID + var title: String + var isDone: Bool + + init(title: String, isDone: Bool) { + self.id = UUID() + self.title = title + self.isDone = isDone + } +} diff --git a/.automation/test/swift/fix/Sources/TaskEditView.swift b/.automation/test/swift/fix/Sources/TaskEditView.swift new file mode 100644 index 00000000000..81d3da206ab --- /dev/null +++ b/.automation/test/swift/fix/Sources/TaskEditView.swift @@ -0,0 +1,52 @@ +// +// TaskEditView.swift +// SwiftUITodo +// +// Created by Suyeol Jeon on 03/06/2019. +// Copyright Ā© 2019 Suyeol Jeon. All rights reserved. +// + +import SwiftUI + +struct TaskEditView: View { + @EnvironmentObject var userData: UserData + private let task: Task + private var draftTitle: State + + init(task: Task) { + self.task = task + self.draftTitle = .init(initialValue: task.title) + } + + var body: some View { + let inset = EdgeInsets(top: -8, leading: -10, bottom: -7, trailing: -10) + return VStack(alignment: .leading, spacing: 0) { + TextField( + self.draftTitle.binding, + placeholder: Text("Enter New Title..."), + onEditingChanged: { _ in self.updateTask() }, + onCommit: {} + ) + .background( + RoundedRectangle(cornerRadius: 5) + .fill(Color.clear) + .border(Color(red: 0.7, green: 0.7, blue: 0.7), width: 1 / UIScreen.main.scale, cornerRadius: 5) + .padding(inset) + ) + .padding(EdgeInsets( + top: 15 - inset.top, + leading: 20 - inset.leading, + bottom: 15 - inset.bottom, + trailing: 20 - inset.trailing + )) + + Spacer() + } + .navigationBarTitle(Text("Edit Task šŸ“")) + } + + private func updateTask() { + guard let index = self.userData.tasks.firstIndex(of: self.task) else { return } + self.userData.tasks[index].title = self.draftTitle.value + } +} diff --git a/.automation/test/swift/fix/Sources/TaskItemView.swift b/.automation/test/swift/fix/Sources/TaskItemView.swift new file mode 100644 index 00000000000..e9f9fddcc26 --- /dev/null +++ b/.automation/test/swift/fix/Sources/TaskItemView.swift @@ -0,0 +1,52 @@ +// +// TaskItemView.swift +// SwiftUITodo +// +// Created by Suyeol Jeon on 03/06/2019. +// Copyright Ā© 2019 Suyeol Jeon. All rights reserved. +// + +import SwiftUI + +struct TaskItemView: View { + @EnvironmentObject var userData: UserData + + let task: Task + @Binding var isEditing: Bool + + var body: some View { + return HStack { + if self.isEditing { + Image(systemName: "minus.circle") + .foregroundColor(.red) + .tapAction(count: 1) { + self.delete() + } + NavigationButton(destination: TaskEditView(task: task).environmentObject(self.userData)) { + Text(task.title) + } + } else { + Button(action: { self.toggleDone() }) { + Text(self.task.title) + } + Spacer() + if task.isDone { + Image(systemName: "checkmark").foregroundColor(.green) + } + } + } + } + + private func toggleDone() { + guard !self.isEditing else { return } + guard let index = self.userData.tasks.firstIndex(where: { $0.id == self.task.id }) else { return } + self.userData.tasks[index].isDone.toggle() + } + + private func delete() { + self.userData.tasks.removeAll(where: { $0.id == self.task.id }) + if self.userData.tasks.isEmpty { + self.isEditing = false + } + } +} diff --git a/.automation/test/swift/fix/Sources/TaskListView.swift b/.automation/test/swift/fix/Sources/TaskListView.swift new file mode 100644 index 00000000000..d76caf96d77 --- /dev/null +++ b/.automation/test/swift/fix/Sources/TaskListView.swift @@ -0,0 +1,38 @@ +// +// TaskListView.swift +// SwiftUITodo +// +// Created by Suyeol Jeon on 03/06/2019. +// Copyright Ā© 2019 Suyeol Jeon. All rights reserved. +// + +import SwiftUI + +struct TaskListView: View { + @EnvironmentObject var userData: UserData + @State var draftTitle: String = "" + @State var isEditing: Bool = false + + var body: some View { + List { + TextField($draftTitle, placeholder: Text("Create a New Task..."), onCommit: self.createTask) + ForEach(self.userData.tasks) { task in + TaskItemView(task: task, isEditing: self.$isEditing) + } + } + .navigationBarTitle(Text("Tasks šŸ‘€")) + .navigationBarItems(trailing: Button(action: { self.isEditing.toggle() }) { + if !self.isEditing { + Text("Edit") + } else { + Text("Done").bold() + } + }) + } + + private func createTask() { + let newTask = Task(title: self.draftTitle, isDone: false) + self.userData.tasks.insert(newTask, at: 0) + self.draftTitle = "" + } +} diff --git a/.automation/test/swift/fix/Sources/UserData.swift b/.automation/test/swift/fix/Sources/UserData.swift new file mode 100644 index 00000000000..368e9969645 --- /dev/null +++ b/.automation/test/swift/fix/Sources/UserData.swift @@ -0,0 +1,26 @@ +// +// UserData.swift +// SwiftUITodo +// +// Created by Suyeol Jeon on 03/06/2019. +// Copyright Ā© 2019 Suyeol Jeon. All rights reserved. +// + +import Combine +import SwiftUI + +private let defaultTasks: [Task] = [ + Task(title: "Read SwiftUI Documentation šŸ“š", isDone: false), + Task(title: "Watch WWDC19 Keynote šŸŽ‰", isDone: true), +] + +final class UserData: BindableObject { + let didChange = PassthroughSubject() + + @UserDefaultValue(key: "Tasks", defaultValue: defaultTasks) + var tasks: [Task] { + didSet { + didChange.send(self) + } + } +} diff --git a/.automation/test/typescript_prettier/typescript_fix_1.ts b/.automation/test/typescript_prettier/typescript_fix_1.ts new file mode 100644 index 00000000000..d208f88b84f --- /dev/null +++ b/.automation/test/typescript_prettier/typescript_fix_1.ts @@ -0,0 +1 @@ +const str: String = 'foo'; diff --git a/.automation/test/vbdotnet/fix/vb_projecty.vbproj b/.automation/test/vbdotnet/fix/vb_projecty.vbproj new file mode 100644 index 00000000000..3edb2ae4157 --- /dev/null +++ b/.automation/test/vbdotnet/fix/vb_projecty.vbproj @@ -0,0 +1,9 @@ + + + + Exe + vb_projecty + net6.0 + + + diff --git a/.automation/test/vbdotnet/fix/vbdotnet_fix_1.vb b/.automation/test/vbdotnet/fix/vbdotnet_fix_1.vb new file mode 100644 index 00000000000..5e0568e5b41 --- /dev/null +++ b/.automation/test/vbdotnet/fix/vbdotnet_fix_1.vb @@ -0,0 +1,7 @@ +Imports System + +Public Module Hello + Public Sub Main() + Console.WriteLine("hello, world") + End Sub +End Module diff --git a/.automation/test/vbdotnet/fix/vbdotnet_fix_2.vb b/.automation/test/vbdotnet/fix/vbdotnet_fix_2.vb new file mode 100644 index 00000000000..5e0568e5b41 --- /dev/null +++ b/.automation/test/vbdotnet/fix/vbdotnet_fix_2.vb @@ -0,0 +1,7 @@ +Imports System + +Public Module Hello + Public Sub Main() + Console.WriteLine("hello, world") + End Sub +End Module diff --git a/megalinter/descriptors/swift.megalinter-descriptor.yml b/megalinter/descriptors/swift.megalinter-descriptor.yml index b277589e16c..1e2746da2e7 100644 --- a/megalinter/descriptors/swift.megalinter-descriptor.yml +++ b/megalinter/descriptors/swift.megalinter-descriptor.yml @@ -37,7 +37,7 @@ linters: cli_lint_errors_regex: "Found ([0-9]+) violations" examples: - "docker run -v /tmp/lint:/tmp/lint:rw norionomura/swiftlint:latest swiftlint lint --path /tmp/lint --strict" - - "docker run -v /tmp/lint:/tmp/lint:rw norionomura/swiftlint:latest swiftlint autocorrect --path /tmp/lint --strict" + - "docker run -v /tmp/lint:/tmp/lint:rw norionomura/swiftlint:latest swiftlint --fix --path /tmp/lint --strict" ide: atom: - name: linter-swiftlint diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index dcae6f6c275..2e8ec8f32dc 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -689,4 +689,4 @@ def test_linter_format_fix(linter, test_self): ] assert (len(list(diffs))) > 0, f"No changes in the {file} file" - repo.index.checkout([os.path.join(linter.github_workspace, file)], force=True) + repo.index.checkout([os.path.join(os.path.realpath(REPO_HOME), file)], force=True) From aaaba6a35022c971b4f61a60437886095ef4464b Mon Sep 17 00:00:00 2001 From: bdovaz Date: Sun, 29 Jan 2023 23:05:48 +0000 Subject: [PATCH 33/63] [MegaLinter] Apply linters fixes --- megalinter/tests/test_megalinter/helpers/utilstest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 2e8ec8f32dc..6763cb5659e 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -689,4 +689,6 @@ def test_linter_format_fix(linter, test_self): ] assert (len(list(diffs))) > 0, f"No changes in the {file} file" - repo.index.checkout([os.path.join(os.path.realpath(REPO_HOME), file)], force=True) + repo.index.checkout( + [os.path.join(os.path.realpath(REPO_HOME), file)], force=True + ) From bf1a2b0796319fe0448bd9731a34c347237be23f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Mon, 30 Jan 2023 17:53:21 +0100 Subject: [PATCH 34/63] Fix npm-groovy-lint behaviour --- megalinter/descriptors/groovy.megalinter-descriptor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/megalinter/descriptors/groovy.megalinter-descriptor.yml b/megalinter/descriptors/groovy.megalinter-descriptor.yml index 8673c1c07bf..98d01c8a720 100644 --- a/megalinter/descriptors/groovy.megalinter-descriptor.yml +++ b/megalinter/descriptors/groovy.megalinter-descriptor.yml @@ -24,6 +24,9 @@ linters: linter_megalinter_ref_url: https://nvuillam.github.io/npm-groovy-lint/#mega-linter cli_lint_mode: list_of_files config_file_name: .groovylintrc.json + cli_lint_extra_args: + - --failon + - error cli_sarif_args: - --output - sarif From 787780cccff1df0787e17995471633e9382ea222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Mon, 30 Jan 2023 19:07:45 +0100 Subject: [PATCH 35/63] Add missing linters to workflows --- .automation/build.py | 28 +++++++ .github/workflows/deploy-BETA-linters.yml | 85 ++++++++++++++++++++ .github/workflows/deploy-DEV-linters.yml | 85 ++++++++++++++++++++ .github/workflows/deploy-RELEASE-linters.yml | 85 ++++++++++++++++++++ 4 files changed, 283 insertions(+) diff --git a/.automation/build.py b/.automation/build.py index 3992283c371..50eabaff031 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -3020,6 +3020,33 @@ def update_dependents_info(): logging.info("Running command: " + " ".join(command)) os.system(" ".join(command)) +def update_workflows_linters(): + descriptors, _ = list_descriptors_for_build() + + linters = "" + + for descriptor in descriptors: + for linter in descriptor['linters']: + if 'name' in linter: + name = linter['name'].lower() + else: + lang_lower = descriptor['descriptor_id'].lower() + linter_name_lower = linter['linter_name'].lower().replace("-", "_") + name = f"{lang_lower}_{linter_name_lower}" + + linters += f" \"{name}\",\n" + + update_workflow_linters('.github/workflows/deploy-DEV-linters.yml', linters) + update_workflow_linters('.github/workflows/deploy-BETA-linters.yml', linters) + update_workflow_linters('.github/workflows/deploy-RELEASE-linters.yml', linters) + +def update_workflow_linters(file_path, linters): + with open(file_path, "r", encoding="utf-8") as f: + file_content = f.read() + file_content = re.sub(r"(linter:\s+\[\s*)([^\[\]]*?)(\s*\])", rf"\1{re.escape(linters).replace(chr(92),'').strip()}\3", file_content) + + with open(file_path, "w") as f: + f.write(file_content) if __name__ == "__main__": try: @@ -3040,6 +3067,7 @@ def update_dependents_info(): collect_linter_previews() generate_json_schema_enums() validate_descriptors() + update_workflows_linters() if UPDATE_DEPENDENTS is True: update_dependents_info() generate_all_flavors() diff --git a/.github/workflows/deploy-BETA-linters.yml b/.github/workflows/deploy-BETA-linters.yml index 5afb6ed8119..f1952069bd0 100644 --- a/.github/workflows/deploy-BETA-linters.yml +++ b/.github/workflows/deploy-BETA-linters.yml @@ -68,33 +68,118 @@ jobs: # linters-start linter: [ + "action_actionlint", "ansible_ansible_lint", + "arm_arm_ttk", + "bash_exec", "bash_shellcheck", + "bash_shfmt", + "bicep_bicep_linter", + "c_cpplint", + "clojure_clj_kondo", "cloudformation_cfn_lint", + "coffee_coffeelint", + "copypaste_jscpd", + "cpp_cpplint", + "csharp_dotnet_format", + "csharp_csharpier", + "css_stylelint", + "css_scss_lint", + "dart_dartanalyzer", "dockerfile_hadolint", + "editorconfig_editorconfig_checker", + "env_dotenv_linter", + "gherkin_gherkin_lint", + "go_golangci_lint", "go_revive", + "graphql_graphql_schema_linter", "groovy_npm_groovy_lint", + "html_djlint", + "html_htmlhint", "java_checkstyle", "java_pmd", "javascript_es", + "javascript_standard", + "javascript_prettier", + "json_jsonlint", "json_eslint_plugin_jsonc", + "json_v8r", + "json_prettier", + "json_npm_package_json_lint", "jsx_eslint", "kotlin_ktlint", + "kubernetes_kubeval", + "kubernetes_kubeconform", + "latex_chktex", + "lua_luacheck", + "makefile_checkmake", + "markdown_markdownlint", + "markdown_remark_lint", + "markdown_markdown_link_check", + "markdown_markdown_table_formatter", + "openapi_spectral", + "perl_perlcritic", + "php_phpcs", + "php_phpstan", "php_psalm", + "php_phplint", + "powershell_powershell", + "powershell_powershell_formatter", + "protobuf_protolint", + "puppet_puppet_lint", + "python_pylint", + "python_black", + "python_flake8", + "python_isort", "python_bandit", + "python_mypy", + "python_pyright", + "r_lintr", + "raku_raku", "repository_checkov", "repository_devskim", "repository_dustilock", + "repository_git_diff", "repository_gitleaks", + "repository_goodcheck", "repository_secretlint", "repository_semgrep", "repository_syft", "repository_trivy", + "rst_rst_lint", + "rst_rstcheck", + "rst_rstfmt", + "ruby_rubocop", + "rust_clippy", + "salesforce_sfdx_scanner_apex", + "salesforce_sfdx_scanner_aura", + "salesforce_sfdx_scanner_lwc", + "scala_scalafix", + "snakemake_lint", + "snakemake_snakefmt", + "spell_misspell", + "spell_cspell", + "spell_proselint", + "sql_sql_lint", + "sql_sqlfluff", + "sql_tsqllint", + "swift_swiftlint", + "tekton_tekton_lint", "terraform_tflint", "terraform_terrascan", + "terraform_terragrunt", + "terraform_terraform_fmt", "terraform_checkov", + "terraform_kics", "tsx_eslint", "typescript_es", + "typescript_standard", + "typescript_prettier", + "vbdotnet_dotnet_format", + "xml_xmllint", + "yaml_prettier", + "yaml_yamllint", + "yaml_v8r", ] # linters-end # Only run this on the main repo diff --git a/.github/workflows/deploy-DEV-linters.yml b/.github/workflows/deploy-DEV-linters.yml index 097e5eb17c3..bb0ae0dee7c 100644 --- a/.github/workflows/deploy-DEV-linters.yml +++ b/.github/workflows/deploy-DEV-linters.yml @@ -55,33 +55,118 @@ jobs: # linters-start linter: [ + "action_actionlint", "ansible_ansible_lint", + "arm_arm_ttk", + "bash_exec", "bash_shellcheck", + "bash_shfmt", + "bicep_bicep_linter", + "c_cpplint", + "clojure_clj_kondo", "cloudformation_cfn_lint", + "coffee_coffeelint", + "copypaste_jscpd", + "cpp_cpplint", + "csharp_dotnet_format", + "csharp_csharpier", + "css_stylelint", + "css_scss_lint", + "dart_dartanalyzer", "dockerfile_hadolint", + "editorconfig_editorconfig_checker", + "env_dotenv_linter", + "gherkin_gherkin_lint", + "go_golangci_lint", "go_revive", + "graphql_graphql_schema_linter", "groovy_npm_groovy_lint", + "html_djlint", + "html_htmlhint", "java_checkstyle", "java_pmd", "javascript_es", + "javascript_standard", + "javascript_prettier", + "json_jsonlint", "json_eslint_plugin_jsonc", + "json_v8r", + "json_prettier", + "json_npm_package_json_lint", "jsx_eslint", "kotlin_ktlint", + "kubernetes_kubeval", + "kubernetes_kubeconform", + "latex_chktex", + "lua_luacheck", + "makefile_checkmake", + "markdown_markdownlint", + "markdown_remark_lint", + "markdown_markdown_link_check", + "markdown_markdown_table_formatter", + "openapi_spectral", + "perl_perlcritic", + "php_phpcs", + "php_phpstan", "php_psalm", + "php_phplint", + "powershell_powershell", + "powershell_powershell_formatter", + "protobuf_protolint", + "puppet_puppet_lint", + "python_pylint", + "python_black", + "python_flake8", + "python_isort", "python_bandit", + "python_mypy", + "python_pyright", + "r_lintr", + "raku_raku", "repository_checkov", "repository_devskim", "repository_dustilock", + "repository_git_diff", "repository_gitleaks", + "repository_goodcheck", "repository_secretlint", "repository_semgrep", "repository_syft", "repository_trivy", + "rst_rst_lint", + "rst_rstcheck", + "rst_rstfmt", + "ruby_rubocop", + "rust_clippy", + "salesforce_sfdx_scanner_apex", + "salesforce_sfdx_scanner_aura", + "salesforce_sfdx_scanner_lwc", + "scala_scalafix", + "snakemake_lint", + "snakemake_snakefmt", + "spell_misspell", + "spell_cspell", + "spell_proselint", + "sql_sql_lint", + "sql_sqlfluff", + "sql_tsqllint", + "swift_swiftlint", + "tekton_tekton_lint", "terraform_tflint", "terraform_terrascan", + "terraform_terragrunt", + "terraform_terraform_fmt", "terraform_checkov", + "terraform_kics", "tsx_eslint", "typescript_es", + "typescript_standard", + "typescript_prettier", + "vbdotnet_dotnet_format", + "xml_xmllint", + "yaml_prettier", + "yaml_yamllint", + "yaml_v8r", ] # linters-end # Only run this on the main repo diff --git a/.github/workflows/deploy-RELEASE-linters.yml b/.github/workflows/deploy-RELEASE-linters.yml index af8b178414d..b48ac4e933f 100644 --- a/.github/workflows/deploy-RELEASE-linters.yml +++ b/.github/workflows/deploy-RELEASE-linters.yml @@ -44,33 +44,118 @@ jobs: # linters-start linter: [ + "action_actionlint", "ansible_ansible_lint", + "arm_arm_ttk", + "bash_exec", "bash_shellcheck", + "bash_shfmt", + "bicep_bicep_linter", + "c_cpplint", + "clojure_clj_kondo", "cloudformation_cfn_lint", + "coffee_coffeelint", + "copypaste_jscpd", + "cpp_cpplint", + "csharp_dotnet_format", + "csharp_csharpier", + "css_stylelint", + "css_scss_lint", + "dart_dartanalyzer", "dockerfile_hadolint", + "editorconfig_editorconfig_checker", + "env_dotenv_linter", + "gherkin_gherkin_lint", + "go_golangci_lint", "go_revive", + "graphql_graphql_schema_linter", "groovy_npm_groovy_lint", + "html_djlint", + "html_htmlhint", "java_checkstyle", "java_pmd", "javascript_es", + "javascript_standard", + "javascript_prettier", + "json_jsonlint", "json_eslint_plugin_jsonc", + "json_v8r", + "json_prettier", + "json_npm_package_json_lint", "jsx_eslint", "kotlin_ktlint", + "kubernetes_kubeval", + "kubernetes_kubeconform", + "latex_chktex", + "lua_luacheck", + "makefile_checkmake", + "markdown_markdownlint", + "markdown_remark_lint", + "markdown_markdown_link_check", + "markdown_markdown_table_formatter", + "openapi_spectral", + "perl_perlcritic", + "php_phpcs", + "php_phpstan", "php_psalm", + "php_phplint", + "powershell_powershell", + "powershell_powershell_formatter", + "protobuf_protolint", + "puppet_puppet_lint", + "python_pylint", + "python_black", + "python_flake8", + "python_isort", "python_bandit", + "python_mypy", + "python_pyright", + "r_lintr", + "raku_raku", "repository_checkov", "repository_devskim", "repository_dustilock", + "repository_git_diff", "repository_gitleaks", + "repository_goodcheck", "repository_secretlint", "repository_semgrep", "repository_syft", "repository_trivy", + "rst_rst_lint", + "rst_rstcheck", + "rst_rstfmt", + "ruby_rubocop", + "rust_clippy", + "salesforce_sfdx_scanner_apex", + "salesforce_sfdx_scanner_aura", + "salesforce_sfdx_scanner_lwc", + "scala_scalafix", + "snakemake_lint", + "snakemake_snakefmt", + "spell_misspell", + "spell_cspell", + "spell_proselint", + "sql_sql_lint", + "sql_sqlfluff", + "sql_tsqllint", + "swift_swiftlint", + "tekton_tekton_lint", "terraform_tflint", "terraform_terrascan", + "terraform_terragrunt", + "terraform_terraform_fmt", "terraform_checkov", + "terraform_kics", "tsx_eslint", "typescript_es", + "typescript_standard", + "typescript_prettier", + "vbdotnet_dotnet_format", + "xml_xmllint", + "yaml_prettier", + "yaml_yamllint", + "yaml_v8r", ] # linters-end # Only run this on the main repo From 7fee71c819a4938d0fe6fe7117572e93983884a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Mon, 30 Jan 2023 22:20:27 +0100 Subject: [PATCH 36/63] Add input files --- .automation/test/markdown/markdown_fix_1.md | 25 +++++++++++++++++++ .automation/test/markdown/markdown_fix_2.md | 25 +++++++++++++++++++ .../test/protobuf/protobuf_fix_1.proto | 18 +++++++++++++ .automation/test/puppet/puppet_fix_1.pp | 9 +++++++ .automation/test/rst_rstfmt/rst_fix_1.rst | 5 ++++ .../test/snakemake/snakemake_fix_1.smk | 18 +++++++++++++ .../test/terraform_fmt/terraform_fmt_fix_1.tf | 11 ++++++++ .../terraform_terragrunt/terragrunt_fix_1.hcl | 18 +++++++++++++ 8 files changed, 129 insertions(+) create mode 100644 .automation/test/markdown/markdown_fix_1.md create mode 100644 .automation/test/markdown/markdown_fix_2.md create mode 100644 .automation/test/protobuf/protobuf_fix_1.proto create mode 100644 .automation/test/puppet/puppet_fix_1.pp create mode 100644 .automation/test/rst_rstfmt/rst_fix_1.rst create mode 100644 .automation/test/snakemake/snakemake_fix_1.smk create mode 100644 .automation/test/terraform_fmt/terraform_fmt_fix_1.tf create mode 100644 .automation/test/terraform_terragrunt/terragrunt_fix_1.hcl diff --git a/.automation/test/markdown/markdown_fix_1.md b/.automation/test/markdown/markdown_fix_1.md new file mode 100644 index 00000000000..8b721eca790 --- /dev/null +++ b/.automation/test/markdown/markdown_fix_1.md @@ -0,0 +1,25 @@ +# Good Markdown + +This is just standard good markdown. + +## Second level header + +This header follows the step down from `level 1`. + +- Here it *is* + - Some more **indention** + - why so much? + +```bash +ls -la +``` + +| this | is a good | table | +|------|-----------|------------------| +| haha | yesssssss | good ! | +| haha | yesssssss | gooood ! | + +### Walk away + +We're all done **here**. +- [Link Action](https://github.com) diff --git a/.automation/test/markdown/markdown_fix_2.md b/.automation/test/markdown/markdown_fix_2.md new file mode 100644 index 00000000000..8b721eca790 --- /dev/null +++ b/.automation/test/markdown/markdown_fix_2.md @@ -0,0 +1,25 @@ +# Good Markdown + +This is just standard good markdown. + +## Second level header + +This header follows the step down from `level 1`. + +- Here it *is* + - Some more **indention** + - why so much? + +```bash +ls -la +``` + +| this | is a good | table | +|------|-----------|------------------| +| haha | yesssssss | good ! | +| haha | yesssssss | gooood ! | + +### Walk away + +We're all done **here**. +- [Link Action](https://github.com) diff --git a/.automation/test/protobuf/protobuf_fix_1.proto b/.automation/test/protobuf/protobuf_fix_1.proto new file mode 100644 index 00000000000..345ff44cf5c --- /dev/null +++ b/.automation/test/protobuf/protobuf_fix_1.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +import public "other.proto"; +option java_package = "com.example.foo"; +enum EnumAllowingAlias { + option allow_alias = true; + ENUM_ALLOWING_ALIAS_ALLOWING_UNSPECIFIED = 0; + ENUM_ALLOWING_ALIAS_STARTED = 1; + ENUM_ALLOWING_ALIAS_RUNNING = 2 [(custom_option) = "hello world"]; +} +message Outer { + option (my_option).a = true; + message Inner { // Level 2 + int64 ival = 1; + } + inner inner_message = 2; + EnumAllowingAlias enum_field =3; + map my_map = 4; +} diff --git a/.automation/test/puppet/puppet_fix_1.pp b/.automation/test/puppet/puppet_fix_1.pp new file mode 100644 index 00000000000..1851341288f --- /dev/null +++ b/.automation/test/puppet/puppet_fix_1.pp @@ -0,0 +1,9 @@ +# This is a class documentation :) +class foo { + + $bar = 'bar' + + $gronk = 'gronk' + + $this_line = "I mean, a really, really long line like you can't believe" +} diff --git a/.automation/test/rst_rstfmt/rst_fix_1.rst b/.automation/test/rst_rstfmt/rst_fix_1.rst new file mode 100644 index 00000000000..227f2877ac3 --- /dev/null +++ b/.automation/test/rst_rstfmt/rst_fix_1.rst @@ -0,0 +1,5 @@ +####### + Hello +####### + +World diff --git a/.automation/test/snakemake/snakemake_fix_1.smk b/.automation/test/snakemake/snakemake_fix_1.smk new file mode 100644 index 00000000000..132f9b59fe1 --- /dev/null +++ b/.automation/test/snakemake/snakemake_fix_1.smk @@ -0,0 +1,18 @@ +SAMPLES = ['s1', 's2'] + +rule all: + input: + file1="result.txt", + + +rule simulation: + output: + file1="result.txt", + log: + "logs/simulation.log", + conda: + "envs/simulation.yml" + shell: + """ + touch {output} + """ diff --git a/.automation/test/terraform_fmt/terraform_fmt_fix_1.tf b/.automation/test/terraform_fmt/terraform_fmt_fix_1.tf new file mode 100644 index 00000000000..d48fe2180b0 --- /dev/null +++ b/.automation/test/terraform_fmt/terraform_fmt_fix_1.tf @@ -0,0 +1,11 @@ +resource "aws_instance" "good" { +ami = "ami-0ff8a91507f77f867" + instance_type = "t2.small" + associate_public_ip_address = false + + vpc_security_group_ids = ["sg-12345678901234567"] + + ebs_block_device { + encrypted = true + } +} diff --git a/.automation/test/terraform_terragrunt/terragrunt_fix_1.hcl b/.automation/test/terraform_terragrunt/terragrunt_fix_1.hcl new file mode 100644 index 00000000000..6f58bc8f731 --- /dev/null +++ b/.automation/test/terraform_terragrunt/terragrunt_fix_1.hcl @@ -0,0 +1,18 @@ +include { + path = find_in_parent_folders() +} + +remote_state { + backend = "s3" + generate = { + path = "backend.tf" + if_exists = "overwrite" + } + config = { +bucket = "my-terraform-state" + key = "${path_relative_to_include()}/terraform.tfstate" + region = "us-east-1" + encrypt = true + dynamodb_table = "my-lock-table" + } +} From 81a4cecdcc08cb6234da80222efddd8cea576aa7 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Mon, 30 Jan 2023 18:12:10 +0000 Subject: [PATCH 37/63] [MegaLinter] Apply linters fixes --- .automation/build.py | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.automation/build.py b/.automation/build.py index 50eabaff031..cd8bed49775 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -3020,34 +3020,41 @@ def update_dependents_info(): logging.info("Running command: " + " ".join(command)) os.system(" ".join(command)) + def update_workflows_linters(): descriptors, _ = list_descriptors_for_build() linters = "" for descriptor in descriptors: - for linter in descriptor['linters']: - if 'name' in linter: - name = linter['name'].lower() + for linter in descriptor["linters"]: + if "name" in linter: + name = linter["name"].lower() else: - lang_lower = descriptor['descriptor_id'].lower() - linter_name_lower = linter['linter_name'].lower().replace("-", "_") + lang_lower = descriptor["descriptor_id"].lower() + linter_name_lower = linter["linter_name"].lower().replace("-", "_") name = f"{lang_lower}_{linter_name_lower}" - linters += f" \"{name}\",\n" + linters += f' "{name}",\n' + + update_workflow_linters(".github/workflows/deploy-DEV-linters.yml", linters) + update_workflow_linters(".github/workflows/deploy-BETA-linters.yml", linters) + update_workflow_linters(".github/workflows/deploy-RELEASE-linters.yml", linters) - update_workflow_linters('.github/workflows/deploy-DEV-linters.yml', linters) - update_workflow_linters('.github/workflows/deploy-BETA-linters.yml', linters) - update_workflow_linters('.github/workflows/deploy-RELEASE-linters.yml', linters) def update_workflow_linters(file_path, linters): with open(file_path, "r", encoding="utf-8") as f: file_content = f.read() - file_content = re.sub(r"(linter:\s+\[\s*)([^\[\]]*?)(\s*\])", rf"\1{re.escape(linters).replace(chr(92),'').strip()}\3", file_content) + file_content = re.sub( + r"(linter:\s+\[\s*)([^\[\]]*?)(\s*\])", + rf"\1{re.escape(linters).replace(chr(92),'').strip()}\3", + file_content, + ) with open(file_path, "w") as f: f.write(file_content) + if __name__ == "__main__": try: logging.basicConfig( From 1e93c5b5b7a2175445a46b33fe0061f8dc457bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Tue, 31 Jan 2023 23:04:08 +0100 Subject: [PATCH 38/63] Generate all linters Dockerfile --- .automation/build.py | 13 +- docs/standalone-linters.md | 143 ++++++++--- linters/action_actionlint/Dockerfile | 134 +++++++---- linters/arm_arm_ttk/Dockerfile | 132 ++++++---- linters/bash_exec/Dockerfile | 131 ++++++---- linters/bash_shfmt/Dockerfile | 136 +++++++---- linters/bicep_bicep_linter/Dockerfile | 214 +++++++++++++++++ linters/c_cpplint/Dockerfile | 138 +++++++---- linters/clojure_clj_kondo/Dockerfile | 136 +++++++---- linters/coffee_coffeelint/Dockerfile | 153 ++++++++---- linters/copypaste_jscpd/Dockerfile | 152 ++++++++---- linters/cpp_cpplint/Dockerfile | 138 +++++++---- linters/csharp_csharpier/Dockerfile | 224 +++++++++++++++++ linters/csharp_dotnet_format/Dockerfile | 135 +++++++---- linters/css_scss_lint/Dockerfile | 132 ++++++---- linters/css_stylelint/Dockerfile | 153 ++++++++---- linters/dart_dartanalyzer/Dockerfile | 132 ++++++---- .../Dockerfile | 140 ++++++----- linters/env_dotenv_linter/Dockerfile | 132 ++++++---- linters/gherkin_gherkin_lint/Dockerfile | 153 ++++++++---- linters/go_golangci_lint/Dockerfile | 132 ++++++---- .../graphql_graphql_schema_linter/Dockerfile | 154 ++++++++---- linters/html_djlint/Dockerfile | 210 ++++++++++++++++ linters/html_htmlhint/Dockerfile | 153 ++++++++---- linters/javascript_prettier/Dockerfile | 153 ++++++++---- linters/javascript_standard/Dockerfile | 153 ++++++++---- linters/json_jsonlint/Dockerfile | 153 ++++++++---- linters/json_npm_package_json_lint/Dockerfile | 227 ++++++++++++++++++ linters/json_prettier/Dockerfile | 153 ++++++++---- linters/json_v8r/Dockerfile | 153 ++++++++---- linters/kubernetes_kubeconform/Dockerfile | 217 +++++++++++++++++ linters/kubernetes_kubeval/Dockerfile | 142 +++++++---- linters/latex_chktex/Dockerfile | 136 +++++++---- linters/lua_luacheck/Dockerfile | 135 +++++++---- linters/makefile_checkmake/Dockerfile | 212 ++++++++++++++++ .../markdown_markdown_link_check/Dockerfile | 153 ++++++++---- .../Dockerfile | 153 ++++++++---- linters/markdown_markdownlint/Dockerfile | 153 ++++++++---- linters/markdown_remark_lint/Dockerfile | 153 ++++++++---- linters/openapi_spectral/Dockerfile | 153 ++++++++---- linters/perl_perlcritic/Dockerfile | 132 ++++++---- linters/php_phpcs/Dockerfile | 165 +++++++------ linters/php_phplint/Dockerfile | 168 +++++++------ linters/php_phpstan/Dockerfile | 165 +++++++------ linters/powershell_powershell/Dockerfile | 138 +++++++---- .../Dockerfile | 223 +++++++++++++++++ linters/protobuf_protolint/Dockerfile | 134 +++++++---- linters/puppet_puppet_lint/Dockerfile | 132 ++++++---- linters/python_black/Dockerfile | 138 +++++++---- linters/python_flake8/Dockerfile | 138 +++++++---- linters/python_isort/Dockerfile | 139 +++++++---- linters/python_mypy/Dockerfile | 138 +++++++---- linters/python_pylint/Dockerfile | 138 +++++++---- linters/python_pyright/Dockerfile | 210 ++++++++++++++++ linters/r_lintr/Dockerfile | 149 ++++++++---- linters/raku_raku/Dockerfile | 132 ++++++---- linters/repository_git_diff/Dockerfile | 132 ++++++---- linters/repository_goodcheck/Dockerfile | 132 ++++++---- linters/rst_rst_lint/Dockerfile | 138 +++++++---- linters/rst_rstcheck/Dockerfile | 138 +++++++---- linters/rst_rstfmt/Dockerfile | 139 +++++++---- linters/ruby_rubocop/Dockerfile | 142 ++++++----- linters/rust_clippy/Dockerfile | 140 ++++++----- .../salesforce_sfdx_scanner_apex/Dockerfile | 166 ++++++++----- .../salesforce_sfdx_scanner_aura/Dockerfile | 166 ++++++++----- .../salesforce_sfdx_scanner_lwc/Dockerfile | 166 ++++++++----- linters/scala_scalafix/Dockerfile | 137 +++++++---- linters/snakemake_lint/Dockerfile | 138 +++++++---- linters/snakemake_snakefmt/Dockerfile | 138 +++++++---- linters/spell_cspell/Dockerfile | 153 ++++++++---- linters/spell_misspell/Dockerfile | 140 +++++++---- linters/spell_proselint/Dockerfile | 210 ++++++++++++++++ linters/sql_sql_lint/Dockerfile | 153 ++++++++---- linters/sql_sqlfluff/Dockerfile | 138 +++++++---- linters/sql_tsqllint/Dockerfile | 132 ++++++---- linters/swift_swiftlint/Dockerfile | 132 ++++++---- linters/tekton_tekton_lint/Dockerfile | 153 ++++++++---- linters/terraform_kics/Dockerfile | 137 +++++++---- linters/terraform_terraform_fmt/Dockerfile | 134 +++++++---- linters/terraform_terragrunt/Dockerfile | 134 +++++++---- linters/typescript_prettier/Dockerfile | 153 ++++++++---- linters/typescript_standard/Dockerfile | 155 ++++++++---- linters/vbdotnet_dotnet_format/Dockerfile | 132 ++++++---- linters/xml_xmllint/Dockerfile | 132 ++++++---- linters/yaml_prettier/Dockerfile | 153 ++++++++---- linters/yaml_v8r/Dockerfile | 153 ++++++++---- linters/yaml_yamllint/Dockerfile | 138 +++++++---- 87 files changed, 9030 insertions(+), 3982 deletions(-) create mode 100644 linters/bicep_bicep_linter/Dockerfile create mode 100644 linters/csharp_csharpier/Dockerfile create mode 100644 linters/html_djlint/Dockerfile create mode 100644 linters/json_npm_package_json_lint/Dockerfile create mode 100644 linters/kubernetes_kubeconform/Dockerfile create mode 100644 linters/makefile_checkmake/Dockerfile create mode 100644 linters/powershell_powershell_formatter/Dockerfile create mode 100644 linters/python_pyright/Dockerfile create mode 100644 linters/spell_proselint/Dockerfile diff --git a/.automation/build.py b/.automation/build.py index cd8bed49775..4c4e6ef00dd 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -7,6 +7,7 @@ import logging import os import re +import shutil import subprocess import sys from datetime import date, datetime @@ -554,6 +555,9 @@ def match_flavor(item, flavor, flavor_info): # Automatically generate Dockerfile for standalone linters def generate_linter_dockerfiles(): + # Remove all the contents of LINTERS_DIR beforehand so that the result is deterministic + shutil.rmtree(os.path.realpath(LINTERS_DIR)) + os.makedirs(os.path.realpath(LINTERS_DIR)) # Browse descriptors linters_md = "# Standalone linter docker images\n\n" linters_md += "| Linter key | Docker image | Size |\n" @@ -572,8 +576,8 @@ def generate_linter_dockerfiles(): # Browse descriptor linters for linter in descriptor_linters: # Do not build standalone linter if it does not manage SARIF - if linter.can_output_sarif is False: - continue + #if linter.can_output_sarif is False: + # continue # Unique linter dockerfile linter_lower_name = linter.name.lower() dockerfile = f"{LINTERS_DIR}/{linter_lower_name}/Dockerfile" @@ -3028,6 +3032,9 @@ def update_workflows_linters(): for descriptor in descriptors: for linter in descriptor["linters"]: + #if "can_output_sarif" not in linter or linter["can_output_sarif"] is False: + # continue + if "name" in linter: name = linter["name"].lower() else: @@ -3074,12 +3081,12 @@ def update_workflow_linters(file_path, linters): collect_linter_previews() generate_json_schema_enums() validate_descriptors() - update_workflows_linters() if UPDATE_DEPENDENTS is True: update_dependents_info() generate_all_flavors() generate_linter_dockerfiles() generate_linter_test_classes() + update_workflows_linters() if UPDATE_DOC is True: logging.info("Running documentation generators...") # refresh_users_info() # deprecated since now we use github-dependents-info diff --git a/docs/standalone-linters.md b/docs/standalone-linters.md index 02ac8085e2c..ff07b84b85f 100644 --- a/docs/standalone-linters.md +++ b/docs/standalone-linters.md @@ -1,32 +1,117 @@ # Standalone linter docker images -| Linter key | Docker image | Size | -|:-------------------------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------:| -| ANSIBLE_ANSIBLE_LINT | oxsecurity/megalinter-only-ansible_ansible_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-ansible_ansible_lint/beta) | -| BASH_SHELLCHECK | oxsecurity/megalinter-only-bash_shellcheck:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-bash_shellcheck/beta) | -| CLOUDFORMATION_CFN_LINT | oxsecurity/megalinter-only-cloudformation_cfn_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-cloudformation_cfn_lint/beta) | -| DOCKERFILE_HADOLINT | oxsecurity/megalinter-only-dockerfile_hadolint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-dockerfile_hadolint/beta) | -| GO_REVIVE | oxsecurity/megalinter-only-go_revive:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-go_revive/beta) | -| GROOVY_NPM_GROOVY_LINT | oxsecurity/megalinter-only-groovy_npm_groovy_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-groovy_npm_groovy_lint/beta) | -| JAVA_CHECKSTYLE | oxsecurity/megalinter-only-java_checkstyle:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-java_checkstyle/beta) | -| JAVA_PMD | oxsecurity/megalinter-only-java_pmd:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-java_pmd/beta) | -| JAVASCRIPT_ES | oxsecurity/megalinter-only-javascript_es:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-javascript_es/beta) | -| JSON_ESLINT_PLUGIN_JSONC | oxsecurity/megalinter-only-json_eslint_plugin_jsonc:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-json_eslint_plugin_jsonc/beta) | -| JSX_ESLINT | oxsecurity/megalinter-only-jsx_eslint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-jsx_eslint/beta) | -| KOTLIN_KTLINT | oxsecurity/megalinter-only-kotlin_ktlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-kotlin_ktlint/beta) | -| PHP_PSALM | oxsecurity/megalinter-only-php_psalm:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-php_psalm/beta) | -| PYTHON_BANDIT | oxsecurity/megalinter-only-python_bandit:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-python_bandit/beta) | -| REPOSITORY_CHECKOV | oxsecurity/megalinter-only-repository_checkov:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_checkov/beta) | -| REPOSITORY_DEVSKIM | oxsecurity/megalinter-only-repository_devskim:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_devskim/beta) | -| REPOSITORY_DUSTILOCK | oxsecurity/megalinter-only-repository_dustilock:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_dustilock/beta) | -| REPOSITORY_GITLEAKS | oxsecurity/megalinter-only-repository_gitleaks:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_gitleaks/beta) | -| REPOSITORY_SECRETLINT | oxsecurity/megalinter-only-repository_secretlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_secretlint/beta) | -| REPOSITORY_SEMGREP | oxsecurity/megalinter-only-repository_semgrep:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_semgrep/beta) | -| REPOSITORY_SYFT | oxsecurity/megalinter-only-repository_syft:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_syft/beta) | -| REPOSITORY_TRIVY | oxsecurity/megalinter-only-repository_trivy:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_trivy/beta) | -| TERRAFORM_TFLINT | oxsecurity/megalinter-only-terraform_tflint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-terraform_tflint/beta) | -| TERRAFORM_TERRASCAN | oxsecurity/megalinter-only-terraform_terrascan:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-terraform_terrascan/beta) | -| TERRAFORM_CHECKOV | oxsecurity/megalinter-only-terraform_checkov:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-terraform_checkov/beta) | -| TSX_ESLINT | oxsecurity/megalinter-only-tsx_eslint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-tsx_eslint/beta) | -| TYPESCRIPT_ES | oxsecurity/megalinter-only-typescript_es:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-typescript_es/beta) | +| Linter key | Docker image | Size | +|:----------------------------------|:------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------:| +| ACTION_ACTIONLINT | oxsecurity/megalinter-only-action_actionlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-action_actionlint/beta) | +| ANSIBLE_ANSIBLE_LINT | oxsecurity/megalinter-only-ansible_ansible_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-ansible_ansible_lint/beta) | +| ARM_ARM_TTK | oxsecurity/megalinter-only-arm_arm_ttk:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-arm_arm_ttk/beta) | +| BASH_EXEC | oxsecurity/megalinter-only-bash_exec:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-bash_exec/beta) | +| BASH_SHELLCHECK | oxsecurity/megalinter-only-bash_shellcheck:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-bash_shellcheck/beta) | +| BASH_SHFMT | oxsecurity/megalinter-only-bash_shfmt:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-bash_shfmt/beta) | +| BICEP_BICEP_LINTER | oxsecurity/megalinter-only-bicep_bicep_linter:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-bicep_bicep_linter/beta) | +| C_CPPLINT | oxsecurity/megalinter-only-c_cpplint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-c_cpplint/beta) | +| CLOJURE_CLJ_KONDO | oxsecurity/megalinter-only-clojure_clj_kondo:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-clojure_clj_kondo/beta) | +| CLOUDFORMATION_CFN_LINT | oxsecurity/megalinter-only-cloudformation_cfn_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-cloudformation_cfn_lint/beta) | +| COFFEE_COFFEELINT | oxsecurity/megalinter-only-coffee_coffeelint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-coffee_coffeelint/beta) | +| COPYPASTE_JSCPD | oxsecurity/megalinter-only-copypaste_jscpd:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-copypaste_jscpd/beta) | +| CPP_CPPLINT | oxsecurity/megalinter-only-cpp_cpplint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-cpp_cpplint/beta) | +| CSHARP_DOTNET_FORMAT | oxsecurity/megalinter-only-csharp_dotnet_format:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-csharp_dotnet_format/beta) | +| CSHARP_CSHARPIER | oxsecurity/megalinter-only-csharp_csharpier:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-csharp_csharpier/beta) | +| CSS_STYLELINT | oxsecurity/megalinter-only-css_stylelint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-css_stylelint/beta) | +| CSS_SCSS_LINT | oxsecurity/megalinter-only-css_scss_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-css_scss_lint/beta) | +| DART_DARTANALYZER | oxsecurity/megalinter-only-dart_dartanalyzer:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-dart_dartanalyzer/beta) | +| DOCKERFILE_HADOLINT | oxsecurity/megalinter-only-dockerfile_hadolint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-dockerfile_hadolint/beta) | +| EDITORCONFIG_EDITORCONFIG_CHECKER | oxsecurity/megalinter-only-editorconfig_editorconfig_checker:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-editorconfig_editorconfig_checker/beta) | +| ENV_DOTENV_LINTER | oxsecurity/megalinter-only-env_dotenv_linter:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-env_dotenv_linter/beta) | +| GHERKIN_GHERKIN_LINT | oxsecurity/megalinter-only-gherkin_gherkin_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-gherkin_gherkin_lint/beta) | +| GO_GOLANGCI_LINT | oxsecurity/megalinter-only-go_golangci_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-go_golangci_lint/beta) | +| GO_REVIVE | oxsecurity/megalinter-only-go_revive:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-go_revive/beta) | +| GRAPHQL_GRAPHQL_SCHEMA_LINTER | oxsecurity/megalinter-only-graphql_graphql_schema_linter:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-graphql_graphql_schema_linter/beta) | +| GROOVY_NPM_GROOVY_LINT | oxsecurity/megalinter-only-groovy_npm_groovy_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-groovy_npm_groovy_lint/beta) | +| HTML_DJLINT | oxsecurity/megalinter-only-html_djlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-html_djlint/beta) | +| HTML_HTMLHINT | oxsecurity/megalinter-only-html_htmlhint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-html_htmlhint/beta) | +| JAVA_CHECKSTYLE | oxsecurity/megalinter-only-java_checkstyle:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-java_checkstyle/beta) | +| JAVA_PMD | oxsecurity/megalinter-only-java_pmd:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-java_pmd/beta) | +| JAVASCRIPT_ES | oxsecurity/megalinter-only-javascript_es:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-javascript_es/beta) | +| JAVASCRIPT_STANDARD | oxsecurity/megalinter-only-javascript_standard:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-javascript_standard/beta) | +| JAVASCRIPT_PRETTIER | oxsecurity/megalinter-only-javascript_prettier:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-javascript_prettier/beta) | +| JSON_JSONLINT | oxsecurity/megalinter-only-json_jsonlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-json_jsonlint/beta) | +| JSON_ESLINT_PLUGIN_JSONC | oxsecurity/megalinter-only-json_eslint_plugin_jsonc:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-json_eslint_plugin_jsonc/beta) | +| JSON_V8R | oxsecurity/megalinter-only-json_v8r:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-json_v8r/beta) | +| JSON_PRETTIER | oxsecurity/megalinter-only-json_prettier:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-json_prettier/beta) | +| JSON_NPM_PACKAGE_JSON_LINT | oxsecurity/megalinter-only-json_npm_package_json_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-json_npm_package_json_lint/beta) | +| JSX_ESLINT | oxsecurity/megalinter-only-jsx_eslint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-jsx_eslint/beta) | +| KOTLIN_KTLINT | oxsecurity/megalinter-only-kotlin_ktlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-kotlin_ktlint/beta) | +| KUBERNETES_KUBEVAL | oxsecurity/megalinter-only-kubernetes_kubeval:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-kubernetes_kubeval/beta) | +| KUBERNETES_KUBECONFORM | oxsecurity/megalinter-only-kubernetes_kubeconform:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-kubernetes_kubeconform/beta) | +| LATEX_CHKTEX | oxsecurity/megalinter-only-latex_chktex:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-latex_chktex/beta) | +| LUA_LUACHECK | oxsecurity/megalinter-only-lua_luacheck:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-lua_luacheck/beta) | +| MAKEFILE_CHECKMAKE | oxsecurity/megalinter-only-makefile_checkmake:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-makefile_checkmake/beta) | +| MARKDOWN_MARKDOWNLINT | oxsecurity/megalinter-only-markdown_markdownlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-markdown_markdownlint/beta) | +| MARKDOWN_REMARK_LINT | oxsecurity/megalinter-only-markdown_remark_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-markdown_remark_lint/beta) | +| MARKDOWN_MARKDOWN_LINK_CHECK | oxsecurity/megalinter-only-markdown_markdown_link_check:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-markdown_markdown_link_check/beta) | +| MARKDOWN_MARKDOWN_TABLE_FORMATTER | oxsecurity/megalinter-only-markdown_markdown_table_formatter:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-markdown_markdown_table_formatter/beta) | +| OPENAPI_SPECTRAL | oxsecurity/megalinter-only-openapi_spectral:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-openapi_spectral/beta) | +| PERL_PERLCRITIC | oxsecurity/megalinter-only-perl_perlcritic:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-perl_perlcritic/beta) | +| PHP_PHPCS | oxsecurity/megalinter-only-php_phpcs:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-php_phpcs/beta) | +| PHP_PHPSTAN | oxsecurity/megalinter-only-php_phpstan:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-php_phpstan/beta) | +| PHP_PSALM | oxsecurity/megalinter-only-php_psalm:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-php_psalm/beta) | +| PHP_PHPLINT | oxsecurity/megalinter-only-php_phplint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-php_phplint/beta) | +| POWERSHELL_POWERSHELL | oxsecurity/megalinter-only-powershell_powershell:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-powershell_powershell/beta) | +| POWERSHELL_POWERSHELL_FORMATTER | oxsecurity/megalinter-only-powershell_powershell_formatter:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-powershell_powershell_formatter/beta) | +| PROTOBUF_PROTOLINT | oxsecurity/megalinter-only-protobuf_protolint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-protobuf_protolint/beta) | +| PUPPET_PUPPET_LINT | oxsecurity/megalinter-only-puppet_puppet_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-puppet_puppet_lint/beta) | +| PYTHON_PYLINT | oxsecurity/megalinter-only-python_pylint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-python_pylint/beta) | +| PYTHON_BLACK | oxsecurity/megalinter-only-python_black:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-python_black/beta) | +| PYTHON_FLAKE8 | oxsecurity/megalinter-only-python_flake8:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-python_flake8/beta) | +| PYTHON_ISORT | oxsecurity/megalinter-only-python_isort:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-python_isort/beta) | +| PYTHON_BANDIT | oxsecurity/megalinter-only-python_bandit:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-python_bandit/beta) | +| PYTHON_MYPY | oxsecurity/megalinter-only-python_mypy:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-python_mypy/beta) | +| PYTHON_PYRIGHT | oxsecurity/megalinter-only-python_pyright:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-python_pyright/beta) | +| R_LINTR | oxsecurity/megalinter-only-r_lintr:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-r_lintr/beta) | +| RAKU_RAKU | oxsecurity/megalinter-only-raku_raku:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-raku_raku/beta) | +| REPOSITORY_CHECKOV | oxsecurity/megalinter-only-repository_checkov:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_checkov/beta) | +| REPOSITORY_DEVSKIM | oxsecurity/megalinter-only-repository_devskim:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_devskim/beta) | +| REPOSITORY_DUSTILOCK | oxsecurity/megalinter-only-repository_dustilock:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_dustilock/beta) | +| REPOSITORY_GIT_DIFF | oxsecurity/megalinter-only-repository_git_diff:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_git_diff/beta) | +| REPOSITORY_GITLEAKS | oxsecurity/megalinter-only-repository_gitleaks:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_gitleaks/beta) | +| REPOSITORY_GOODCHECK | oxsecurity/megalinter-only-repository_goodcheck:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_goodcheck/beta) | +| REPOSITORY_SECRETLINT | oxsecurity/megalinter-only-repository_secretlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_secretlint/beta) | +| REPOSITORY_SEMGREP | oxsecurity/megalinter-only-repository_semgrep:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_semgrep/beta) | +| REPOSITORY_SYFT | oxsecurity/megalinter-only-repository_syft:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_syft/beta) | +| REPOSITORY_TRIVY | oxsecurity/megalinter-only-repository_trivy:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-repository_trivy/beta) | +| RST_RST_LINT | oxsecurity/megalinter-only-rst_rst_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-rst_rst_lint/beta) | +| RST_RSTCHECK | oxsecurity/megalinter-only-rst_rstcheck:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-rst_rstcheck/beta) | +| RST_RSTFMT | oxsecurity/megalinter-only-rst_rstfmt:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-rst_rstfmt/beta) | +| RUBY_RUBOCOP | oxsecurity/megalinter-only-ruby_rubocop:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-ruby_rubocop/beta) | +| RUST_CLIPPY | oxsecurity/megalinter-only-rust_clippy:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-rust_clippy/beta) | +| SALESFORCE_SFDX_SCANNER_APEX | oxsecurity/megalinter-only-salesforce_sfdx_scanner_apex:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-salesforce_sfdx_scanner_apex/beta) | +| SALESFORCE_SFDX_SCANNER_AURA | oxsecurity/megalinter-only-salesforce_sfdx_scanner_aura:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-salesforce_sfdx_scanner_aura/beta) | +| SALESFORCE_SFDX_SCANNER_LWC | oxsecurity/megalinter-only-salesforce_sfdx_scanner_lwc:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-salesforce_sfdx_scanner_lwc/beta) | +| SCALA_SCALAFIX | oxsecurity/megalinter-only-scala_scalafix:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-scala_scalafix/beta) | +| SNAKEMAKE_LINT | oxsecurity/megalinter-only-snakemake_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-snakemake_lint/beta) | +| SNAKEMAKE_SNAKEFMT | oxsecurity/megalinter-only-snakemake_snakefmt:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-snakemake_snakefmt/beta) | +| SPELL_MISSPELL | oxsecurity/megalinter-only-spell_misspell:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-spell_misspell/beta) | +| SPELL_CSPELL | oxsecurity/megalinter-only-spell_cspell:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-spell_cspell/beta) | +| SPELL_PROSELINT | oxsecurity/megalinter-only-spell_proselint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-spell_proselint/beta) | +| SQL_SQL_LINT | oxsecurity/megalinter-only-sql_sql_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-sql_sql_lint/beta) | +| SQL_SQLFLUFF | oxsecurity/megalinter-only-sql_sqlfluff:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-sql_sqlfluff/beta) | +| SQL_TSQLLINT | oxsecurity/megalinter-only-sql_tsqllint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-sql_tsqllint/beta) | +| SWIFT_SWIFTLINT | oxsecurity/megalinter-only-swift_swiftlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-swift_swiftlint/beta) | +| TEKTON_TEKTON_LINT | oxsecurity/megalinter-only-tekton_tekton_lint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-tekton_tekton_lint/beta) | +| TERRAFORM_TFLINT | oxsecurity/megalinter-only-terraform_tflint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-terraform_tflint/beta) | +| TERRAFORM_TERRASCAN | oxsecurity/megalinter-only-terraform_terrascan:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-terraform_terrascan/beta) | +| TERRAFORM_TERRAGRUNT | oxsecurity/megalinter-only-terraform_terragrunt:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-terraform_terragrunt/beta) | +| TERRAFORM_TERRAFORM_FMT | oxsecurity/megalinter-only-terraform_terraform_fmt:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-terraform_terraform_fmt/beta) | +| TERRAFORM_CHECKOV | oxsecurity/megalinter-only-terraform_checkov:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-terraform_checkov/beta) | +| TERRAFORM_KICS | oxsecurity/megalinter-only-terraform_kics:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-terraform_kics/beta) | +| TSX_ESLINT | oxsecurity/megalinter-only-tsx_eslint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-tsx_eslint/beta) | +| TYPESCRIPT_ES | oxsecurity/megalinter-only-typescript_es:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-typescript_es/beta) | +| TYPESCRIPT_STANDARD | oxsecurity/megalinter-only-typescript_standard:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-typescript_standard/beta) | +| TYPESCRIPT_PRETTIER | oxsecurity/megalinter-only-typescript_prettier:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-typescript_prettier/beta) | +| VBDOTNET_DOTNET_FORMAT | oxsecurity/megalinter-only-vbdotnet_dotnet_format:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-vbdotnet_dotnet_format/beta) | +| XML_XMLLINT | oxsecurity/megalinter-only-xml_xmllint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-xml_xmllint/beta) | +| YAML_PRETTIER | oxsecurity/megalinter-only-yaml_prettier:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-yaml_prettier/beta) | +| YAML_YAMLLINT | oxsecurity/megalinter-only-yaml_yamllint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-yaml_yamllint/beta) | +| YAML_V8R | oxsecurity/megalinter-only-yaml_v8r:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-yaml_v8r/beta) | diff --git a/linters/action_actionlint/Dockerfile b/linters/action_actionlint/Dockerfile index 9ae589afd15..58f9cdd96d1 100644 --- a/linters/action_actionlint/Dockerfile +++ b/linters/action_actionlint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,29 +30,31 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - go + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + go \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -65,23 +68,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,30 +98,44 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # actionlint installation ENV GO111MODULE=on -RUN go get github.com/rhysd/actionlint/cmd/actionlint +RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +161,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=ACTION_ACTIONLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=ACTION_ACTIONLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +173,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=ACTION_ACTIONLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=ACTION_ACTIONLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/arm_arm_ttk/Dockerfile b/linters/arm_arm_ttk/Dockerfile index 537932a6429..613cb15f243 100644 --- a/linters/arm_arm_ttk/Dockerfile +++ b/linters/arm_arm_ttk/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -33,29 +34,31 @@ ARG ARM_TTK_DIRECTORY='/opt/microsoft' # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - icu-libs + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + icu-libs \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -69,23 +72,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -97,6 +102,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -123,20 +148,14 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -162,22 +181,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=ARM_ARM_TTK \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=ARM_ARM_TTK \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -190,8 +193,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=ARM_ARM_TTK \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=ARM_ARM_TTK \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/bash_exec/Dockerfile b/linters/bash_exec/Dockerfile index 0e081da4862..125bc88394a 100644 --- a/linters/bash_exec/Dockerfile +++ b/linters/bash_exec/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,29 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - bash + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -65,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +97,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -104,20 +128,14 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -143,22 +161,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=BASH_EXEC \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=BASH_EXEC \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -171,8 +173,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=BASH_EXEC \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=BASH_EXEC \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/bash_shfmt/Dockerfile b/linters/bash_shfmt/Dockerfile index 1ca8f576a88..1e86d709e5f 100644 --- a/linters/bash_shfmt/Dockerfile +++ b/linters/bash_shfmt/Dockerfile @@ -10,13 +10,14 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM mvdan/shfmt:latest-alpine as shfmt #FROM__END ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,17 +30,7 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -47,12 +38,23 @@ RUN apk add --update --no-cache \ #APK__START RUN apk add --update --no-cache \ bash \ - go + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + go \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -66,23 +68,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -94,30 +98,43 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START +COPY --from=shfmt /bin/shfmt /usr/bin/ +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # shfmt installation -ENV GO111MODULE=on -RUN go get mvdan.cc/sh/v3/cmd/shfmt@v3.3.1 +# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -143,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=BASH_SHFMT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=BASH_SHFMT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -171,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=BASH_SHFMT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=BASH_SHFMT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/bicep_bicep_linter/Dockerfile b/linters/bicep_bicep_linter/Dockerfile new file mode 100644 index 00000000000..8fdaa2a50ee --- /dev/null +++ b/linters/bicep_bicep_linter/Dockerfile @@ -0,0 +1,214 @@ +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Get base image # +################## +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START +ARG BICEP_EXE='bicep' +ARG BICEP_URI='https://github.com/Azure/bicep/releases/latest/download/bicep-linux-musl-x64' +ARG BICEP_DIR='/usr/local/bin' +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#PIP__START + +#PIP__END + +#PIPVENV__START + +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START +# bicep_linter installation +RUN curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "${BICEP_URI}" \ + && chmod +x "${BICEP_EXE}" \ + && mv "${BICEP_EXE}" "${BICEP_DIR}" + + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY megalinter /megalinter +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=BICEP_BICEP_LINTER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=BICEP_BICEP_LINTER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/c_cpplint/Dockerfile b/linters/c_cpplint/Dockerfile index a557ee8def6..f436435ba21 100644 --- a/linters/c_cpplint/Dockerfile +++ b/linters/c_cpplint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'cpplint' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/cpplint" && cd "/venvs/cpplint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir cpplint && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/cpplint/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=C_CPPLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=C_CPPLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=C_CPPLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=C_CPPLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/clojure_clj_kondo/Dockerfile b/linters/clojure_clj_kondo/Dockerfile index 180674adf32..931a4da8a33 100644 --- a/linters/clojure_clj_kondo/Dockerfile +++ b/linters/clojure_clj_kondo/Dockerfile @@ -10,13 +10,14 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM cljkondo/clj-kondo:2021.06.18-alpine as clj-kondo +FROM cljkondo/clj-kondo:2023.01.12-alpine as clj-kondo #FROM__END ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,29 +97,43 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START +COPY --from=clj-kondo /bin/clj-kondo /usr/bin/ +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # clj-kondo installation -COPY --from=clj-kondo /bin/clj-kondo /usr/bin/ +# Managed with COPY --from=clj-kondo /bin/clj-kondo /usr/bin/ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -140,22 +159,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=CLOJURE_CLJ_KONDO \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=CLOJURE_CLJ_KONDO \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -168,8 +171,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=CLOJURE_CLJ_KONDO \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=CLOJURE_CLJ_KONDO \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/coffee_coffeelint/Dockerfile b/linters/coffee_coffeelint/Dockerfile index 8df336a599d..995050e929a 100644 --- a/linters/coffee_coffeelint/Dockerfile +++ b/linters/coffee_coffeelint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - @coffeelint/cli +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + @coffeelint/cli && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=COFFEE_COFFEELINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=COFFEE_COFFEELINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=COFFEE_COFFEELINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=COFFEE_COFFEELINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/copypaste_jscpd/Dockerfile b/linters/copypaste_jscpd/Dockerfile index ee3a7542e7f..7db1ab65509 100644 --- a/linters/copypaste_jscpd/Dockerfile +++ b/linters/copypaste_jscpd/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,34 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ nodejs \ npm \ - yarn + yarn \ + nodejs-current \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +71,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - jscpd@3.3.26 +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + jscpd@3.3.26 && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +117,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +144,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +177,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=COPYPASTE_JSCPD \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=COPYPASTE_JSCPD \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +189,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=COPYPASTE_JSCPD \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=COPYPASTE_JSCPD \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/cpp_cpplint/Dockerfile b/linters/cpp_cpplint/Dockerfile index 496dc44e649..bb2e52bd858 100644 --- a/linters/cpp_cpplint/Dockerfile +++ b/linters/cpp_cpplint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'cpplint' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/cpplint" && cd "/venvs/cpplint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir cpplint && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/cpplint/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=CPP_CPPLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=CPP_CPPLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=CPP_CPPLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=CPP_CPPLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/csharp_csharpier/Dockerfile b/linters/csharp_csharpier/Dockerfile new file mode 100644 index 00000000000..92a2879958c --- /dev/null +++ b/linters/csharp_csharpier/Dockerfile @@ -0,0 +1,224 @@ +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Get base image # +################## +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START + +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + icu-libs \ + libcurl \ + libintl \ + libssl1.1 \ + libstdc++ \ + lttng-ust-dev \ + zlib \ + zlib-dev \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#PIP__START + +#PIP__END + +#PIPVENV__START + +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START +# CSHARP installation +RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest + +ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" + +# csharpier installation +RUN /usr/share/dotnet/dotnet tool install -g csharpier + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY megalinter /megalinter +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=CSHARP_CSHARPIER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=CSHARP_CSHARPIER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/csharp_dotnet_format/Dockerfile b/linters/csharp_dotnet_format/Dockerfile index 1eb15fb93e8..7e16c259315 100644 --- a/linters/csharp_dotnet_format/Dockerfile +++ b/linters/csharp_dotnet_format/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,23 +30,23 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ icu-libs \ libcurl \ libintl \ @@ -53,12 +54,14 @@ RUN apk add --update --no-cache \ libstdc++ \ lttng-ust-dev \ zlib \ - zlib-dev + zlib-dev \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -72,23 +75,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -100,6 +105,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -111,22 +136,19 @@ RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" -#OTHER__END +# dotnet-format installation +RUN /usr/share/dotnet/dotnet tool install -g dotnet-format -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#OTHER__END ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -152,22 +174,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=CSHARP_DOTNET_FORMAT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=CSHARP_DOTNET_FORMAT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -180,8 +186,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=CSHARP_DOTNET_FORMAT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=CSHARP_DOTNET_FORMAT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/css_scss_lint/Dockerfile b/linters/css_scss_lint/Dockerfile index 48505d9f474..935e24fe481 100644 --- a/linters/css_scss_lint/Dockerfile +++ b/linters/css_scss_lint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,32 +30,34 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ ruby \ ruby-dev \ ruby-bundler \ - ruby-rdoc + ruby-rdoc \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -68,23 +71,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -98,6 +103,26 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ scss_lint #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -105,20 +130,14 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -144,22 +163,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=CSS_SCSS_LINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=CSS_SCSS_LINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -172,8 +175,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=CSS_SCSS_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=CSS_SCSS_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/css_stylelint/Dockerfile b/linters/css_stylelint/Dockerfile index 0aab923d1d2..166b0392aee 100644 --- a/linters/css_stylelint/Dockerfile +++ b/linters/css_stylelint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,27 +70,44 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ stylelint \ stylelint-config-standard \ stylelint-config-sass-guidelines \ - stylelint-scss + stylelint-scss && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -99,6 +119,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -106,20 +146,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -145,22 +179,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=CSS_STYLELINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=CSS_STYLELINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -173,8 +191,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=CSS_STYLELINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=CSS_STYLELINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/dart_dartanalyzer/Dockerfile b/linters/dart_dartanalyzer/Dockerfile index f6d49d7670b..8d9a40df26d 100644 --- a/linters/dart_dartanalyzer/Dockerfile +++ b/linters/dart_dartanalyzer/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -30,28 +31,30 @@ ARG GLIBC_VERSION='2.31-r0' # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -65,23 +68,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +98,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -109,20 +134,14 @@ RUN wget --tries=50 -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sge #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -148,22 +167,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=DART_DARTANALYZER \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=DART_DARTANALYZER \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -176,8 +179,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=DART_DARTANALYZER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=DART_DARTANALYZER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/editorconfig_editorconfig_checker/Dockerfile b/linters/editorconfig_editorconfig_checker/Dockerfile index 2314b0963a0..9a4beeeb0ed 100644 --- a/linters/editorconfig_editorconfig_checker/Dockerfile +++ b/linters/editorconfig_editorconfig_checker/Dockerfile @@ -10,13 +10,14 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM mstruebing/editorconfig-checker:2.4.0 as editorconfig-checker #FROM__END ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ - npm \ - yarn + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - editorconfig-checker + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,27 +97,43 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START +COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START +# editorconfig-checker installation +# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +159,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=EDITORCONFIG_EDITORCONFIG_CHECKER \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=EDITORCONFIG_EDITORCONFIG_CHECKER \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +171,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=EDITORCONFIG_EDITORCONFIG_CHECKER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=EDITORCONFIG_EDITORCONFIG_CHECKER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/env_dotenv_linter/Dockerfile b/linters/env_dotenv_linter/Dockerfile index 542ff9ad388..393dd28d281 100644 --- a/linters/env_dotenv_linter/Dockerfile +++ b/linters/env_dotenv_linter/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,6 +97,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -101,20 +126,14 @@ RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/m #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -140,22 +159,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=ENV_DOTENV_LINTER \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=ENV_DOTENV_LINTER \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -168,8 +171,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=ENV_DOTENV_LINTER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=ENV_DOTENV_LINTER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/gherkin_gherkin_lint/Dockerfile b/linters/gherkin_gherkin_lint/Dockerfile index fee121810bb..8ce6bcf41c7 100644 --- a/linters/gherkin_gherkin_lint/Dockerfile +++ b/linters/gherkin_gherkin_lint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - gherkin-lint +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + gherkin-lint && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=GHERKIN_GHERKIN_LINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=GHERKIN_GHERKIN_LINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=GHERKIN_GHERKIN_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=GHERKIN_GHERKIN_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/go_golangci_lint/Dockerfile b/linters/go_golangci_lint/Dockerfile index 7877275c3c5..b350e54e6c2 100644 --- a/linters/go_golangci_lint/Dockerfile +++ b/linters/go_golangci_lint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,29 +30,31 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - go + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + go \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -65,23 +68,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +98,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -104,20 +129,14 @@ RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -143,22 +162,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=GO_GOLANGCI_LINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=GO_GOLANGCI_LINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -171,8 +174,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=GO_GOLANGCI_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=GO_GOLANGCI_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/graphql_graphql_schema_linter/Dockerfile b/linters/graphql_graphql_schema_linter/Dockerfile index 3f9f129c9c2..9e1ba155705 100644 --- a/linters/graphql_graphql_schema_linter/Dockerfile +++ b/linters/graphql_graphql_schema_linter/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,42 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - graphql-schema-linter +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + graphql \ + graphql-schema-linter && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +117,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +144,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +177,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=GRAPHQL_GRAPHQL_SCHEMA_LINTER \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=GRAPHQL_GRAPHQL_SCHEMA_LINTER \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +189,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=GRAPHQL_GRAPHQL_SCHEMA_LINTER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=GRAPHQL_GRAPHQL_SCHEMA_LINTER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/html_djlint/Dockerfile b/linters/html_djlint/Dockerfile new file mode 100644 index 00000000000..e059b2cc02d --- /dev/null +++ b/linters/html_djlint/Dockerfile @@ -0,0 +1,210 @@ +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Get base image # +################## +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START + +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#PIP__START + +#PIP__END + +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/djlint" && cd "/venvs/djlint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir djlint && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/djlint/bin +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY megalinter /megalinter +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=HTML_DJLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=HTML_DJLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/html_htmlhint/Dockerfile b/linters/html_htmlhint/Dockerfile index b708f98eb15..29904cc4100 100644 --- a/linters/html_htmlhint/Dockerfile +++ b/linters/html_htmlhint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - htmlhint +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + htmlhint && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=HTML_HTMLHINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=HTML_HTMLHINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=HTML_HTMLHINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=HTML_HTMLHINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/javascript_prettier/Dockerfile b/linters/javascript_prettier/Dockerfile index c1277db8ca5..eabbbad67b7 100644 --- a/linters/javascript_prettier/Dockerfile +++ b/linters/javascript_prettier/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - prettier +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + prettier && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=JAVASCRIPT_PRETTIER \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=JAVASCRIPT_PRETTIER \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=JAVASCRIPT_PRETTIER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=JAVASCRIPT_PRETTIER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/javascript_standard/Dockerfile b/linters/javascript_standard/Dockerfile index ef9743845e1..45d91e07bfb 100644 --- a/linters/javascript_standard/Dockerfile +++ b/linters/javascript_standard/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - standard@17.0.0 +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + standard && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=JAVASCRIPT_STANDARD \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=JAVASCRIPT_STANDARD \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=JAVASCRIPT_STANDARD \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=JAVASCRIPT_STANDARD \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/json_jsonlint/Dockerfile b/linters/json_jsonlint/Dockerfile index be1926f16aa..863683b4f81 100644 --- a/linters/json_jsonlint/Dockerfile +++ b/linters/json_jsonlint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - jsonlint +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + @prantlf/jsonlint && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=JSON_JSONLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=JSON_JSONLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=JSON_JSONLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=JSON_JSONLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/json_npm_package_json_lint/Dockerfile b/linters/json_npm_package_json_lint/Dockerfile new file mode 100644 index 00000000000..4f7db9187db --- /dev/null +++ b/linters/json_npm_package_json_lint/Dockerfile @@ -0,0 +1,227 @@ +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Get base image # +################## +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START + +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + npm \ + nodejs-current \ + yarn \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#PIP__START + +#PIP__END + +#PIPVENV__START + +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + npm-package-json-lint \ + npm-package-json-lint-config-default && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY megalinter /megalinter +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=JSON_NPM_PACKAGE_JSON_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=JSON_NPM_PACKAGE_JSON_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/json_prettier/Dockerfile b/linters/json_prettier/Dockerfile index 5ea0f720b66..5ad3602dbab 100644 --- a/linters/json_prettier/Dockerfile +++ b/linters/json_prettier/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - prettier +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + prettier && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=JSON_PRETTIER \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=JSON_PRETTIER \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=JSON_PRETTIER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=JSON_PRETTIER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/json_v8r/Dockerfile b/linters/json_v8r/Dockerfile index d047bc23d3b..f76c3ea3d6d 100644 --- a/linters/json_v8r/Dockerfile +++ b/linters/json_v8r/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - v8r@0.6.1 +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + v8r && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=JSON_V8R \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=JSON_V8R \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=JSON_V8R \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=JSON_V8R \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/kubernetes_kubeconform/Dockerfile b/linters/kubernetes_kubeconform/Dockerfile new file mode 100644 index 00000000000..378af8f3848 --- /dev/null +++ b/linters/kubernetes_kubeconform/Dockerfile @@ -0,0 +1,217 @@ +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Get base image # +################## +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START + +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#PIP__START + +#PIP__END + +#PIPVENV__START + +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START +# kubeconform installation +RUN ML_THIRD_PARTY_DIR="/third-party/kubeconform" \ + && KUBECONFORM_VERSION=v0.5.0 \ + && mkdir -p ${ML_THIRD_PARTY_DIR} \ + && wget -P ${ML_THIRD_PARTY_DIR} -q https://github.com/yannh/kubeconform/releases/download/$KUBECONFORM_VERSION/kubeconform-linux-amd64.tar.gz \ + && tar xf ${ML_THIRD_PARTY_DIR}/kubeconform-linux-amd64.tar.gz --directory ${ML_THIRD_PARTY_DIR} \ + && mv ${ML_THIRD_PARTY_DIR}/kubeconform /usr/local/bin \ + && rm ${ML_THIRD_PARTY_DIR}/kubeconform-linux-amd64.tar.gz \ + && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete + + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY megalinter /megalinter +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=KUBERNETES_KUBECONFORM \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=KUBERNETES_KUBECONFORM \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/kubernetes_kubeval/Dockerfile b/linters/kubernetes_kubeval/Dockerfile index baec585ac0f..fedf3ea417d 100644 --- a/linters/kubernetes_kubeval/Dockerfile +++ b/linters/kubernetes_kubeval/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,32 +97,50 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # kubeval installation -RUN wget -q https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz \ - && tar xf kubeval-linux-amd64.tar.gz \ - && cp kubeval /usr/local/bin +RUN ML_THIRD_PARTY_DIR="/third-party/kubeval" \ + && mkdir -p ${ML_THIRD_PARTY_DIR} \ + && wget -P ${ML_THIRD_PARTY_DIR} -q https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz \ + && tar xf ${ML_THIRD_PARTY_DIR}/kubeval-linux-amd64.tar.gz --directory ${ML_THIRD_PARTY_DIR} \ + && mv ${ML_THIRD_PARTY_DIR}/kubeval /usr/local/bin \ + && rm ${ML_THIRD_PARTY_DIR}/kubeval-linux-amd64.tar.gz \ + && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -143,22 +166,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=KUBERNETES_KUBEVAL \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=KUBERNETES_KUBEVAL \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -171,8 +178,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=KUBERNETES_KUBEVAL \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=KUBERNETES_KUBEVAL \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/latex_chktex/Dockerfile b/linters/latex_chktex/Dockerfile index 2a9179b13f1..99b51f94bd8 100644 --- a/linters/latex_chktex/Dockerfile +++ b/linters/latex_chktex/Dockerfile @@ -16,7 +16,8 @@ FROM ghcr.io/assignuser/chktex-alpine:latest as chktex ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,30 +97,44 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START +COPY --from=chktex /usr/bin/chktex /usr/bin/ +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # chktex installation -COPY --from=chktex /usr/bin/chktex /usr/bin/ -RUN cd ~ && touch .chktexrc +# Managed with COPY --from=chktex /usr/bin/chktex /usr/bin/ +RUN cd ~ && touch .chktexrc && cd / #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -141,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=LATEX_CHKTEX \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=LATEX_CHKTEX \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -169,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=LATEX_CHKTEX \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=LATEX_CHKTEX \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/lua_luacheck/Dockerfile b/linters/lua_luacheck/Dockerfile index 59ecde00ebd..afc4c4ce4a0 100644 --- a/linters/lua_luacheck/Dockerfile +++ b/linters/lua_luacheck/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,30 +30,32 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ openssl \ - readline-dev + readline-dev \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -66,23 +69,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -94,6 +99,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -110,25 +135,20 @@ RUN wget --tries=5 https://www.lua.org/ftp/lua-5.3.5.tar.gz -O - -q | tar -xzf - && make \ && make -b install \ && cd .. && rm -r luarocks-3.3.1-super-linter/ \ - && luarocks install luacheck + && luarocks install luacheck \ + && cd / #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -154,22 +174,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=LUA_LUACHECK \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=LUA_LUACHECK \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -182,8 +186,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=LUA_LUACHECK \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=LUA_LUACHECK \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/makefile_checkmake/Dockerfile b/linters/makefile_checkmake/Dockerfile new file mode 100644 index 00000000000..ba96c9855b6 --- /dev/null +++ b/linters/makefile_checkmake/Dockerfile @@ -0,0 +1,212 @@ +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Get base image # +################## +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START + +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#PIP__START + +#PIP__END + +#PIPVENV__START + +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START +# checkmake installation +RUN ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ + && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ + && chmod 755 /usr/local/bin/checkmake + + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY megalinter /megalinter +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=MAKEFILE_CHECKMAKE \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=MAKEFILE_CHECKMAKE \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/markdown_markdown_link_check/Dockerfile b/linters/markdown_markdown_link_check/Dockerfile index 0453f2c22d2..17659f57dc1 100644 --- a/linters/markdown_markdown_link_check/Dockerfile +++ b/linters/markdown_markdown_link_check/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - markdown-link-check +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + markdown-link-check && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=MARKDOWN_MARKDOWN_LINK_CHECK \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=MARKDOWN_MARKDOWN_LINK_CHECK \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=MARKDOWN_MARKDOWN_LINK_CHECK \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=MARKDOWN_MARKDOWN_LINK_CHECK \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/markdown_markdown_table_formatter/Dockerfile b/linters/markdown_markdown_table_formatter/Dockerfile index e5d98621f32..4a4722006f8 100644 --- a/linters/markdown_markdown_table_formatter/Dockerfile +++ b/linters/markdown_markdown_table_formatter/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - markdown-table-formatter +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + markdown-table-formatter && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=MARKDOWN_MARKDOWN_TABLE_FORMATTER \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=MARKDOWN_MARKDOWN_TABLE_FORMATTER \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=MARKDOWN_MARKDOWN_TABLE_FORMATTER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=MARKDOWN_MARKDOWN_TABLE_FORMATTER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/markdown_markdownlint/Dockerfile b/linters/markdown_markdownlint/Dockerfile index 991ed3efcdc..fe30018f1c9 100644 --- a/linters/markdown_markdownlint/Dockerfile +++ b/linters/markdown_markdownlint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - markdownlint-cli +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + markdownlint-cli && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=MARKDOWN_MARKDOWNLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=MARKDOWN_MARKDOWNLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=MARKDOWN_MARKDOWNLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=MARKDOWN_MARKDOWNLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/markdown_remark_lint/Dockerfile b/linters/markdown_remark_lint/Dockerfile index 4a61a1ed059..843ba1504d3 100644 --- a/linters/markdown_remark_lint/Dockerfile +++ b/linters/markdown_remark_lint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,25 +70,42 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ remark-cli \ - remark-preset-lint-recommended + remark-preset-lint-recommended && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -97,6 +117,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -104,20 +144,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -143,22 +177,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=MARKDOWN_REMARK_LINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=MARKDOWN_REMARK_LINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -171,8 +189,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=MARKDOWN_REMARK_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=MARKDOWN_REMARK_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/openapi_spectral/Dockerfile b/linters/openapi_spectral/Dockerfile index 428574779be..e1849860d6d 100644 --- a/linters/openapi_spectral/Dockerfile +++ b/linters/openapi_spectral/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - @stoplight/spectral@5.6.0 +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + @stoplight/spectral@5.6.0 && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=OPENAPI_SPECTRAL \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=OPENAPI_SPECTRAL \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=OPENAPI_SPECTRAL \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=OPENAPI_SPECTRAL \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/perl_perlcritic/Dockerfile b/linters/perl_perlcritic/Dockerfile index 5529df0bc1a..cfbe2353c95 100644 --- a/linters/perl_perlcritic/Dockerfile +++ b/linters/perl_perlcritic/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,30 +30,32 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ perl \ - perl-dev + perl-dev \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -66,23 +69,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -94,6 +99,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +128,14 @@ RUN curl --retry 5 --retry-delay 5 -sL https://cpanmin.us/ | perl - -nq --no-wge #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +161,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PERL_PERLCRITIC \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PERL_PERLCRITIC \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +173,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PERL_PERLCRITIC \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PERL_PERLCRITIC \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/php_phpcs/Dockerfile b/linters/php_phpcs/Dockerfile index 2e3727b1207..60c4836b901 100644 --- a/linters/php_phpcs/Dockerfile +++ b/linters/php_phpcs/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,49 +30,42 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ gnupg \ - php7 \ - php7-phar \ - php7-json \ - php7-mbstring \ - php7-xmlwriter \ - php7-tokenizer \ - php7-ctype \ - php7-curl \ - php7-dom \ - php7-simplexml \ - php8 \ - php8-phar \ - php8-mbstring \ - php8-xmlwriter \ - php8-tokenizer \ - php8-ctype \ - php8-curl \ - php8-dom \ - php8-simplexml \ - composer + php81 \ + php81-phar \ + php81-mbstring \ + php81-xmlwriter \ + php81-tokenizer \ + php81-ctype \ + php81-curl \ + php81-dom \ + php81-simplexml \ + composer \ + dpkg \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -85,23 +79,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -113,6 +109,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -128,8 +144,10 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ && gpg --verify phive.phar.asc phive.phar \ && chmod +x phive.phar \ && mv phive.phar /usr/local/bin/phive \ - && rm phive.phar.asc + && rm phive.phar.asc \ + && update-alternatives --install /usr/bin/php php /usr/bin/php81 110 +ENV PATH="/root/.composer/vendor/bin:$PATH" # phpcs installation RUN phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192 @@ -137,20 +155,14 @@ RUN phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192 #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -176,22 +188,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PHP_PHPCS \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PHP_PHPCS \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -204,8 +200,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PHP_PHPCS \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PHP_PHPCS \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/php_phplint/Dockerfile b/linters/php_phplint/Dockerfile index 85c962c5078..c1abd6cdfa8 100644 --- a/linters/php_phplint/Dockerfile +++ b/linters/php_phplint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,49 +30,42 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ gnupg \ - php7 \ - php7-phar \ - php7-json \ - php7-mbstring \ - php7-xmlwriter \ - php7-tokenizer \ - php7-ctype \ - php7-curl \ - php7-dom \ - php7-simplexml \ - php8 \ - php8-phar \ - php8-mbstring \ - php8-xmlwriter \ - php8-tokenizer \ - php8-ctype \ - php8-curl \ - php8-dom \ - php8-simplexml \ - composer + php81 \ + php81-phar \ + php81-mbstring \ + php81-xmlwriter \ + php81-tokenizer \ + php81-ctype \ + php81-curl \ + php81-dom \ + php81-simplexml \ + composer \ + dpkg \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -85,23 +79,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -113,6 +109,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -128,31 +144,26 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ && gpg --verify phive.phar.asc phive.phar \ && chmod +x phive.phar \ && mv phive.phar /usr/local/bin/phive \ - && rm phive.phar.asc + && rm phive.phar.asc \ + && update-alternatives --install /usr/bin/php php /usr/bin/php81 110 +ENV PATH="/root/.composer/vendor/bin:$PATH" # phplint installation -RUN composer global require overtrue/phplint ^3.0 \ +RUN composer global require --ignore-platform-reqs overtrue/phplint ^5.3 \ && composer global config bin-dir --absolute -ENV PATH="/root/.composer/vendor/bin:$PATH" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -178,22 +189,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PHP_PHPLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PHP_PHPLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -206,8 +201,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PHP_PHPLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PHP_PHPLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/php_phpstan/Dockerfile b/linters/php_phpstan/Dockerfile index 53f42dbb39f..e64a18b7e31 100644 --- a/linters/php_phpstan/Dockerfile +++ b/linters/php_phpstan/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,49 +30,42 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ gnupg \ - php7 \ - php7-phar \ - php7-json \ - php7-mbstring \ - php7-xmlwriter \ - php7-tokenizer \ - php7-ctype \ - php7-curl \ - php7-dom \ - php7-simplexml \ - php8 \ - php8-phar \ - php8-mbstring \ - php8-xmlwriter \ - php8-tokenizer \ - php8-ctype \ - php8-curl \ - php8-dom \ - php8-simplexml \ - composer + php81 \ + php81-phar \ + php81-mbstring \ + php81-xmlwriter \ + php81-tokenizer \ + php81-ctype \ + php81-curl \ + php81-dom \ + php81-simplexml \ + composer \ + dpkg \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -85,23 +79,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -113,6 +109,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -128,8 +144,10 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ && gpg --verify phive.phar.asc phive.phar \ && chmod +x phive.phar \ && mv phive.phar /usr/local/bin/phive \ - && rm phive.phar.asc + && rm phive.phar.asc \ + && update-alternatives --install /usr/bin/php php /usr/bin/php81 110 +ENV PATH="/root/.composer/vendor/bin:$PATH" # phpstan installation RUN phive --no-progress install phpstan -g --trust-gpg-keys CF1A108D0E7AE720 @@ -137,20 +155,14 @@ RUN phive --no-progress install phpstan -g --trust-gpg-keys CF1A108D0E7AE720 #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -176,22 +188,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PHP_PHPSTAN \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PHP_PHPSTAN \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -204,8 +200,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PHP_PHPSTAN \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PHP_PHPSTAN \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/powershell_powershell/Dockerfile b/linters/powershell_powershell/Dockerfile index a585bcdf7d4..34b428921af 100644 --- a/linters/powershell_powershell/Dockerfile +++ b/linters/powershell_powershell/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -31,29 +32,31 @@ ARG PSSA_VERSION='latest' # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - icu-libs + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + icu-libs \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,23 +70,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -95,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -107,28 +132,22 @@ RUN mkdir -p ${PWSH_DIRECTORY} \ | cut -d '"' -f 4 \ | xargs -n 1 wget -O - \ | tar -xzC ${PWSH_DIRECTORY} \ - && ln -sf ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh - + && ln -sf ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh \ + && chmod +x /usr/bin/pwsh \ # powershell installation -RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' + && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -154,22 +173,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=POWERSHELL_POWERSHELL \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=POWERSHELL_POWERSHELL \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -182,8 +185,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=POWERSHELL_POWERSHELL \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=POWERSHELL_POWERSHELL \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/powershell_powershell_formatter/Dockerfile b/linters/powershell_powershell_formatter/Dockerfile new file mode 100644 index 00000000000..16f3a386c82 --- /dev/null +++ b/linters/powershell_powershell_formatter/Dockerfile @@ -0,0 +1,223 @@ +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Get base image # +################## +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START +ARG PWSH_VERSION='latest' +ARG PWSH_DIRECTORY='/opt/microsoft/powershell' +ARG PSSA_VERSION='latest' +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + icu-libs \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#PIP__START + +#PIP__END + +#PIPVENV__START + +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START +# POWERSHELL installation +RUN mkdir -p ${PWSH_DIRECTORY} \ + && curl --retry 5 --retry-delay 5 -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \ + | grep browser_download_url \ + | grep linux-alpine-x64 \ + | cut -d '"' -f 4 \ + | xargs -n 1 wget -O - \ + | tar -xzC ${PWSH_DIRECTORY} \ + && ln -sf ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh \ + && chmod +x /usr/bin/pwsh \ + +# powershell_formatter installation + && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY megalinter /megalinter +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=POWERSHELL_POWERSHELL_FORMATTER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=POWERSHELL_POWERSHELL_FORMATTER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/protobuf_protolint/Dockerfile b/linters/protobuf_protolint/Dockerfile index 6547d10b93c..66bc16a5c8e 100644 --- a/linters/protobuf_protolint/Dockerfile +++ b/linters/protobuf_protolint/Dockerfile @@ -16,7 +16,8 @@ FROM yoheimuta/protolint:latest as protolint ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,29 +97,43 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START +COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # protolint installation -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -140,22 +159,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PROTOBUF_PROTOLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PROTOBUF_PROTOLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -168,8 +171,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PROTOBUF_PROTOLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PROTOBUF_PROTOLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/puppet_puppet_lint/Dockerfile b/linters/puppet_puppet_lint/Dockerfile index 671fe3f4370..728187fc4ed 100644 --- a/linters/puppet_puppet_lint/Dockerfile +++ b/linters/puppet_puppet_lint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,32 +30,34 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ ruby \ ruby-dev \ ruby-bundler \ - ruby-rdoc + ruby-rdoc \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -68,23 +71,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -98,6 +103,26 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ puppet-lint #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -105,20 +130,14 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -144,22 +163,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PUPPET_PUPPET_LINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PUPPET_PUPPET_LINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -172,8 +175,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PUPPET_PUPPET_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PUPPET_PUPPET_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/python_black/Dockerfile b/linters/python_black/Dockerfile index 5e348509a02..a10250613ba 100644 --- a/linters/python_black/Dockerfile +++ b/linters/python_black/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'black' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/black" && cd "/venvs/black" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir black && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/black/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PYTHON_BLACK \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PYTHON_BLACK \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PYTHON_BLACK \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PYTHON_BLACK \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/python_flake8/Dockerfile b/linters/python_flake8/Dockerfile index ad2b85369d5..c56ffc32330 100644 --- a/linters/python_flake8/Dockerfile +++ b/linters/python_flake8/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'flake8' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/flake8" && cd "/venvs/flake8" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir flake8 && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/flake8/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PYTHON_FLAKE8 \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PYTHON_FLAKE8 \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PYTHON_FLAKE8 \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PYTHON_FLAKE8 \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/python_isort/Dockerfile b/linters/python_isort/Dockerfile index a131f8cf8e8..77860b24fa1 100644 --- a/linters/python_isort/Dockerfile +++ b/linters/python_isort/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,28 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'isort' \ - 'black' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/isort" && cd "/venvs/isort" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir isort black && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/isort/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -94,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -101,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -140,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PYTHON_ISORT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PYTHON_ISORT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -168,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PYTHON_ISORT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PYTHON_ISORT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/python_mypy/Dockerfile b/linters/python_mypy/Dockerfile index 8635eaadb95..adaf9a38e52 100644 --- a/linters/python_mypy/Dockerfile +++ b/linters/python_mypy/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'mypy' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/mypy" && cd "/venvs/mypy" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir mypy && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/mypy/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PYTHON_MYPY \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PYTHON_MYPY \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PYTHON_MYPY \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PYTHON_MYPY \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/python_pylint/Dockerfile b/linters/python_pylint/Dockerfile index 1f6bdad64d9..3c261ceefeb 100644 --- a/linters/python_pylint/Dockerfile +++ b/linters/python_pylint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'pylint' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/pylint" && cd "/venvs/pylint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir pylint typing-extensions && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/pylint/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=PYTHON_PYLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=PYTHON_PYLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PYTHON_PYLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PYTHON_PYLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/python_pyright/Dockerfile b/linters/python_pyright/Dockerfile new file mode 100644 index 00000000000..d35de5812a7 --- /dev/null +++ b/linters/python_pyright/Dockerfile @@ -0,0 +1,210 @@ +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Get base image # +################## +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START + +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#PIP__START + +#PIP__END + +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/pyright" && cd "/venvs/pyright" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir pyright==1.1.270 && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/pyright/bin +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY megalinter /megalinter +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=PYTHON_PYRIGHT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=PYTHON_PYRIGHT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/r_lintr/Dockerfile b/linters/r_lintr/Dockerfile index ba5a843381a..5e9ca014173 100644 --- a/linters/r_lintr/Dockerfile +++ b/linters/r_lintr/Dockerfile @@ -10,13 +10,14 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM ghcr.io/assignuser/lintr-lib:0.2.0 as lintr-lib + #FROM__END ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,32 +30,40 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - libxml2 \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + g++ \ + libc-dev \ + libcurl \ + libgcc \ + libxml2-dev \ + libxml2-utils \ + linux-headers \ R \ R-dev \ - R-doc + R-doc \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -68,23 +77,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,30 +107,47 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # lintr installation -COPY --from=lintr-lib /usr/lib/R/library/ /home/r-library -RUN R -e "install.packages(list.dirs('/home/r-library',recursive = FALSE), repos = NULL, type = 'source')" +RUN mkdir -p /home/r-library \ + && cp -r /usr/lib/R/library/ /home/r-library/ \ + && Rscript -e "install.packages(c('lintr','purrr'), repos = 'https://cloud.r-project.org/')" \ + && R -e "install.packages(list.dirs('/home/r-library',recursive = FALSE), repos = NULL, type = 'source')" -#OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#OTHER__END ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -145,22 +173,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=R_LINTR \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=R_LINTR \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -173,8 +185,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=R_LINTR \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=R_LINTR \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/raku_raku/Dockerfile b/linters/raku_raku/Dockerfile index 6a90903ca98..c7eac2535aa 100644 --- a/linters/raku_raku/Dockerfile +++ b/linters/raku_raku/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,6 +97,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -108,20 +133,14 @@ ENV PATH="~/.raku/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -147,22 +166,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=RAKU_RAKU \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=RAKU_RAKU \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -175,8 +178,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=RAKU_RAKU \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=RAKU_RAKU \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/repository_git_diff/Dockerfile b/linters/repository_git_diff/Dockerfile index 7364d9e6cb4..bea7ddcde60 100644 --- a/linters/repository_git_diff/Dockerfile +++ b/linters/repository_git_diff/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,6 +97,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -99,20 +124,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -138,22 +157,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=REPOSITORY_GIT_DIFF \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=REPOSITORY_GIT_DIFF \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -166,8 +169,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=REPOSITORY_GIT_DIFF \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=REPOSITORY_GIT_DIFF \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/repository_goodcheck/Dockerfile b/linters/repository_goodcheck/Dockerfile index d3ee24d94ba..0b4d1d74ed7 100644 --- a/linters/repository_goodcheck/Dockerfile +++ b/linters/repository_goodcheck/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,32 +30,34 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ ruby \ ruby-dev \ ruby-bundler \ - ruby-rdoc + ruby-rdoc \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -68,23 +71,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -98,6 +103,26 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ goodcheck #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -105,20 +130,14 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -144,22 +163,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=REPOSITORY_GOODCHECK \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=REPOSITORY_GOODCHECK \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -172,8 +175,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=REPOSITORY_GOODCHECK \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=REPOSITORY_GOODCHECK \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/rst_rst_lint/Dockerfile b/linters/rst_rst_lint/Dockerfile index 997235a7b19..70638d5c052 100644 --- a/linters/rst_rst_lint/Dockerfile +++ b/linters/rst_rst_lint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'restructuredtext_lint' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/rst-lint" && cd "/venvs/rst-lint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir restructuredtext_lint && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/rst-lint/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=RST_RST_LINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=RST_RST_LINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=RST_RST_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=RST_RST_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/rst_rstcheck/Dockerfile b/linters/rst_rstcheck/Dockerfile index fbf02e0dadc..213bb5e8fc1 100644 --- a/linters/rst_rstcheck/Dockerfile +++ b/linters/rst_rstcheck/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'rstcheck' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/rstcheck" && cd "/venvs/rstcheck" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir rstcheck && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/rstcheck/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=RST_RSTCHECK \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=RST_RSTCHECK \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=RST_RSTCHECK \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=RST_RSTCHECK \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/rst_rstfmt/Dockerfile b/linters/rst_rstfmt/Dockerfile index e35ae8d0a87..9cea880ba62 100644 --- a/linters/rst_rstfmt/Dockerfile +++ b/linters/rst_rstfmt/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,28 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'sphinx<4.0' \ - 'rstfmt' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/rstfmt" && cd "/venvs/rstfmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir rstfmt && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/rstfmt/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -94,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -101,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -140,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=RST_RSTFMT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=RST_RSTFMT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -168,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=RST_RSTFMT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=RST_RSTFMT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/ruby_rubocop/Dockerfile b/linters/ruby_rubocop/Dockerfile index a3fbe224fa6..dbe96e6ddb0 100644 --- a/linters/ruby_rubocop/Dockerfile +++ b/linters/ruby_rubocop/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,32 +30,34 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ ruby \ ruby-dev \ ruby-bundler \ - ruby-rdoc + ruby-rdoc \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -68,23 +71,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -95,13 +100,33 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__START RUN echo 'gem: --no-document' >> ~/.gemrc && \ gem install \ - rubocop:0.82.0 \ - rubocop-github:0.16.0 \ - rubocop-performance:1.7.1 \ - rubocop-rails:2.5 \ - rubocop-rspec:1.41.0 + rubocop \ + rubocop-github \ + rubocop-performance \ + rubocop-rails \ + rubocop-rspec #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -109,20 +134,14 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -148,22 +167,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=RUBY_RUBOCOP \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=RUBY_RUBOCOP \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -176,8 +179,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=RUBY_RUBOCOP \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=RUBY_RUBOCOP \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/rust_clippy/Dockerfile b/linters/rust_clippy/Dockerfile index 9186543ba69..611eb861ccd 100644 --- a/linters/rust_clippy/Dockerfile +++ b/linters/rust_clippy/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,33 +97,45 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -#OTHER__START -# RUST installation -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + +#CARGO__START +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \ + && export PATH="/root/.cargo/bin:${PATH}" \ + && rustup component add clippy \ + && rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache ENV PATH="/root/.cargo/bin:${PATH}" +#CARGO__END -# clippy installation -RUN rustup component add clippy +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# -#OTHER__END +#COPY__START -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START + +#OTHER__END ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -144,22 +161,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=RUST_CLIPPY \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=RUST_CLIPPY \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -172,8 +173,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=RUST_CLIPPY \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=RUST_CLIPPY \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/salesforce_sfdx_scanner_apex/Dockerfile b/linters/salesforce_sfdx_scanner_apex/Dockerfile index 6d00725bad1..278a157b402 100644 --- a/linters/salesforce_sfdx_scanner_apex/Dockerfile +++ b/linters/salesforce_sfdx_scanner_apex/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,32 +30,34 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - openjdk8 \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + openjdk11 \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -68,24 +71,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - sfdx-cli +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + sfdx-cli && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -97,34 +117,53 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # SALESFORCE installation -ENV JAVA_HOME=/usr/lib/jvm/javaā€‘11ā€‘openjdk +ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk ENV PATH="$JAVA_HOME/bin:${PATH}" -RUN echo y|sfdx plugins:install sfdx-hardis +RUN echo y|sfdx plugins:install sfdx-hardis \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ # sfdx-scanner-apex installation -RUN sfdx plugins:install @salesforce/sfdx-scanner + && sfdx plugins:install @salesforce/sfdx-scanner \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache -#OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#OTHER__END ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -150,22 +189,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SALESFORCE_SFDX_SCANNER_APEX \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SALESFORCE_SFDX_SCANNER_APEX \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -178,8 +201,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SALESFORCE_SFDX_SCANNER_APEX \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SALESFORCE_SFDX_SCANNER_APEX \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/salesforce_sfdx_scanner_aura/Dockerfile b/linters/salesforce_sfdx_scanner_aura/Dockerfile index ffe63711f9f..156b4f8e74c 100644 --- a/linters/salesforce_sfdx_scanner_aura/Dockerfile +++ b/linters/salesforce_sfdx_scanner_aura/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,32 +30,34 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - openjdk8 \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + openjdk11 \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -68,24 +71,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - sfdx-cli +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + sfdx-cli && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -97,34 +117,53 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # SALESFORCE installation -ENV JAVA_HOME=/usr/lib/jvm/javaā€‘11ā€‘openjdk +ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk ENV PATH="$JAVA_HOME/bin:${PATH}" -RUN echo y|sfdx plugins:install sfdx-hardis +RUN echo y|sfdx plugins:install sfdx-hardis \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ # sfdx-scanner-aura installation -RUN sfdx plugins:install @salesforce/sfdx-scanner + && sfdx plugins:install @salesforce/sfdx-scanner \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache -#OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#OTHER__END ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -150,22 +189,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SALESFORCE_SFDX_SCANNER_AURA \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SALESFORCE_SFDX_SCANNER_AURA \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -178,8 +201,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SALESFORCE_SFDX_SCANNER_AURA \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SALESFORCE_SFDX_SCANNER_AURA \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/salesforce_sfdx_scanner_lwc/Dockerfile b/linters/salesforce_sfdx_scanner_lwc/Dockerfile index e57fed65869..563c2d3c301 100644 --- a/linters/salesforce_sfdx_scanner_lwc/Dockerfile +++ b/linters/salesforce_sfdx_scanner_lwc/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,32 +30,34 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - openjdk8 \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + openjdk11 \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -68,24 +71,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - sfdx-cli +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + sfdx-cli && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -97,34 +117,53 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # SALESFORCE installation -ENV JAVA_HOME=/usr/lib/jvm/javaā€‘11ā€‘openjdk +ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk ENV PATH="$JAVA_HOME/bin:${PATH}" -RUN echo y|sfdx plugins:install sfdx-hardis +RUN echo y|sfdx plugins:install sfdx-hardis \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ # sfdx-scanner-lwc installation -RUN sfdx plugins:install @salesforce/sfdx-scanner + && sfdx plugins:install @salesforce/sfdx-scanner \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache -#OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#OTHER__END ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -150,22 +189,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SALESFORCE_SFDX_SCANNER_LWC \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SALESFORCE_SFDX_SCANNER_LWC \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -178,8 +201,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SALESFORCE_SFDX_SCANNER_LWC \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SALESFORCE_SFDX_SCANNER_LWC \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/scala_scalafix/Dockerfile b/linters/scala_scalafix/Dockerfile index 9be484cecb3..592698b046a 100644 --- a/linters/scala_scalafix/Dockerfile +++ b/linters/scala_scalafix/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,29 +30,31 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - openjdk8 + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + openjdk11 \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -65,23 +68,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,34 +98,47 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # SCALA installation RUN curl -fLo coursier https://git.io/coursier-cli && \ - chmod +x coursier - + chmod +x coursier \ # scalafix installation -RUN ./coursier install scalafix --quiet --install-dir /usr/bin + && ./coursier install scalafix --quiet --install-dir /usr/bin && rm -rf /root/.cache #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -146,22 +164,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SCALA_SCALAFIX \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SCALA_SCALAFIX \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -174,8 +176,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SCALA_SCALAFIX \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SCALA_SCALAFIX \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/snakemake_lint/Dockerfile b/linters/snakemake_lint/Dockerfile index 1691ac2cbd7..71989928239 100644 --- a/linters/snakemake_lint/Dockerfile +++ b/linters/snakemake_lint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'snakemake' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/snakemake/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SNAKEMAKE_LINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SNAKEMAKE_LINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SNAKEMAKE_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SNAKEMAKE_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/snakemake_snakefmt/Dockerfile b/linters/snakemake_snakefmt/Dockerfile index 195ad4fb599..ddbd447eafe 100644 --- a/linters/snakemake_snakefmt/Dockerfile +++ b/linters/snakemake_snakefmt/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'snakefmt' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/snakefmt/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SNAKEMAKE_SNAKEFMT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SNAKEMAKE_SNAKEFMT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SNAKEMAKE_SNAKEFMT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SNAKEMAKE_SNAKEFMT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/spell_cspell/Dockerfile b/linters/spell_cspell/Dockerfile index 8e1a6568d53..2dd1f04d270 100644 --- a/linters/spell_cspell/Dockerfile +++ b/linters/spell_cspell/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - cspell +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + cspell && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SPELL_CSPELL \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SPELL_CSPELL \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SPELL_CSPELL \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SPELL_CSPELL \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/spell_misspell/Dockerfile b/linters/spell_misspell/Dockerfile index da0cd11a7db..df99adf8ef7 100644 --- a/linters/spell_misspell/Dockerfile +++ b/linters/spell_misspell/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,31 +97,49 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # misspell installation -RUN curl -L -o ./install-misspell.sh https://git.io/misspell \ - && sh ./install-misspell.sh +RUN ML_THIRD_PARTY_DIR="/third-party/misspell" \ + && mkdir -p ${ML_THIRD_PARTY_DIR} \ + && curl -L -o ${ML_THIRD_PARTY_DIR}/install-misspell.sh https://git.io/misspell \ + && sh .${ML_THIRD_PARTY_DIR}/install-misspell.sh \ + && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ + && find /tmp -path '/tmp/tmp.*' -type f -name 'misspell*' -delete -o -type d -empty -delete #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +165,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SPELL_MISSPELL \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SPELL_MISSPELL \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +177,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SPELL_MISSPELL \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SPELL_MISSPELL \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/spell_proselint/Dockerfile b/linters/spell_proselint/Dockerfile new file mode 100644 index 00000000000..78d0b0d68f6 --- /dev/null +++ b/linters/spell_proselint/Dockerfile @@ -0,0 +1,210 @@ +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Get base image # +################## +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START + +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#PIP__START + +#PIP__END + +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/proselint/bin +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY megalinter /megalinter +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SPELL_PROSELINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SPELL_PROSELINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/sql_sql_lint/Dockerfile b/linters/sql_sql_lint/Dockerfile index b6791c09bc8..c47baef7185 100644 --- a/linters/sql_sql_lint/Dockerfile +++ b/linters/sql_sql_lint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - sql-lint +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + sql-lint && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SQL_SQL_LINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SQL_SQL_LINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SQL_SQL_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SQL_SQL_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/sql_sqlfluff/Dockerfile b/linters/sql_sqlfluff/Dockerfile index c3e219b3f07..a3e1f2362d8 100644 --- a/linters/sql_sqlfluff/Dockerfile +++ b/linters/sql_sqlfluff/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'sqlfluff' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/sqlfluff/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SQL_SQLFLUFF \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SQL_SQLFLUFF \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SQL_SQLFLUFF \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SQL_SQLFLUFF \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/sql_tsqllint/Dockerfile b/linters/sql_tsqllint/Dockerfile index 1786943fea0..710e913d09a 100644 --- a/linters/sql_tsqllint/Dockerfile +++ b/linters/sql_tsqllint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,23 +30,23 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ icu-libs \ libcurl \ libintl \ @@ -53,12 +54,14 @@ RUN apk add --update --no-cache \ libstdc++ \ lttng-ust-dev \ zlib \ - zlib-dev + zlib-dev \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -72,23 +75,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -100,6 +105,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -114,20 +139,14 @@ RUN dotnet tool install --global TSQLLint #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -153,22 +172,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SQL_TSQLLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SQL_TSQLLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -181,8 +184,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SQL_TSQLLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SQL_TSQLLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/swift_swiftlint/Dockerfile b/linters/swift_swiftlint/Dockerfile index 657cd6729f7..810d0922b93 100644 --- a/linters/swift_swiftlint/Dockerfile +++ b/linters/swift_swiftlint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,30 +30,32 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ docker \ - openrc + openrc \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -66,23 +69,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -94,6 +99,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -101,20 +126,14 @@ ENV PATH="/node_modules/.bin:${PATH}" RUN rc-update add docker boot && rc-service docker start || true #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -140,22 +159,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=SWIFT_SWIFTLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=SWIFT_SWIFTLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -168,8 +171,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SWIFT_SWIFTLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SWIFT_SWIFTLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/tekton_tekton_lint/Dockerfile b/linters/tekton_tekton_lint/Dockerfile index 8ae3279ffa9..19fa22a7a36 100644 --- a/linters/tekton_tekton_lint/Dockerfile +++ b/linters/tekton_tekton_lint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - tekton-lint +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + tekton-lint && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=TEKTON_TEKTON_LINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=TEKTON_TEKTON_LINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=TEKTON_TEKTON_LINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=TEKTON_TEKTON_LINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/terraform_kics/Dockerfile b/linters/terraform_kics/Dockerfile index 3eedbdd5141..c6643c35499 100644 --- a/linters/terraform_kics/Dockerfile +++ b/linters/terraform_kics/Dockerfile @@ -16,7 +16,8 @@ FROM checkmarx/kics:alpine as kics ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,32 +97,47 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START +COPY --from=kics /app/bin/kics /usr/bin/ +COPY --from=kics /app/bin/assets /opt/kics/assets/ +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # kics installation -COPY --from=kics /app/bin/kics /usr/bin/ +# Managed with COPY --from=kics /app/bin/kics /usr/bin/ RUN mkdir -p /opt/kics/assets ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/assets/libraries -COPY --from=kics /app/bin/assets /opt/kics/assets/ +# Managed with COPY --from=kics /app/bin/assets /opt/kics/assets/ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -143,22 +163,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=TERRAFORM_KICS \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=TERRAFORM_KICS \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -171,8 +175,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=TERRAFORM_KICS \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=TERRAFORM_KICS \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/terraform_terraform_fmt/Dockerfile b/linters/terraform_terraform_fmt/Dockerfile index bb5b77da70a..d56bba722a7 100644 --- a/linters/terraform_terraform_fmt/Dockerfile +++ b/linters/terraform_terraform_fmt/Dockerfile @@ -16,7 +16,8 @@ FROM alpine/terragrunt:latest as terragrunt ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,29 +97,43 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START +COPY --from=terragrunt /bin/terraform /usr/bin/ +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # terraform-fmt installation -COPY --from=terragrunt /bin/terraform /usr/bin/ +# Managed with COPY --from=terragrunt /bin/terraform /usr/bin/ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -140,22 +159,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=TERRAFORM_TERRAFORM_FMT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=TERRAFORM_TERRAFORM_FMT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -168,8 +171,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=TERRAFORM_TERRAFORM_FMT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=TERRAFORM_TERRAFORM_FMT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/terraform_terragrunt/Dockerfile b/linters/terraform_terragrunt/Dockerfile index 55a2860e25d..e8afbfab27f 100644 --- a/linters/terraform_terragrunt/Dockerfile +++ b/linters/terraform_terragrunt/Dockerfile @@ -16,7 +16,8 @@ FROM alpine/terragrunt:latest as terragrunt ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -64,23 +67,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -92,29 +97,43 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START +COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START # terragrunt installation -COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +# Managed with COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -140,22 +159,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=TERRAFORM_TERRAGRUNT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=TERRAFORM_TERRAGRUNT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -168,8 +171,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=TERRAFORM_TERRAGRUNT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=TERRAFORM_TERRAGRUNT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/typescript_prettier/Dockerfile b/linters/typescript_prettier/Dockerfile index fd99f3c3774..0cc4c8f4bc5 100644 --- a/linters/typescript_prettier/Dockerfile +++ b/linters/typescript_prettier/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,25 +70,42 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ typescript \ - prettier + prettier && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -97,6 +117,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -104,20 +144,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -143,22 +177,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=TYPESCRIPT_PRETTIER \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=TYPESCRIPT_PRETTIER \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -171,8 +189,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=TYPESCRIPT_PRETTIER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=TYPESCRIPT_PRETTIER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/typescript_standard/Dockerfile b/linters/typescript_standard/Dockerfile index beef0006b29..7795cc14637 100644 --- a/linters/typescript_standard/Dockerfile +++ b/linters/typescript_standard/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,27 +70,44 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ typescript \ - standard@17.0.0 \ + standard \ @typescript-eslint/eslint-plugin \ - @typescript-eslint/parser + @typescript-eslint/parser && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -99,6 +119,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -106,20 +146,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -145,22 +179,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=TYPESCRIPT_STANDARD \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=TYPESCRIPT_STANDARD \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -173,8 +191,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=TYPESCRIPT_STANDARD \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=TYPESCRIPT_STANDARD \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/vbdotnet_dotnet_format/Dockerfile b/linters/vbdotnet_dotnet_format/Dockerfile index 77dd03eafa9..7182f448179 100644 --- a/linters/vbdotnet_dotnet_format/Dockerfile +++ b/linters/vbdotnet_dotnet_format/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,23 +30,23 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ icu-libs \ libcurl \ libintl \ @@ -53,12 +54,14 @@ RUN apk add --update --no-cache \ libstdc++ \ lttng-ust-dev \ zlib \ - zlib-dev + zlib-dev \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -72,23 +75,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -100,6 +105,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -113,20 +138,14 @@ ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -152,22 +171,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=VBDOTNET_DOTNET_FORMAT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=VBDOTNET_DOTNET_FORMAT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -180,8 +183,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=VBDOTNET_DOTNET_FORMAT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=VBDOTNET_DOTNET_FORMAT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/xml_xmllint/Dockerfile b/linters/xml_xmllint/Dockerfile index 7dc7870d696..bbec254de1f 100644 --- a/linters/xml_xmllint/Dockerfile +++ b/linters/xml_xmllint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,32 +30,34 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ libc-dev \ libxml2-dev \ libxml2-utils \ - libgcc + libgcc \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -68,23 +71,25 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +101,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +128,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +161,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=XML_XMLLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=XML_XMLLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +173,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=XML_XMLLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=XML_XMLLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/yaml_prettier/Dockerfile b/linters/yaml_prettier/Dockerfile index 6e1b6b219cd..959e00e424c 100644 --- a/linters/yaml_prettier/Dockerfile +++ b/linters/yaml_prettier/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - prettier +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + prettier && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=YAML_PRETTIER \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=YAML_PRETTIER \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=YAML_PRETTIER \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=YAML_PRETTIER \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/yaml_v8r/Dockerfile b/linters/yaml_v8r/Dockerfile index bbb578ad50e..3c87c2f6250 100644 --- a/linters/yaml_v8r/Dockerfile +++ b/linters/yaml_v8r/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,31 +30,33 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START RUN apk add --update --no-cache \ - nodejs \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ npm \ - yarn + nodejs-current \ + yarn \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -67,24 +70,41 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIP__END +#PIPVENV__START + +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START -RUN npm install --no-cache --ignore-scripts \ - v8r@0.6.1 +WORKDIR /node-deps +RUN npm --no-cache install --ignore-scripts \ + v8r && \ + npm audit fix --audit-level=critical || true \ + && npm cache clean --force || true \ + && rm -rf /root/.npm/_cacache \ + && find . -name "*.d.ts" -delete \ + && find . -name "*.map" -delete \ + && find . -name "*.npmignore" -delete \ + && find . -name "*.travis.yml" -delete \ + && find . -name "CHANGELOG.md" -delete \ + && find . -name "README.md" -delete \ + && find . -name ".package-lock.json" -delete \ + && find . -name "package-lock.json" -delete \ + && find . -name "README.md" -delete +WORKDIR / + #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -96,6 +116,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -103,20 +143,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -142,22 +176,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=YAML_V8R \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=YAML_V8R \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -170,8 +188,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=YAML_V8R \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=YAML_V8R \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/linters/yaml_yamllint/Dockerfile b/linters/yaml_yamllint/Dockerfile index c35878816d3..1fb36dfc80e 100644 --- a/linters/yaml_yamllint/Dockerfile +++ b/linters/yaml_yamllint/Dockerfile @@ -16,7 +16,8 @@ ################## # Get base image # ################## -FROM python:3.9.7-alpine3.13 +# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed +FROM python:3.10.4-alpine3.16 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -29,28 +30,30 @@ FROM python:3.9.7-alpine3.13 # Run APK installs # #################### -# APK Packages used by mega-linter core architecture -RUN apk add --update --no-cache \ - bash \ - curl \ - gcc \ - git \ - libffi-dev \ - make \ - musl-dev \ - openssh && \ - git config --global core.autocrlf true +WORKDIR / ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #APK__START - +RUN apk add --update --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true #APK__END -# PATH for golang +# PATH for golang & python ENV GOROOT=/usr/lib/go \ GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ @@ -61,27 +64,31 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #PIP__START -RUN pip3 install --no-cache-dir --upgrade \ - 'yamllint' + #PIP__END +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/yamllint/bin +#PIPVENV__END + ############################ # Install NPM dependencies # ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# -# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile -RUN npm install npm@latest-6 -g || true && \ - # Disable package-lock.json to avoid sudden crash. Try to remove later if possible - echo 'package-lock=false' >> .npmrc || true - +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production #NPM__START #NPM__END # Add node packages to path # -ENV PATH="/node_modules/.bin:${PATH}" +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" ############################## # Installs ruby dependencies # @@ -93,6 +100,26 @@ ENV PATH="/node_modules/.bin:${PATH}" #GEM__END +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# @@ -100,20 +127,14 @@ ENV PATH="/node_modules/.bin:${PATH}" #OTHER__END -###################### -# Set the entrypoint # -###################### -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] - ################################ # Installs python dependencies # ################################ COPY megalinter /megalinter -RUN python /megalinter/setup.py install \ - && python /megalinter/setup.py clean --all \ - && rm -rf /var/cache/apk/* +RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ + && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ + && rm -rf /var/cache/apk/* \ + && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf ####################################### # Copy scripts and rules to container # @@ -139,22 +160,6 @@ ENV BUILD_DATE=$BUILD_DATE \ ENV MEGALINTER_FLAVOR=none #FLAVOR__END -#EXTRA_DOCKERFILE_LINES__START -ENV ENABLE_LINTERS=YAML_YAMLLINT \ - FLAVOR_SUGGESTIONS=false \ - SINGLE_LINTER=YAML_YAMLLINT \ - PRINT_ALPACA=false \ - LOG_FILE=none \ - SARIF_REPORTER=true \ - TEXT_REPORTER=false \ - UPDATED_SOURCES_REPORTER=false \ - GITHUB_STATUS_REPORTER=false \ - GITHUB_COMMENT_REPORTER=false \ - EMAIL_REPORTER=false \ - FILEIO_REPORTER=false \ - CONFIG_REPORTER=false -#EXTRA_DOCKERFILE_LINES__END - ######################################### # Label the instance and set maintainer # ######################################### @@ -167,8 +172,39 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.revision=$BUILD_REVISION \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="Nicolas Vuillamy " \ - org.opencontainers.image.url="https://megalinter.github.io" \ - org.opencontainers.image.source="https://github.com/megalinter/megalinter" \ - org.opencontainers.image.documentation="https://megalinter.github.io" \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ org.opencontainers.image.vendor="Nicolas Vuillamy" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=YAML_YAMLLINT \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=YAML_YAMLLINT \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END From 1af19e07ed56af962902468292882403512e0bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Wed, 1 Feb 2023 00:33:49 +0100 Subject: [PATCH 39/63] Fixes --- .automation/test/markdown/markdown_fix_1.md | 2 +- .automation/test/markdown/markdown_fix_2.md | 2 +- .../bicep.megalinter-descriptor.yml | 1 + .../protobuf.megalinter-descriptor.yml | 3 ++- megalinter/linters/ProtolintLinter.py | 21 +++++++++++++++++++ .../tests/test_megalinter/LinterTestRoot.py | 11 ++++++++-- 6 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 megalinter/linters/ProtolintLinter.py diff --git a/.automation/test/markdown/markdown_fix_1.md b/.automation/test/markdown/markdown_fix_1.md index 8b721eca790..688deba8fec 100644 --- a/.automation/test/markdown/markdown_fix_1.md +++ b/.automation/test/markdown/markdown_fix_1.md @@ -5,7 +5,7 @@ This is just standard good markdown. ## Second level header This header follows the step down from `level 1`. - + - Here it *is* - Some more **indention** - why so much? diff --git a/.automation/test/markdown/markdown_fix_2.md b/.automation/test/markdown/markdown_fix_2.md index 8b721eca790..688deba8fec 100644 --- a/.automation/test/markdown/markdown_fix_2.md +++ b/.automation/test/markdown/markdown_fix_2.md @@ -5,7 +5,7 @@ This is just standard good markdown. ## Second level header This header follows the step down from `level 1`. - + - Here it *is* - Some more **indention** - why so much? diff --git a/megalinter/descriptors/bicep.megalinter-descriptor.yml b/megalinter/descriptors/bicep.megalinter-descriptor.yml index 67b3a332670..3ddf8f61ad9 100644 --- a/megalinter/descriptors/bicep.megalinter-descriptor.yml +++ b/megalinter/descriptors/bicep.megalinter-descriptor.yml @@ -34,6 +34,7 @@ linters: - ARG BICEP_EXE='bicep' - ARG BICEP_URI='https://github.com/Azure/bicep/releases/latest/download/bicep-linux-musl-x64' - ARG BICEP_DIR='/usr/local/bin' + - ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 - | RUN curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "${BICEP_URI}" \ && chmod +x "${BICEP_EXE}" \ diff --git a/megalinter/descriptors/protobuf.megalinter-descriptor.yml b/megalinter/descriptors/protobuf.megalinter-descriptor.yml index 85ef785c269..9e32ca428af 100644 --- a/megalinter/descriptors/protobuf.megalinter-descriptor.yml +++ b/megalinter/descriptors/protobuf.megalinter-descriptor.yml @@ -6,7 +6,8 @@ file_extensions: - ".proto" linters: # Protolint - - linter_name: protolint + - class: ProtolintLinter + linter_name: protolint linter_url: https://github.com/yoheimuta/protolint linter_repo: https://github.com/yoheimuta/protolint linter_rules_url: https://github.com/yoheimuta/protolint#rules diff --git a/megalinter/linters/ProtolintLinter.py b/megalinter/linters/ProtolintLinter.py new file mode 100644 index 00000000000..3c8763882a8 --- /dev/null +++ b/megalinter/linters/ProtolintLinter.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +""" +Use Protolint to analyze protobuf files +""" + +import logging +import subprocess + +from megalinter import Linter, utils + + +class ProtolintLinter(Linter): + + def process_linter(self, file=None): + return_code, return_output = super().process_linter(file) + + # Although it fixes the errors, it returns exit code 1 instead of 0 + if self.apply_fixes is True and return_code == 1: + return_code = 0 + + return return_code, return_output diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 9de20784509..3c66ddf9b2a 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -76,7 +76,7 @@ def test_format_fix(self): if self.linter_name == "prettier": config.set_value("JAVASCRIPT_DEFAULT_STYLE", "prettier") - if self.linter_name == "standard": + if self.descriptor_id == "JAVASCRIPT" and self.linter_name == "standard": config.set_value("JAVASCRIPT_DEFAULT_STYLE", "standard") if self.linter_name == "xmllint": @@ -85,13 +85,20 @@ def test_format_fix(self): linter = self.get_linter_instance() - if self.linter_name == "standard": + if self.descriptor_id == "JAVASCRIPT" and self.linter_name == "standard": config.set_value( "JAVASCRIPT_STANDARD_ARGUMENTS", config.get("DEFAULT_WORKSPACE").replace("\\", "/") + f"/{linter.test_folder}/*_fix_*.js", ) + if self.descriptor_id == "TYPESCRIPT" and self.linter_name == "standard": + config.set_value( + "TYPESCRIPT_STANDARD_ARGUMENTS", + config.get("DEFAULT_WORKSPACE").replace("\\", "/") + + f"/{linter.test_folder}/*_fix_*.ts", + ) + if self.linter_name == "eslint-plugin-jsonc": config.set_value( "JSON_ESLINT_PLUGIN_JSONC_ARGUMENTS", From 7be3e04ae511c1b88543538611aa63f506bc9b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 5 Feb 2023 21:46:57 +0100 Subject: [PATCH 40/63] Add input files --- .automation/test/spell/spell_fix_1.js | 2 ++ .automation/test/spell/spell_fix_1.md | 1 + .../test/swift/fix/Sources/{Task.swift => Task_fix.swift} | 2 +- .automation/test/typescript/typescript_fix_1.ts | 1 + .automation/test/typescript/typescript_fix_2.ts | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .automation/test/spell/spell_fix_1.js create mode 100644 .automation/test/spell/spell_fix_1.md rename .automation/test/swift/fix/Sources/{Task.swift => Task_fix.swift} (92%) diff --git a/.automation/test/spell/spell_fix_1.js b/.automation/test/spell/spell_fix_1.js new file mode 100644 index 00000000000..ecf42a845e0 --- /dev/null +++ b/.automation/test/spell/spell_fix_1.js @@ -0,0 +1,2 @@ +const langauge = true; +console.log(langauge); diff --git a/.automation/test/spell/spell_fix_1.md b/.automation/test/spell/spell_fix_1.md new file mode 100644 index 00000000000..c4a3d8f9aa0 --- /dev/null +++ b/.automation/test/spell/spell_fix_1.md @@ -0,0 +1 @@ +- Correct some wierd links in `README` from `Mega-Linter` to `MegaLinter` (#1030) diff --git a/.automation/test/swift/fix/Sources/Task.swift b/.automation/test/swift/fix/Sources/Task_fix.swift similarity index 92% rename from .automation/test/swift/fix/Sources/Task.swift rename to .automation/test/swift/fix/Sources/Task_fix.swift index 9f83bb01a76..ce3be7f83a2 100644 --- a/.automation/test/swift/fix/Sources/Task.swift +++ b/.automation/test/swift/fix/Sources/Task_fix.swift @@ -6,7 +6,7 @@ // Copyright Ā© 2019 Suyeol Jeon. All rights reserved. // -import SwiftUI +import SwiftUI struct Task: Equatable, Hashable, Codable, Identifiable { let id: UUID diff --git a/.automation/test/typescript/typescript_fix_1.ts b/.automation/test/typescript/typescript_fix_1.ts index d208f88b84f..df79f77f3ed 100644 --- a/.automation/test/typescript/typescript_fix_1.ts +++ b/.automation/test/typescript/typescript_fix_1.ts @@ -1 +1,2 @@ const str: String = 'foo'; +console.log(str) diff --git a/.automation/test/typescript/typescript_fix_2.ts b/.automation/test/typescript/typescript_fix_2.ts index d208f88b84f..df79f77f3ed 100644 --- a/.automation/test/typescript/typescript_fix_2.ts +++ b/.automation/test/typescript/typescript_fix_2.ts @@ -1 +1,2 @@ const str: String = 'foo'; +console.log(str) From 43a18c691223c9c143ee14c372cf907457bf3688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 5 Feb 2023 21:47:13 +0100 Subject: [PATCH 41/63] Fix file filter logic --- megalinter/tests/test_megalinter/helpers/utilstest.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 6763cb5659e..6cf7c99b9a3 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -1,5 +1,6 @@ import contextlib import difflib +import glob import io import json import logging @@ -623,10 +624,14 @@ def test_linter_format_fix(linter, test_self): file_map = {} - for file_name in os.listdir(workspace): - file = os.path.join(workspace, file_name) - if os.path.isfile(file) is False or "fix" not in file: + for file in glob.iglob("{workspace}/**/*", recursive=True): + file_name = os.path.basename(file) + _, file_extension = os.path.splitext(file_name) + if len(linter.file_extensions) > 0 and file_extension not in linter.file_extensions: continue + elif "fix" not in file_name: + continue + with open(file, "r", encoding="utf-8") as f_expected: content_expected = f_expected.read() file_map[file] = content_expected From 169d249702442bf349f33d3128ae7f7c1c42c0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 5 Feb 2023 22:36:54 +0100 Subject: [PATCH 42/63] Remove unused imports --- megalinter/linters/ProtolintLinter.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/megalinter/linters/ProtolintLinter.py b/megalinter/linters/ProtolintLinter.py index 3c8763882a8..e02972d1878 100644 --- a/megalinter/linters/ProtolintLinter.py +++ b/megalinter/linters/ProtolintLinter.py @@ -3,10 +3,7 @@ Use Protolint to analyze protobuf files """ -import logging -import subprocess - -from megalinter import Linter, utils +from megalinter import Linter class ProtolintLinter(Linter): From b9b5b9052b8c507ca92941b4be3756dddf1b09cb Mon Sep 17 00:00:00 2001 From: bdovaz Date: Sun, 5 Feb 2023 22:12:58 +0000 Subject: [PATCH 43/63] [MegaLinter] Apply linters fixes --- .automation/build.py | 4 ++-- megalinter/linters/ProtolintLinter.py | 3 +-- megalinter/tests/test_megalinter/helpers/utilstest.py | 5 ++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.automation/build.py b/.automation/build.py index 4c4e6ef00dd..8d7f8252fe3 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -576,7 +576,7 @@ def generate_linter_dockerfiles(): # Browse descriptor linters for linter in descriptor_linters: # Do not build standalone linter if it does not manage SARIF - #if linter.can_output_sarif is False: + # if linter.can_output_sarif is False: # continue # Unique linter dockerfile linter_lower_name = linter.name.lower() @@ -3032,7 +3032,7 @@ def update_workflows_linters(): for descriptor in descriptors: for linter in descriptor["linters"]: - #if "can_output_sarif" not in linter or linter["can_output_sarif"] is False: + # if "can_output_sarif" not in linter or linter["can_output_sarif"] is False: # continue if "name" in linter: diff --git a/megalinter/linters/ProtolintLinter.py b/megalinter/linters/ProtolintLinter.py index e02972d1878..8bce1d26d51 100644 --- a/megalinter/linters/ProtolintLinter.py +++ b/megalinter/linters/ProtolintLinter.py @@ -7,12 +7,11 @@ class ProtolintLinter(Linter): - def process_linter(self, file=None): return_code, return_output = super().process_linter(file) # Although it fixes the errors, it returns exit code 1 instead of 0 if self.apply_fixes is True and return_code == 1: return_code = 0 - + return return_code, return_output diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 6cf7c99b9a3..c88a396b4bf 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -627,7 +627,10 @@ def test_linter_format_fix(linter, test_self): for file in glob.iglob("{workspace}/**/*", recursive=True): file_name = os.path.basename(file) _, file_extension = os.path.splitext(file_name) - if len(linter.file_extensions) > 0 and file_extension not in linter.file_extensions: + if ( + len(linter.file_extensions) > 0 + and file_extension not in linter.file_extensions + ): continue elif "fix" not in file_name: continue From 76479899cac5df9768121ab62339ba6f7ae5059f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Mon, 6 Feb 2023 22:44:04 +0100 Subject: [PATCH 44/63] Fix linter test generation --- .automation/build.py | 22 +++++++--- .../linters/action_actionlint_test.py | 41 ------------------- ...sh_bash_exec_test.py => bash_exec_test.py} | 2 +- ...t_eslint_test.py => javascript_es_test.py} | 2 +- .../kubernetes_kubeconform_test.py~HEAD | 14 ------- .../kubernetes_kubeconform_test.py~HEAD_0 | 14 ------- .../kubernetes_kubeconform_test.py~main | 14 ------- .../kubernetes_kubeconform_test.py~main_0 | 14 ------- .../linters/php_phplint_test.py~HEAD | 14 ------- .../linters/php_phplint_test.py~main | 14 ------- .../linters/repository_semgrep_test.py | 21 ---------- ...akemake_test.py => snakemake_lint_test.py} | 2 +- ...t_eslint_test.py => typescript_es_test.py} | 2 +- 13 files changed, 21 insertions(+), 155 deletions(-) rename megalinter/tests/test_megalinter/linters/{bash_bash_exec_test.py => bash_exec_test.py} (86%) rename megalinter/tests/test_megalinter/linters/{javascript_eslint_test.py => javascript_es_test.py} (86%) delete mode 100644 megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~HEAD delete mode 100644 megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~HEAD_0 delete mode 100644 megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~main delete mode 100644 megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~main_0 delete mode 100644 megalinter/tests/test_megalinter/linters/php_phplint_test.py~HEAD delete mode 100644 megalinter/tests/test_megalinter/linters/php_phplint_test.py~main rename megalinter/tests/test_megalinter/linters/{snakemake_snakemake_test.py => snakemake_lint_test.py} (85%) rename megalinter/tests/test_megalinter/linters/{typescript_eslint_test.py => typescript_es_test.py} (86%) diff --git a/.automation/build.py b/.automation/build.py index 8d7f8252fe3..e44e88302ed 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -662,10 +662,23 @@ def generate_linter_dockerfiles(): # Automatically generate a test class for each linter class # This could be done dynamically at runtime, but having a physical class is easier for developers in IDEs def generate_linter_test_classes(): + test_linters_root = ( + f"{REPO_HOME}/megalinter/tests/test_megalinter/linters" + ) + + # Remove all the contents of test_linters_root beforehand so that the result is deterministic + shutil.rmtree(os.path.realpath(test_linters_root)) + os.makedirs(os.path.realpath(test_linters_root)) + linters = megalinter.linter_factory.list_all_linters() for linter in linters: - lang_lower = linter.descriptor_id.lower() - linter_name_lower = linter.linter_name.lower().replace("-", "_") + if linter.name is not None: + linter_name = linter.name + else: + lang_lower = linter.descriptor_id.lower() + linter_name = f"{lang_lower}_{linter.linter_name}" + + linter_name_lower = linter_name.lower().replace("-", "_") test_class_code = f"""# !/usr/bin/env python3 \"\"\" Unit tests for {linter.descriptor_id} linter {linter.linter_name} @@ -677,13 +690,12 @@ def generate_linter_test_classes(): from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot -class {lang_lower}_{linter_name_lower}_test(TestCase, LinterTestRoot): +class {linter_name_lower}_test(TestCase, LinterTestRoot): descriptor_id = "{linter.descriptor_id}" linter_name = "{linter.linter_name}" """ test_class_file_name = ( - f"{REPO_HOME}/megalinter/tests/test_megalinter/" - + f"linters/{lang_lower}_{linter_name_lower}_test.py" + f"{test_linters_root}/{linter_name_lower}_test.py" ) if not os.path.isfile(test_class_file_name): file = open( diff --git a/megalinter/tests/test_megalinter/linters/action_actionlint_test.py b/megalinter/tests/test_megalinter/linters/action_actionlint_test.py index e5751990744..12cec7680d2 100644 --- a/megalinter/tests/test_megalinter/linters/action_actionlint_test.py +++ b/megalinter/tests/test_megalinter/linters/action_actionlint_test.py @@ -6,50 +6,9 @@ from unittest import TestCase -from megalinter.tests.test_megalinter.helpers import utilstest from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot class action_actionlint_test(TestCase, LinterTestRoot): descriptor_id = "ACTION" linter_name = "actionlint" - - def test_include_success(self): - utilstest.linter_test_setup( - { - "additional_test_variables": { - "ACTION_FILTER_REGEX_INCLUDE": "^actionlint_" - } - } - ) - utilstest.test_linter_success(self.get_linter_instance(), self) - - def test_include_failure(self): - utilstest.linter_test_setup( - { - "additional_test_variables": { - "ACTION_FILTER_REGEX_INCLUDE": "^actionlint_" - } - } - ) - utilstest.test_linter_failure(self.get_linter_instance(), self) - - def test_exclude_success(self): - utilstest.linter_test_setup( - { - "additional_test_variables": { - "ACTION_FILTER_REGEX_EXCLUDE": "/actionlint_" - } - } - ) - utilstest.test_linter_success(self.get_linter_instance(), self) - - def test_exclude_failure(self): - utilstest.linter_test_setup( - { - "additional_test_variables": { - "ACTION_FILTER_REGEX_EXCLUDE": "/actionlint_" - } - } - ) - utilstest.test_linter_failure(self.get_linter_instance(), self) diff --git a/megalinter/tests/test_megalinter/linters/bash_bash_exec_test.py b/megalinter/tests/test_megalinter/linters/bash_exec_test.py similarity index 86% rename from megalinter/tests/test_megalinter/linters/bash_bash_exec_test.py rename to megalinter/tests/test_megalinter/linters/bash_exec_test.py index 4f26bfc521d..84019591c47 100644 --- a/megalinter/tests/test_megalinter/linters/bash_bash_exec_test.py +++ b/megalinter/tests/test_megalinter/linters/bash_exec_test.py @@ -9,6 +9,6 @@ from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot -class bash_bash_exec_test(TestCase, LinterTestRoot): +class bash_exec_test(TestCase, LinterTestRoot): descriptor_id = "BASH" linter_name = "bash-exec" diff --git a/megalinter/tests/test_megalinter/linters/javascript_eslint_test.py b/megalinter/tests/test_megalinter/linters/javascript_es_test.py similarity index 86% rename from megalinter/tests/test_megalinter/linters/javascript_eslint_test.py rename to megalinter/tests/test_megalinter/linters/javascript_es_test.py index 040e1b4d1a8..3289aef68f4 100644 --- a/megalinter/tests/test_megalinter/linters/javascript_eslint_test.py +++ b/megalinter/tests/test_megalinter/linters/javascript_es_test.py @@ -9,6 +9,6 @@ from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot -class javascript_eslint_test(TestCase, LinterTestRoot): +class javascript_es_test(TestCase, LinterTestRoot): descriptor_id = "JAVASCRIPT" linter_name = "eslint" diff --git a/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~HEAD b/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~HEAD deleted file mode 100644 index 43b7e117118..00000000000 --- a/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~HEAD +++ /dev/null @@ -1,14 +0,0 @@ -# !/usr/bin/env python3 -""" -Unit tests for KUBERNETES linter kubeconform -This class has been automatically @generated by .automation/build.py, please do not update it manually -""" - -from unittest import TestCase - -from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot - - -class kubernetes_kubeconform_test(TestCase, LinterTestRoot): - descriptor_id = "KUBERNETES" - linter_name = "kubeconform" diff --git a/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~HEAD_0 b/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~HEAD_0 deleted file mode 100644 index 43b7e117118..00000000000 --- a/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~HEAD_0 +++ /dev/null @@ -1,14 +0,0 @@ -# !/usr/bin/env python3 -""" -Unit tests for KUBERNETES linter kubeconform -This class has been automatically @generated by .automation/build.py, please do not update it manually -""" - -from unittest import TestCase - -from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot - - -class kubernetes_kubeconform_test(TestCase, LinterTestRoot): - descriptor_id = "KUBERNETES" - linter_name = "kubeconform" diff --git a/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~main b/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~main deleted file mode 100644 index 43b7e117118..00000000000 --- a/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~main +++ /dev/null @@ -1,14 +0,0 @@ -# !/usr/bin/env python3 -""" -Unit tests for KUBERNETES linter kubeconform -This class has been automatically @generated by .automation/build.py, please do not update it manually -""" - -from unittest import TestCase - -from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot - - -class kubernetes_kubeconform_test(TestCase, LinterTestRoot): - descriptor_id = "KUBERNETES" - linter_name = "kubeconform" diff --git a/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~main_0 b/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~main_0 deleted file mode 100644 index 43b7e117118..00000000000 --- a/megalinter/tests/test_megalinter/linters/kubernetes_kubeconform_test.py~main_0 +++ /dev/null @@ -1,14 +0,0 @@ -# !/usr/bin/env python3 -""" -Unit tests for KUBERNETES linter kubeconform -This class has been automatically @generated by .automation/build.py, please do not update it manually -""" - -from unittest import TestCase - -from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot - - -class kubernetes_kubeconform_test(TestCase, LinterTestRoot): - descriptor_id = "KUBERNETES" - linter_name = "kubeconform" diff --git a/megalinter/tests/test_megalinter/linters/php_phplint_test.py~HEAD b/megalinter/tests/test_megalinter/linters/php_phplint_test.py~HEAD deleted file mode 100644 index c82a2ae011d..00000000000 --- a/megalinter/tests/test_megalinter/linters/php_phplint_test.py~HEAD +++ /dev/null @@ -1,14 +0,0 @@ -# !/usr/bin/env python3 -""" -Unit tests for PHP linter phplint -This class has been automatically @generated by .automation/build.py, please do not update it manually -""" - -from unittest import TestCase - -from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot - - -class php_phplint_test(TestCase, LinterTestRoot): - descriptor_id = "PHP" - linter_name = "phplint" diff --git a/megalinter/tests/test_megalinter/linters/php_phplint_test.py~main b/megalinter/tests/test_megalinter/linters/php_phplint_test.py~main deleted file mode 100644 index c82a2ae011d..00000000000 --- a/megalinter/tests/test_megalinter/linters/php_phplint_test.py~main +++ /dev/null @@ -1,14 +0,0 @@ -# !/usr/bin/env python3 -""" -Unit tests for PHP linter phplint -This class has been automatically @generated by .automation/build.py, please do not update it manually -""" - -from unittest import TestCase - -from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot - - -class php_phplint_test(TestCase, LinterTestRoot): - descriptor_id = "PHP" - linter_name = "phplint" diff --git a/megalinter/tests/test_megalinter/linters/repository_semgrep_test.py b/megalinter/tests/test_megalinter/linters/repository_semgrep_test.py index a7b708a4bc4..93814757935 100644 --- a/megalinter/tests/test_megalinter/linters/repository_semgrep_test.py +++ b/megalinter/tests/test_megalinter/linters/repository_semgrep_test.py @@ -6,30 +6,9 @@ from unittest import TestCase -from megalinter.tests.test_megalinter.helpers import utilstest from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot class repository_semgrep_test(TestCase, LinterTestRoot): descriptor_id = "REPOSITORY" linter_name = "semgrep" - - def test_security_flavor_success(self): - utilstest.linter_test_setup( - { - "additional_test_variables": { - "REPOSITORY_SEMGREP_RULESETS_TYPE": "security" - } - } - ) - utilstest.test_linter_success(self.get_linter_instance(), self) - - def test_security_flavor_failure(self): - utilstest.linter_test_setup( - { - "additional_test_variables": { - "REPOSITORY_SEMGREP_RULESETS_TYPE": "security" - } - } - ) - utilstest.test_linter_failure(self.get_linter_instance(), self) diff --git a/megalinter/tests/test_megalinter/linters/snakemake_snakemake_test.py b/megalinter/tests/test_megalinter/linters/snakemake_lint_test.py similarity index 85% rename from megalinter/tests/test_megalinter/linters/snakemake_snakemake_test.py rename to megalinter/tests/test_megalinter/linters/snakemake_lint_test.py index cfa39da588a..d80136f4fc5 100644 --- a/megalinter/tests/test_megalinter/linters/snakemake_snakemake_test.py +++ b/megalinter/tests/test_megalinter/linters/snakemake_lint_test.py @@ -9,6 +9,6 @@ from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot -class snakemake_snakemake_test(TestCase, LinterTestRoot): +class snakemake_lint_test(TestCase, LinterTestRoot): descriptor_id = "SNAKEMAKE" linter_name = "snakemake" diff --git a/megalinter/tests/test_megalinter/linters/typescript_eslint_test.py b/megalinter/tests/test_megalinter/linters/typescript_es_test.py similarity index 86% rename from megalinter/tests/test_megalinter/linters/typescript_eslint_test.py rename to megalinter/tests/test_megalinter/linters/typescript_es_test.py index d87ad7ca6be..d6170b1adbb 100644 --- a/megalinter/tests/test_megalinter/linters/typescript_eslint_test.py +++ b/megalinter/tests/test_megalinter/linters/typescript_es_test.py @@ -9,6 +9,6 @@ from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot -class typescript_eslint_test(TestCase, LinterTestRoot): +class typescript_es_test(TestCase, LinterTestRoot): descriptor_id = "TYPESCRIPT" linter_name = "eslint" From 2e50792a26cc386956d49e74f9b18d0528e758e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Mon, 6 Feb 2023 22:44:32 +0100 Subject: [PATCH 45/63] Fix bicep --- .../descriptors/bicep.megalinter-descriptor.yml | 4 ++-- megalinter/linters/BicepLinter.py | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 megalinter/linters/BicepLinter.py diff --git a/megalinter/descriptors/bicep.megalinter-descriptor.yml b/megalinter/descriptors/bicep.megalinter-descriptor.yml index 3ddf8f61ad9..1225d2f5cae 100644 --- a/megalinter/descriptors/bicep.megalinter-descriptor.yml +++ b/megalinter/descriptors/bicep.megalinter-descriptor.yml @@ -3,7 +3,8 @@ descriptor_type: tooling_format descriptor_flavors: - dotnet linters: - - cli_help_arg_name: --help + - class: BicepLinter + cli_help_arg_name: --help cli_executable: bicep cli_lint_errors_count: regex_count cli_lint_errors_regex: " : Error " @@ -34,7 +35,6 @@ linters: - ARG BICEP_EXE='bicep' - ARG BICEP_URI='https://github.com/Azure/bicep/releases/latest/download/bicep-linux-musl-x64' - ARG BICEP_DIR='/usr/local/bin' - - ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 - | RUN curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "${BICEP_URI}" \ && chmod +x "${BICEP_EXE}" \ diff --git a/megalinter/linters/BicepLinter.py b/megalinter/linters/BicepLinter.py new file mode 100644 index 00000000000..5bc37ac5154 --- /dev/null +++ b/megalinter/linters/BicepLinter.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +""" +Use Bicep to lint bicep files +""" +import os + +from megalinter import Linter + + +class BicepLinter(Linter): + # Build the CLI command to call to lint a file + def build_lint_command(self, file=None): + os.environ["DOTNET_SYSTEM_GLOBALIZATION_INVARIANT"] = "1" + + cmd = super().build_lint_command(file) + + return cmd From 8e20e6fec1e77cfe2332fb650a97ee7fe2737408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Tue, 7 Feb 2023 00:16:58 +0100 Subject: [PATCH 46/63] Try to fix spell linter tests --- .automation/test/spell/spell_bad_1.js | 2 -- .../test_megalinter/helpers/utilstest.py | 34 +++++++++++++------ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.automation/test/spell/spell_bad_1.js b/.automation/test/spell/spell_bad_1.js index 14fc9425124..ecf42a845e0 100644 --- a/.automation/test/spell/spell_bad_1.js +++ b/.automation/test/spell/spell_bad_1.js @@ -1,4 +1,2 @@ const langauge = true; -strezfdgdghfgjgf = true; console.log(langauge); -console.log(strezfdgdghfgjgf); diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index c88a396b4bf..60ce8ed5d74 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -176,7 +176,7 @@ def test_linter_success(linter, test_self): "ENABLE_LINTERS": linter.name, "PRINT_ALL_FILES": True, } - if linter.lint_all_other_linters_files is not False: + if linter.descriptor_id == 'SPELL': env_vars["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" env_vars.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars) @@ -191,7 +191,7 @@ def test_linter_success(linter, test_self): ) else: test_self.assertRegex(output, rf"\[{linter_name}\] .*good.* - SUCCESS") - else: + elif linter.descriptor_id != 'SPELL': # This log does not appear in SPELL linters test_self.assertRegex( output, rf"Linted \[{linter.descriptor_id}\] files with \[{linter_name}\] successfully", @@ -238,7 +238,7 @@ def test_linter_failure(linter, test_self): "LOG_LEVEL": "DEBUG", "ENABLE_LINTERS": linter.name, } - if linter.lint_all_other_linters_files is not False: + if linter.descriptor_id == 'SPELL': env_vars_failure["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" env_vars_failure.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars_failure) @@ -258,13 +258,25 @@ def test_linter_failure(linter, test_self): else: test_self.assertRegex(output, rf"\[{linter_name}\] .*bad.* - ERROR") test_self.assertNotRegex(output, rf"\[{linter_name}\] .*bad.* - SUCCESS") - else: + elif linter.descriptor_id != 'SPELL': # This log does not appear in SPELL linters test_self.assertRegex( output, rf"Linted \[{linter.descriptor_id}\] files with \[{linter_name}\]: Found", ) + + mega_linter_linter = None + + if ( + len(mega_linter.linters) == 1 + ): + mega_linter_linter = mega_linter.linters[0] + elif ( + len(mega_linter.linters) == 2 # SPELL linters have 2 linters at a time + ): + mega_linter_linter = mega_linter.linters[1] + # Check text reporter output log - if mega_linter.linters[0].disable_errors is True: + if mega_linter_linter.disable_errors is True: report_file_name = f"WARNING-{linter.name}.log" else: report_file_name = f"ERROR-{linter.name}.log" @@ -279,14 +291,14 @@ def test_linter_failure(linter, test_self): # Check if number of errors is correctly generated if ( - mega_linter.linters[0].cli_lint_errors_count is not None - and mega_linter.linters[0].linter_name != "mypy" # ugly + mega_linter_linter.cli_lint_errors_count is not None + and mega_linter_linter.linter_name != "mypy" # ugly ): test_self.assertTrue( - mega_linter.linters[0].total_number_errors > 1, + mega_linter_linter.total_number_errors > 1, "Unable to count number of errors from logs with count method " - + f"{mega_linter.linters[0].cli_lint_errors_count} and " - + f"regex {mega_linter.linters[0].cli_lint_errors_regex}", + + f"{mega_linter_linter.cli_lint_errors_count} and " + + f"regex {mega_linter_linter.cli_lint_errors_regex}", ) # Copy error logs in documentation @@ -651,7 +663,7 @@ def test_linter_format_fix(linter, test_self): "ENABLE_LINTERS": linter.name, "PRINT_ALL_FILES": True, } - if linter.lint_all_other_linters_files is not False: + if linter.descriptor_id == 'SPELL': env_vars["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" env_vars.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars) From 81db45fedff911922bd6931f6d00fdb3ffc18015 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Mon, 6 Feb 2023 21:50:19 +0000 Subject: [PATCH 47/63] [MegaLinter] Apply linters fixes --- .automation/build.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.automation/build.py b/.automation/build.py index e44e88302ed..31728e7ce76 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -662,9 +662,7 @@ def generate_linter_dockerfiles(): # Automatically generate a test class for each linter class # This could be done dynamically at runtime, but having a physical class is easier for developers in IDEs def generate_linter_test_classes(): - test_linters_root = ( - f"{REPO_HOME}/megalinter/tests/test_megalinter/linters" - ) + test_linters_root = f"{REPO_HOME}/megalinter/tests/test_megalinter/linters" # Remove all the contents of test_linters_root beforehand so that the result is deterministic shutil.rmtree(os.path.realpath(test_linters_root)) @@ -694,9 +692,7 @@ class {linter_name_lower}_test(TestCase, LinterTestRoot): descriptor_id = "{linter.descriptor_id}" linter_name = "{linter.linter_name}" """ - test_class_file_name = ( - f"{test_linters_root}/{linter_name_lower}_test.py" - ) + test_class_file_name = f"{test_linters_root}/{linter_name_lower}_test.py" if not os.path.isfile(test_class_file_name): file = open( test_class_file_name, From 58f487400df687fe812f7aa5d16e5c096e2064c7 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Mon, 6 Feb 2023 23:23:48 +0000 Subject: [PATCH 48/63] [MegaLinter] Apply linters fixes --- .../tests/test_megalinter/helpers/utilstest.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 60ce8ed5d74..5a52c0e5680 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -176,7 +176,7 @@ def test_linter_success(linter, test_self): "ENABLE_LINTERS": linter.name, "PRINT_ALL_FILES": True, } - if linter.descriptor_id == 'SPELL': + if linter.descriptor_id == "SPELL": env_vars["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" env_vars.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars) @@ -191,7 +191,7 @@ def test_linter_success(linter, test_self): ) else: test_self.assertRegex(output, rf"\[{linter_name}\] .*good.* - SUCCESS") - elif linter.descriptor_id != 'SPELL': # This log does not appear in SPELL linters + elif linter.descriptor_id != "SPELL": # This log does not appear in SPELL linters test_self.assertRegex( output, rf"Linted \[{linter.descriptor_id}\] files with \[{linter_name}\] successfully", @@ -238,7 +238,7 @@ def test_linter_failure(linter, test_self): "LOG_LEVEL": "DEBUG", "ENABLE_LINTERS": linter.name, } - if linter.descriptor_id == 'SPELL': + if linter.descriptor_id == "SPELL": env_vars_failure["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" env_vars_failure.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars_failure) @@ -258,7 +258,7 @@ def test_linter_failure(linter, test_self): else: test_self.assertRegex(output, rf"\[{linter_name}\] .*bad.* - ERROR") test_self.assertNotRegex(output, rf"\[{linter_name}\] .*bad.* - SUCCESS") - elif linter.descriptor_id != 'SPELL': # This log does not appear in SPELL linters + elif linter.descriptor_id != "SPELL": # This log does not appear in SPELL linters test_self.assertRegex( output, rf"Linted \[{linter.descriptor_id}\] files with \[{linter_name}\]: Found", @@ -266,13 +266,9 @@ def test_linter_failure(linter, test_self): mega_linter_linter = None - if ( - len(mega_linter.linters) == 1 - ): + if len(mega_linter.linters) == 1: mega_linter_linter = mega_linter.linters[0] - elif ( - len(mega_linter.linters) == 2 # SPELL linters have 2 linters at a time - ): + elif len(mega_linter.linters) == 2: # SPELL linters have 2 linters at a time mega_linter_linter = mega_linter.linters[1] # Check text reporter output log @@ -663,7 +659,7 @@ def test_linter_format_fix(linter, test_self): "ENABLE_LINTERS": linter.name, "PRINT_ALL_FILES": True, } - if linter.descriptor_id == 'SPELL': + if linter.descriptor_id == "SPELL": env_vars["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" env_vars.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars) From fff4155428fa7b70984e42fc6561a7ea3dfb6a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Wed, 8 Feb 2023 18:30:19 +0100 Subject: [PATCH 49/63] Try to fix spell linter tests --- .../tests/test_megalinter/LinterTestRoot.py | 47 ++++++++++++++++++- .../test_megalinter/helpers/utilstest.py | 6 --- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 3c66ddf9b2a..51aa7f254b5 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -30,13 +30,42 @@ def get_linter_instance(self): def test_success(self): utilstest.linter_test_setup() + if self.linter_name == "misspell": + config.set_value( + "SPELL_MISSPELL_FILE_EXTENSIONS", + [".js", ".md"] + ) + if self.linter_name == "cspell": + config.set_value( + "SPELL_CSPELL_FILE_EXTENSIONS", + [".js", ".md"] + ) + if self.linter_name == "proselint": + config.set_value( + "SPELL_PROSELINT_FILE_EXTENSIONS", + [".js", ".md"] + ) linter = self.get_linter_instance() linter.pre_test() utilstest.test_linter_success(linter, self) linter.post_test() - def test_failure(self): utilstest.linter_test_setup() + if self.linter_name == "misspell": + config.set_value( + "SPELL_MISSPELL_FILE_EXTENSIONS", + [".js", ".md"] + ) + if self.linter_name == "cspell": + config.set_value( + "SPELL_CSPELL_FILE_EXTENSIONS", + [".js", ".md"] + ) + if self.linter_name == "proselint": + config.set_value( + "SPELL_PROSELINT_FILE_EXTENSIONS", + [".js", ".md"] + ) linter = self.get_linter_instance() linter.pre_test() utilstest.test_linter_failure(linter, self) @@ -105,5 +134,21 @@ def test_format_fix(self): config.get("DEFAULT_WORKSPACE").replace("\\", "/") + f"/{linter.test_folder}/*_fix_*.json", ) + + if self.linter_name == "misspell": + config.set_value( + "SPELL_MISSPELL_FILE_EXTENSIONS", + [".js", ".md"] + ) + if self.linter_name == "cspell": + config.set_value( + "SPELL_CSPELL_FILE_EXTENSIONS", + [".js", ".md"] + ) + if self.linter_name == "proselint": + config.set_value( + "SPELL_PROSELINT_FILE_EXTENSIONS", + [".js", ".md"] + ) utilstest.test_linter_format_fix(linter, self) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 5a52c0e5680..e04b31274b7 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -176,8 +176,6 @@ def test_linter_success(linter, test_self): "ENABLE_LINTERS": linter.name, "PRINT_ALL_FILES": True, } - if linter.descriptor_id == "SPELL": - env_vars["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" env_vars.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars) test_self.assertTrue( @@ -238,8 +236,6 @@ def test_linter_failure(linter, test_self): "LOG_LEVEL": "DEBUG", "ENABLE_LINTERS": linter.name, } - if linter.descriptor_id == "SPELL": - env_vars_failure["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" env_vars_failure.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars_failure) # Check linter run @@ -659,8 +655,6 @@ def test_linter_format_fix(linter, test_self): "ENABLE_LINTERS": linter.name, "PRINT_ALL_FILES": True, } - if linter.descriptor_id == "SPELL": - env_vars["ENABLE_LINTERS"] += ",JAVASCRIPT_ES" env_vars.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars) test_self.assertTrue( From c1e821b9c1111831e7b077668cd40b4097aac1c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Wed, 8 Feb 2023 18:35:17 +0100 Subject: [PATCH 50/63] Remove commented code --- .automation/build.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.automation/build.py b/.automation/build.py index 31728e7ce76..07caa1fb6f5 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -575,9 +575,6 @@ def generate_linter_dockerfiles(): ) # Browse descriptor linters for linter in descriptor_linters: - # Do not build standalone linter if it does not manage SARIF - # if linter.can_output_sarif is False: - # continue # Unique linter dockerfile linter_lower_name = linter.name.lower() dockerfile = f"{LINTERS_DIR}/{linter_lower_name}/Dockerfile" @@ -3040,9 +3037,6 @@ def update_workflows_linters(): for descriptor in descriptors: for linter in descriptor["linters"]: - # if "can_output_sarif" not in linter or linter["can_output_sarif"] is False: - # continue - if "name" in linter: name = linter["name"].lower() else: From 7ecc2985939b264bd97695223e69ce393da8bbe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Wed, 8 Feb 2023 19:13:46 +0100 Subject: [PATCH 51/63] Minor changes --- .../tests/test_megalinter/LinterTestRoot.py | 44 +++++-------------- .../test_megalinter/helpers/utilstest.py | 7 +-- 2 files changed, 13 insertions(+), 38 deletions(-) diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 51aa7f254b5..d7b3f93e28e 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -30,42 +30,19 @@ def get_linter_instance(self): def test_success(self): utilstest.linter_test_setup() - if self.linter_name == "misspell": - config.set_value( - "SPELL_MISSPELL_FILE_EXTENSIONS", - [".js", ".md"] - ) - if self.linter_name == "cspell": - config.set_value( - "SPELL_CSPELL_FILE_EXTENSIONS", - [".js", ".md"] - ) - if self.linter_name == "proselint": - config.set_value( - "SPELL_PROSELINT_FILE_EXTENSIONS", - [".js", ".md"] - ) + + self.set_spell_config_values() + linter = self.get_linter_instance() linter.pre_test() utilstest.test_linter_success(linter, self) linter.post_test() + def test_failure(self): utilstest.linter_test_setup() - if self.linter_name == "misspell": - config.set_value( - "SPELL_MISSPELL_FILE_EXTENSIONS", - [".js", ".md"] - ) - if self.linter_name == "cspell": - config.set_value( - "SPELL_CSPELL_FILE_EXTENSIONS", - [".js", ".md"] - ) - if self.linter_name == "proselint": - config.set_value( - "SPELL_PROSELINT_FILE_EXTENSIONS", - [".js", ".md"] - ) + + self.set_spell_config_values() + linter = self.get_linter_instance() linter.pre_test() utilstest.test_linter_failure(linter, self) @@ -135,6 +112,11 @@ def test_format_fix(self): + f"/{linter.test_folder}/*_fix_*.json", ) + self.set_spell_config_values() + + utilstest.test_linter_format_fix(linter, self) + + def set_spell_config_values(self): if self.linter_name == "misspell": config.set_value( "SPELL_MISSPELL_FILE_EXTENSIONS", @@ -150,5 +132,3 @@ def test_format_fix(self): "SPELL_PROSELINT_FILE_EXTENSIONS", [".js", ".md"] ) - - utilstest.test_linter_format_fix(linter, self) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index e04b31274b7..0161a2c88ad 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -260,12 +260,7 @@ def test_linter_failure(linter, test_self): rf"Linted \[{linter.descriptor_id}\] files with \[{linter_name}\]: Found", ) - mega_linter_linter = None - - if len(mega_linter.linters) == 1: - mega_linter_linter = mega_linter.linters[0] - elif len(mega_linter.linters) == 2: # SPELL linters have 2 linters at a time - mega_linter_linter = mega_linter.linters[1] + mega_linter_linter = mega_linter.linters[0] # Check text reporter output log if mega_linter_linter.disable_errors is True: From 99340ab84ede8499f119a7c62e404e940d418575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Wed, 8 Feb 2023 19:20:00 +0100 Subject: [PATCH 52/63] Update CHANGELOG.md --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4ccae0afb..4a640da0889 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,27 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Core - Upgrade base docker image from python:3.10.4-alpine3.16 to python:3.11.1-alpine3.17 + - Build: remove folder contents before generating Dockerfile files for each linter in generate_linter_dockerfiles(), by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Build: remove folder contents before generating test classes for each linter in generate_linter_test_classes(), by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Build: automatically update the linter list used in the matrix of several of the workflows, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Test: create a testing architecture for format/autofix linters, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Test: create or adapt input files for format/autofix tests, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Test: created specific test folders for linters that need them because they cannot share them, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + +- Fixes + - Correctly generate class names and test class files for each linter when the linter descriptor defines the attribute "name", by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Removed the default **powershell** templates TEMPLATES/.powershell-formatter.psd1 and TEMPLATES/.powershell-psscriptanalyzer.psd1. Having these templates caused all rules to be ignored as the settings are not incremental but absolute, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Added **cli_lint_fix_arg_name** parameter to **dotnet format** descriptor as without it, autofix does not work, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Created **BicepLinter** class to add **DOTNET_SYSTEM_GLOBALIZATION_INVARIANT** environment variable to avoid problems with ICU packages, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Modified **npm-groovy-lint** descriptor to add **--failon** parameter to only fail with error and not info which is the default value, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Added **cli_lint_fix_arg_name** parameter to **powershell formatter** descriptor as without it, autofix does not work, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Created **ProtolintLinter** class to fix the problem that returns exit code 1 when it encounters a problem to correct even though it corrects it correctly, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Concatenate **--output** parameter correctly to **xmllint** linter, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + +- Documentation + - Change **swiftlint** example that did not correctly reflect the **--fix** parameter, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Change in TSX **eslint** descriptor the urls as they were not correct, by @bdovaz in [#2294](https://github.com/oxsecurity/megalinter/pull/2294) + - Change in TYPESCRIPT **eslint** descriptor the urls as they were not correct, by @bdovaz on [#2294](https://github.com/oxsecurity/megalinter/pull/2294) - CI - Use docker/build-push-action to build docker images and akhilerm/tag-push-action to release by retagging and pushing beta images instead of rebuilding them From 6c5162b67b483ad2092a769394648622d809414e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Wed, 8 Feb 2023 19:32:39 +0100 Subject: [PATCH 53/63] Update the CONTRIBUTING.md file Add the explanation of how to run the linter tests inside the container --- .github/CONTRIBUTING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 353c07072ac..f4729839fda 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -130,6 +130,30 @@ Then run `bash build.sh` and it will generate all the rest! 2. Install [Python Test Explorer for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=LittleFoxTeam.vscode-python-test-adapter) extension 3. Execute or debug tests via the side menu +### Execute linter tests inside the container + +If you are creating a linter or making changes to a linter, you may want to run the tests to check that none of them fail. + +When running them, you may encounter several problems: +* It is not installed on the machine locally and you do not want to install it. +* The OS does not allow the installation of the linter because it is not cross-platform. +* The behavior between running it on the local machine (host) and the container is different. + +For those cases, it is important to have the possibility to run the tests inside the container. To do so: +1. Run `bash build.sh` to update the Dockerfile files of each linter. +2. Execute the following commands in a ***.sh** script. Example: + +```bash +docker buildx build -f linters/spell_misspell/Dockerfile . --tag spell_misspell +TEST_KEYWORDS_TO_USE="spell_misspell" +docker run -e TEST_CASE_RUN=true -e OUTPUT_DETAIL=detailed -e TEST_KEYWORDS="${TEST_KEYWORDS_TO_USE}" -e MEGALINTER_VOLUME_ROOT="." -v "/var/run/docker.sock:/var/run/docker.sock:rw" -v $(pwd):/tmp/lint spell_misspell +``` + +In the above example, it builds the **misspell** linter image and then runs its tests. To do the same for another linter you would have to: +1. Change the path to the Dockerfile to the appropriate Dockerfile +2. Change the **tag** in the 2 places (docker buildx build and docker run) +3. Change the value of **TEST_KEYWORDS_TO_USE** which is the one that is responsible for finding the tests of the particular linter + ### CI/CT/CD The **MegaLinter** has _CI/CT/CD_ configured utilizing **GitHub** Actions. From a6a08f81ca966aa0def76b10d2a8cb87c8f5237f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Wed, 8 Feb 2023 19:36:43 +0100 Subject: [PATCH 54/63] Run build.sh --doc --- .automation/generated/flavors-stats.json | 248 ++---------------- README.md | 144 +++++----- docs/descriptors/csharp_csharpier.md | 2 + docs/descriptors/powershell_powershell.md | 1 - .../powershell_powershell_formatter.md | 3 +- docs/descriptors/swift_swiftlint.md | 2 +- docs/descriptors/tsx.md | 6 +- docs/descriptors/tsx_eslint.md | 14 +- docs/descriptors/typescript.md | 10 +- docs/descriptors/typescript_eslint.md | 16 +- docs/descriptors/xml_xmllint.md | 2 +- docs/flavors/cupcake.md | 76 +++--- docs/flavors/javascript.md | 36 +-- docs/index.md | 142 +++++----- docs/supported-linters.md | 142 +++++----- linters/action_actionlint/Dockerfile | 2 +- linters/arm_arm_ttk/Dockerfile | 2 +- linters/bash_exec/Dockerfile | 2 +- linters/bash_shfmt/Dockerfile | 3 +- linters/bicep_bicep_linter/Dockerfile | 2 +- linters/c_cpplint/Dockerfile | 2 +- linters/clojure_clj_kondo/Dockerfile | 4 +- linters/coffee_coffeelint/Dockerfile | 2 +- linters/copypaste_jscpd/Dockerfile | 2 +- linters/cpp_cpplint/Dockerfile | 2 +- linters/csharp_csharpier/Dockerfile | 2 +- linters/csharp_dotnet_format/Dockerfile | 5 +- linters/css_scss_lint/Dockerfile | 2 +- linters/css_stylelint/Dockerfile | 2 +- linters/dart_dartanalyzer/Dockerfile | 6 +- .../Dockerfile | 2 +- linters/env_dotenv_linter/Dockerfile | 2 +- linters/gherkin_gherkin_lint/Dockerfile | 2 +- linters/go_golangci_lint/Dockerfile | 2 +- .../graphql_graphql_schema_linter/Dockerfile | 2 +- linters/html_djlint/Dockerfile | 2 +- linters/html_htmlhint/Dockerfile | 2 +- linters/javascript_prettier/Dockerfile | 2 +- linters/javascript_standard/Dockerfile | 2 +- linters/json_jsonlint/Dockerfile | 2 +- linters/json_npm_package_json_lint/Dockerfile | 2 +- linters/json_prettier/Dockerfile | 2 +- linters/json_v8r/Dockerfile | 2 +- linters/kubernetes_kubeconform/Dockerfile | 2 +- linters/kubernetes_kubeval/Dockerfile | 2 +- linters/latex_chktex/Dockerfile | 2 +- linters/lua_luacheck/Dockerfile | 2 +- linters/makefile_checkmake/Dockerfile | 2 +- .../markdown_markdown_link_check/Dockerfile | 2 +- .../Dockerfile | 2 +- linters/markdown_markdownlint/Dockerfile | 2 +- linters/markdown_remark_lint/Dockerfile | 2 +- linters/openapi_spectral/Dockerfile | 2 +- linters/perl_perlcritic/Dockerfile | 2 +- linters/php_phpcs/Dockerfile | 2 +- linters/php_phplint/Dockerfile | 2 +- linters/php_phpstan/Dockerfile | 2 +- linters/powershell_powershell/Dockerfile | 2 +- .../Dockerfile | 2 +- linters/protobuf_protolint/Dockerfile | 2 +- linters/puppet_puppet_lint/Dockerfile | 2 +- linters/python_black/Dockerfile | 2 +- linters/python_flake8/Dockerfile | 2 +- linters/python_isort/Dockerfile | 2 +- linters/python_mypy/Dockerfile | 2 +- linters/python_pylint/Dockerfile | 2 +- linters/python_pyright/Dockerfile | 2 +- linters/r_lintr/Dockerfile | 2 +- linters/raku_raku/Dockerfile | 2 +- linters/repository_git_diff/Dockerfile | 2 +- linters/repository_goodcheck/Dockerfile | 2 +- linters/rst_rst_lint/Dockerfile | 2 +- linters/rst_rstcheck/Dockerfile | 2 +- linters/rst_rstfmt/Dockerfile | 2 +- linters/ruby_rubocop/Dockerfile | 2 +- linters/rust_clippy/Dockerfile | 2 +- .../salesforce_sfdx_scanner_apex/Dockerfile | 2 +- .../salesforce_sfdx_scanner_aura/Dockerfile | 2 +- .../salesforce_sfdx_scanner_lwc/Dockerfile | 2 +- linters/scala_scalafix/Dockerfile | 2 +- linters/snakemake_lint/Dockerfile | 2 +- linters/snakemake_snakefmt/Dockerfile | 2 +- linters/spell_cspell/Dockerfile | 2 +- linters/spell_misspell/Dockerfile | 2 +- linters/spell_proselint/Dockerfile | 2 +- linters/sql_sql_lint/Dockerfile | 2 +- linters/sql_sqlfluff/Dockerfile | 2 +- linters/sql_tsqllint/Dockerfile | 2 +- linters/swift_swiftlint/Dockerfile | 2 +- linters/tekton_tekton_lint/Dockerfile | 2 +- linters/terraform_kics/Dockerfile | 2 +- linters/terraform_terraform_fmt/Dockerfile | 2 +- linters/terraform_terragrunt/Dockerfile | 2 +- linters/typescript_prettier/Dockerfile | 2 +- linters/typescript_standard/Dockerfile | 2 +- linters/vbdotnet_dotnet_format/Dockerfile | 2 +- linters/xml_xmllint/Dockerfile | 2 +- linters/yaml_prettier/Dockerfile | 2 +- linters/yaml_v8r/Dockerfile | 2 +- linters/yaml_yamllint/Dockerfile | 2 +- mega-linter-runner/README.md | 142 +++++----- 101 files changed, 486 insertions(+), 680 deletions(-) diff --git a/.automation/generated/flavors-stats.json b/.automation/generated/flavors-stats.json index ddc657e39e6..be1792f5e53 100644 --- a/.automation/generated/flavors-stats.json +++ b/.automation/generated/flavors-stats.json @@ -1293,20 +1293,8 @@ 2766344 ], [ - "2023-02-08T22:13:30", - 2769595 - ], - [ - "2023-02-10T22:34:46", - 2772601 - ], - [ - "2023-02-12T19:36:27", - 2773985 - ], - [ - "2023-02-13T19:27:24", - 2775181 + "2023-02-08T19:33:17", + 2769435 ] ], "ci_light": [ @@ -2603,20 +2591,8 @@ 46922 ], [ - "2023-02-08T22:13:30", - 47279 - ], - [ - "2023-02-10T22:34:46", - 47618 - ], - [ - "2023-02-12T19:36:27", - 47691 - ], - [ - "2023-02-13T19:27:24", - 47800 + "2023-02-08T19:33:17", + 47254 ] ], "cupcake": [ @@ -2893,20 +2869,8 @@ 2326 ], [ - "2023-02-08T22:13:30", - 2454 - ], - [ - "2023-02-10T22:34:46", - 2590 - ], - [ - "2023-02-12T19:36:27", - 2604 - ], - [ - "2023-02-13T19:27:24", - 2647 + "2023-02-08T19:33:17", + 2443 ] ], "dart": [ @@ -5113,20 +5077,8 @@ 111141 ], [ - "2023-02-08T22:13:30", - 111950 - ], - [ - "2023-02-10T22:34:46", - 112720 - ], - [ - "2023-02-12T19:36:27", - 113088 - ], - [ - "2023-02-13T19:27:24", - 113536 + "2023-02-08T19:33:17", + 111868 ] ], "dotnet": [ @@ -6423,20 +6375,8 @@ 346484 ], [ - "2023-02-08T22:13:30", - 347126 - ], - [ - "2023-02-10T22:34:46", - 347908 - ], - [ - "2023-02-12T19:36:27", - 348124 - ], - [ - "2023-02-13T19:27:24", - 348428 + "2023-02-08T19:33:17", + 347112 ] ], "go": [ @@ -7733,20 +7673,8 @@ 16530 ], [ - "2023-02-08T22:13:30", + "2023-02-08T19:33:17", 16580 - ], - [ - "2023-02-10T22:34:46", - 16629 - ], - [ - "2023-02-12T19:36:27", - 16661 - ], - [ - "2023-02-13T19:27:24", - 16743 ] ], "java": [ @@ -9043,20 +8971,8 @@ 107771 ], [ - "2023-02-08T22:13:30", - 108053 - ], - [ - "2023-02-10T22:34:46", - 108293 - ], - [ - "2023-02-12T19:36:27", - 108398 - ], - [ - "2023-02-13T19:27:24", - 108496 + "2023-02-08T19:33:17", + 108040 ] ], "javascript": [ @@ -10353,20 +10269,8 @@ 195961 ], [ - "2023-02-08T22:13:30", - 197182 - ], - [ - "2023-02-10T22:34:46", - 198268 - ], - [ - "2023-02-12T19:36:27", - 199108 - ], - [ - "2023-02-13T19:27:24", - 199774 + "2023-02-08T19:33:17", + 197104 ] ], "php": [ @@ -11663,20 +11567,8 @@ 44448 ], [ - "2023-02-08T22:13:30", - 44566 - ], - [ - "2023-02-10T22:34:46", - 44709 - ], - [ - "2023-02-12T19:36:27", - 44973 - ], - [ - "2023-02-13T19:27:24", - 45082 + "2023-02-08T19:33:17", + 44537 ] ], "python": [ @@ -12973,20 +12865,8 @@ 154867 ], [ - "2023-02-08T22:13:30", - 155768 - ], - [ - "2023-02-10T22:34:46", - 156745 - ], - [ - "2023-02-12T19:36:27", - 157193 - ], - [ - "2023-02-13T19:27:24", - 157579 + "2023-02-08T19:33:17", + 155660 ] ], "ruby": [ @@ -14279,20 +14159,8 @@ 2881 ], [ - "2023-02-08T22:13:30", + "2023-02-08T19:33:17", 2890 - ], - [ - "2023-02-10T22:34:46", - 2905 - ], - [ - "2023-02-12T19:36:27", - 2914 - ], - [ - "2023-02-13T19:27:24", - 2932 ] ], "rust": [ @@ -15585,20 +15453,8 @@ 4495 ], [ - "2023-02-08T22:13:30", - 4497 - ], - [ - "2023-02-10T22:34:46", - 4522 - ], - [ - "2023-02-12T19:36:27", - 4532 - ], - [ - "2023-02-13T19:27:24", - 4545 + "2023-02-08T19:33:17", + 4495 ] ], "salesforce": [ @@ -16895,20 +16751,8 @@ 16391 ], [ - "2023-02-08T22:13:30", + "2023-02-08T19:33:17", 16454 - ], - [ - "2023-02-10T22:34:46", - 16546 - ], - [ - "2023-02-12T19:36:27", - 16567 - ], - [ - "2023-02-13T19:27:24", - 16588 ] ], "scala": [ @@ -18203,20 +18047,8 @@ 2624 ], [ - "2023-02-08T22:13:30", + "2023-02-08T19:33:17", 2692 - ], - [ - "2023-02-10T22:34:46", - 2756 - ], - [ - "2023-02-12T19:36:27", - 2770 - ], - [ - "2023-02-13T19:27:24", - 2804 ] ], "swift": [ @@ -19509,20 +19341,8 @@ 3133 ], [ - "2023-02-08T22:13:30", - 3134 - ], - [ - "2023-02-10T22:34:46", - 3137 - ], - [ - "2023-02-12T19:36:27", - 3146 - ], - [ - "2023-02-13T19:27:24", - 3152 + "2023-02-08T19:33:17", + 3133 ] ], "terraform": [ @@ -20819,20 +20639,8 @@ 171832 ], [ - "2023-02-08T22:13:30", - 173065 - ], - [ - "2023-02-10T22:34:46", - 174343 - ], - [ - "2023-02-12T19:36:27", - 174856 - ], - [ - "2023-02-13T19:27:24", - 175351 + "2023-02-08T19:33:17", + 172996 ] ] } \ No newline at end of file diff --git a/README.md b/README.md index 68adfd4c9e5..11e59f505ff 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ [![MegaLinter](https://github.com/oxsecurity/megalinter/workflows/MegaLinter/badge.svg?branch=main)](https://github.com/oxsecurity/megalinter/actions?query=workflow%3AMegaLinter+branch%3Amain) [![codecov](https://codecov.io/gh/oxsecurity/megalinter/branch/main/graph/badge.svg)](https://codecov.io/gh/oxsecurity/megalinter) -[![](https://img.shields.io/static/v1?label=Used%20by&message=2035&color=informational&logo=slickpic)](https://github.com/oxsecurity/megalinter/network/dependents) +[![](https://img.shields.io/static/v1?label=Used%20by&message=2021&color=informational&logo=slickpic)](https://github.com/oxsecurity/megalinter/network/dependents) [![Secured with Trivy](https://img.shields.io/badge/Trivy-secured-green?logo=docker)](https://github.com/aquasecurity/trivy) [![GitHub contributors](https://img.shields.io/github/contributors/oxsecurity/megalinter.svg)](https://github.com/oxsecurity/megalinter/graphs/contributors/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/nvuillam)](https://github.com/sponsors/nvuillam) @@ -199,61 +199,61 @@ All linters are integrated in the [MegaLinter docker image](https://hub.docker.c ### Languages -| | Language | Linter | Additional | -|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|---------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**bash-exec**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_bash_exec.md)
[_BASH_EXEC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_bash_exec.md) | | -| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**shellcheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shellcheck.md)
[_BASH_SHELLCHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shellcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**shfmt**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shfmt.md)
[_BASH_SHFMT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shfmt.md) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**C**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c.md) | [**cpplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c_cpplint.md)
[_C_CPPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**CLOJURE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure.md) | [**clj-kondo**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure_clj_kondo.md)
[_CLOJURE_CLJ_KONDO_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure_clj_kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | -| | [**COFFEE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee.md) | [**coffeelint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee_coffeelint.md)
[_COFFEE_COFFEELINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee_coffeelint.md) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | -| | [**C++** (CPP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp.md) | [**cpplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp_cpplint.md)
[_CPP_CPPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**C#** (CSHARP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp.md) | [**dotnet-format**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_dotnet_format.md)
[_CSHARP_DOTNET_FORMAT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**C#** (CSHARP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp.md) | [**csharpier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_csharpier.md)
[_CSHARP_CSHARPIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_csharpier.md) | [![GitHub stars](https://img.shields.io/github/stars/belav/csharpier?cacheSeconds=3600)](https://github.com/belav/csharpier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**DART**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart.md) | [**dartanalyzer**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart_dartanalyzer.md)
[_DART_DARTANALYZER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart_dartanalyzer.md) | ![downgraded version](https://shields.io/badge/-downgraded%20version-orange) [![GitHub stars](https://img.shields.io/github/stars/dart-lang/sdk?cacheSeconds=3600)](https://github.com/dart-lang/sdk) | -| | [**GO**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go.md) | [**golangci-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_golangci_lint.md)
[_GO_GOLANGCI_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_golangci_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | -| | [**GO**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go.md) | [**revive**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_revive.md)
[_GO_REVIVE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_revive.md) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**GROOVY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy.md) | [**npm-groovy-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy_npm_groovy_lint.md)
[_GROOVY_NPM_GROOVY_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy_npm_groovy_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java.md) | [**checkstyle**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_checkstyle.md)
[_JAVA_CHECKSTYLE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_checkstyle.md) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java.md) | [**pmd**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_pmd.md)
[_JAVA_PMD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_pmd.md) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_eslint.md)
[_JAVASCRIPT_ES_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_standard.md)
[_JAVASCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**prettier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_prettier.md)
[_JAVASCRIPT_PRETTIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**JSX**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx_eslint.md)
[_JSX_ESLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**KOTLIN**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin.md) | [**ktlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin_ktlint.md)
[_KOTLIN_KTLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin_ktlint.md) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**LUA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua.md) | [**luacheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua_luacheck.md)
[_LUA_LUACHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua_luacheck.md) | [![GitHub stars](https://img.shields.io/github/stars/luarocks/luacheck?cacheSeconds=3600)](https://github.com/luarocks/luacheck) | -| | [**MAKEFILE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile.md) | [**checkmake**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile_checkmake.md)
[_MAKEFILE_CHECKMAKE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile_checkmake.md) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | -| | [**PERL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl.md) | [**perlcritic**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl_perlcritic.md)
[_PERL_PERLCRITIC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl_perlcritic.md) | [![GitHub stars](https://img.shields.io/github/stars/Perl-Critic/Perl-Critic?cacheSeconds=3600)](https://github.com/Perl-Critic/Perl-Critic) | -| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phpcs**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpcs.md)
[_PHP_PHPCS_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpcs.md) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | -| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phpstan**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpstan.md)
[_PHP_PHPSTAN_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpstan.md) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | -| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**psalm**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_psalm.md)
[_PHP_PSALM_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_psalm.md) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phplint.md)
[_PHP_PHPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phplint.md) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | -| | [**POWERSHELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell.md) | [**powershell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell.md)
[_POWERSHELL_POWERSHELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**POWERSHELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell.md) | [**powershell_formatter**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell_formatter.md)
[_POWERSHELL_POWERSHELL_FORMATTER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell_formatter.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**pylint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pylint.md)
[_PYTHON_PYLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pylint.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**black**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_black.md)
[_PYTHON_BLACK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_black.md) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**flake8**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_flake8.md)
[_PYTHON_FLAKE8_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_flake8.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**isort**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_isort.md)
[_PYTHON_ISORT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_isort.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**bandit**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_bandit.md)
[_PYTHON_BANDIT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_bandit.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/bandit?cacheSeconds=3600)](https://github.com/PyCQA/bandit) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**mypy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_mypy.md)
[_PYTHON_MYPY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_mypy.md) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**pyright**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pyright.md)
[_PYTHON_PYRIGHT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pyright.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | -| | [**R**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r.md) | [**lintr**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r_lintr.md)
[_R_LINTR_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r_lintr.md) | [![GitHub stars](https://img.shields.io/github/stars/r-lib/lintr?cacheSeconds=3600)](https://github.com/r-lib/lintr) | -| | [**RAKU**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku.md) | [**raku**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku_raku.md)
[_RAKU_RAKU_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku_raku.md) | [![GitHub stars](https://img.shields.io/github/stars/rakudo/rakudo?cacheSeconds=3600)](https://github.com/rakudo/rakudo) | -| | [**RUBY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby.md) | [**rubocop**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby_rubocop.md)
[_RUBY_RUBOCOP_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby_rubocop.md) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**RUST**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust.md) | [**clippy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust_clippy.md)
[_RUST_CLIPPY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust_clippy.md) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | -| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-apex**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_apex.md)
[_SALESFORCE_SFDX_SCANNER_APEX_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_apex.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-aura**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_aura.md)
[_SALESFORCE_SFDX_SCANNER_AURA_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_aura.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-lwc**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_lwc.md)
[_SALESFORCE_SFDX_SCANNER_LWC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_lwc.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SCALA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala.md) | [**scalafix**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala_scalafix.md)
[_SCALA_SCALAFIX_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala_scalafix.md) | [![GitHub stars](https://img.shields.io/github/stars/scalacenter/scalafix?cacheSeconds=3600)](https://github.com/scalacenter/scalafix) | -| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**sql-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sql_lint.md)
[_SQL_SQL_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sql_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | -| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**sqlfluff**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sqlfluff.md)
[_SQL_SQLFLUFF_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sqlfluff.md) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | -| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**tsqllint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_tsqllint.md)
[_SQL_TSQLLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_tsqllint.md) | [![GitHub stars](https://img.shields.io/github/stars/tsqllint/tsqllint?cacheSeconds=3600)](https://github.com/tsqllint/tsqllint) | -| | [**SWIFT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift.md) | [**swiftlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md)
[_SWIFT_SWIFTLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TSX**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md)
[_TSX_ESLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md)
[_TYPESCRIPT_ES_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md)
[_TYPESCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**prettier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**Visual Basic .NET** (VBDOTNET)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet.md) | [**dotnet-format**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md)
[_VBDOTNET_DOTNET_FORMAT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | +| | Language | Linter | Additional | +|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|---------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**bash-exec**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_bash_exec.md)
[_BASH_EXEC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_bash_exec.md) | | +| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**shellcheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shellcheck.md)
[_BASH_SHELLCHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shellcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**shfmt**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shfmt.md)
[_BASH_SHFMT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shfmt.md) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**C**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c.md) | [**cpplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c_cpplint.md)
[_C_CPPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**CLOJURE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure.md) | [**clj-kondo**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure_clj_kondo.md)
[_CLOJURE_CLJ_KONDO_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure_clj_kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | +| | [**COFFEE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee.md) | [**coffeelint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee_coffeelint.md)
[_COFFEE_COFFEELINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee_coffeelint.md) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | +| | [**C++** (CPP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp.md) | [**cpplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp_cpplint.md)
[_CPP_CPPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**C#** (CSHARP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp.md) | [**dotnet-format**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_dotnet_format.md)
[_CSHARP_DOTNET_FORMAT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**C#** (CSHARP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp.md) | [**csharpier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_csharpier.md)
[_CSHARP_CSHARPIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_csharpier.md) | [![GitHub stars](https://img.shields.io/github/stars/belav/csharpier?cacheSeconds=3600)](https://github.com/belav/csharpier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**DART**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart.md) | [**dartanalyzer**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart_dartanalyzer.md)
[_DART_DARTANALYZER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart_dartanalyzer.md) | [![GitHub stars](https://img.shields.io/github/stars/dart-lang/sdk?cacheSeconds=3600)](https://github.com/dart-lang/sdk) | +| | [**GO**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go.md) | [**golangci-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_golangci_lint.md)
[_GO_GOLANGCI_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_golangci_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | +| | [**GO**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go.md) | [**revive**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_revive.md)
[_GO_REVIVE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_revive.md) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**GROOVY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy.md) | [**npm-groovy-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy_npm_groovy_lint.md)
[_GROOVY_NPM_GROOVY_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy_npm_groovy_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java.md) | [**checkstyle**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_checkstyle.md)
[_JAVA_CHECKSTYLE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_checkstyle.md) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java.md) | [**pmd**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_pmd.md)
[_JAVA_PMD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_pmd.md) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_eslint.md)
[_JAVASCRIPT_ES_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_standard.md)
[_JAVASCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**prettier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_prettier.md)
[_JAVASCRIPT_PRETTIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**JSX**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx_eslint.md)
[_JSX_ESLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**KOTLIN**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin.md) | [**ktlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin_ktlint.md)
[_KOTLIN_KTLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin_ktlint.md) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**LUA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua.md) | [**luacheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua_luacheck.md)
[_LUA_LUACHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua_luacheck.md) | [![GitHub stars](https://img.shields.io/github/stars/luarocks/luacheck?cacheSeconds=3600)](https://github.com/luarocks/luacheck) | +| | [**MAKEFILE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile.md) | [**checkmake**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile_checkmake.md)
[_MAKEFILE_CHECKMAKE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile_checkmake.md) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | +| | [**PERL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl.md) | [**perlcritic**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl_perlcritic.md)
[_PERL_PERLCRITIC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl_perlcritic.md) | [![GitHub stars](https://img.shields.io/github/stars/Perl-Critic/Perl-Critic?cacheSeconds=3600)](https://github.com/Perl-Critic/Perl-Critic) | +| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phpcs**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpcs.md)
[_PHP_PHPCS_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpcs.md) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | +| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phpstan**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpstan.md)
[_PHP_PHPSTAN_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpstan.md) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | +| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**psalm**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_psalm.md)
[_PHP_PSALM_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_psalm.md) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phplint.md)
[_PHP_PHPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phplint.md) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | +| | [**POWERSHELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell.md) | [**powershell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell.md)
[_POWERSHELL_POWERSHELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**POWERSHELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell.md) | [**powershell_formatter**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell_formatter.md)
[_POWERSHELL_POWERSHELL_FORMATTER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell_formatter.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**pylint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pylint.md)
[_PYTHON_PYLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pylint.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**black**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_black.md)
[_PYTHON_BLACK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_black.md) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**flake8**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_flake8.md)
[_PYTHON_FLAKE8_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_flake8.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**isort**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_isort.md)
[_PYTHON_ISORT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_isort.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**bandit**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_bandit.md)
[_PYTHON_BANDIT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_bandit.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/bandit?cacheSeconds=3600)](https://github.com/PyCQA/bandit) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**mypy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_mypy.md)
[_PYTHON_MYPY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_mypy.md) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**pyright**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pyright.md)
[_PYTHON_PYRIGHT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pyright.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | +| | [**R**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r.md) | [**lintr**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r_lintr.md)
[_R_LINTR_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r_lintr.md) | [![GitHub stars](https://img.shields.io/github/stars/r-lib/lintr?cacheSeconds=3600)](https://github.com/r-lib/lintr) | +| | [**RAKU**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku.md) | [**raku**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku_raku.md)
[_RAKU_RAKU_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku_raku.md) | [![GitHub stars](https://img.shields.io/github/stars/rakudo/rakudo?cacheSeconds=3600)](https://github.com/rakudo/rakudo) | +| | [**RUBY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby.md) | [**rubocop**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby_rubocop.md)
[_RUBY_RUBOCOP_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby_rubocop.md) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**RUST**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust.md) | [**clippy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust_clippy.md)
[_RUST_CLIPPY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust_clippy.md) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | +| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-apex**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_apex.md)
[_SALESFORCE_SFDX_SCANNER_APEX_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_apex.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-aura**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_aura.md)
[_SALESFORCE_SFDX_SCANNER_AURA_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_aura.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-lwc**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_lwc.md)
[_SALESFORCE_SFDX_SCANNER_LWC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_lwc.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SCALA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala.md) | [**scalafix**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala_scalafix.md)
[_SCALA_SCALAFIX_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala_scalafix.md) | [![GitHub stars](https://img.shields.io/github/stars/scalacenter/scalafix?cacheSeconds=3600)](https://github.com/scalacenter/scalafix) | +| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**sql-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sql_lint.md)
[_SQL_SQL_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sql_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | +| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**sqlfluff**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sqlfluff.md)
[_SQL_SQLFLUFF_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sqlfluff.md) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | +| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**tsqllint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_tsqllint.md)
[_SQL_TSQLLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_tsqllint.md) | [![GitHub stars](https://img.shields.io/github/stars/tsqllint/tsqllint?cacheSeconds=3600)](https://github.com/tsqllint/tsqllint) | +| | [**SWIFT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift.md) | [**swiftlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md)
[_SWIFT_SWIFTLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TSX**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md)
[_TSX_ESLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/jsx-eslint/eslint-plugin-react?cacheSeconds=3600)](https://github.com/jsx-eslint/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md)
[_TYPESCRIPT_ES_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/typescript-eslint/typescript-eslint?cacheSeconds=3600)](https://github.com/typescript-eslint/typescript-eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md)
[_TYPESCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**prettier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**Visual Basic .NET** (VBDOTNET)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet.md) | [**dotnet-format**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md)
[_VBDOTNET_DOTNET_FORMAT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | ### Formats @@ -312,22 +312,22 @@ All linters are integrated in the [MegaLinter docker image](https://hub.docker.c ### Other -| | Code quality checker | Linter | Additional | -|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**COPYPASTE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste.md) | [**jscpd**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste_jscpd.md)
[_COPYPASTE_JSCPD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste_jscpd.md) | [![GitHub stars](https://img.shields.io/github/stars/kucherenko/jscpd?cacheSeconds=3600)](https://github.com/kucherenko/jscpd) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**checkov**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_checkov.md)
[_REPOSITORY_CHECKOV_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_checkov.md) | [![GitHub stars](https://img.shields.io/github/stars/bridgecrewio/checkov?cacheSeconds=3600)](https://github.com/bridgecrewio/checkov) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**devskim**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_devskim.md)
[_REPOSITORY_DEVSKIM_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_devskim.md) | ![downgraded version](https://shields.io/badge/-downgraded%20version-orange) [![GitHub stars](https://img.shields.io/github/stars/microsoft/DevSkim?cacheSeconds=3600)](https://github.com/microsoft/DevSkim) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**dustilock**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_dustilock.md)
[_REPOSITORY_DUSTILOCK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_dustilock.md) | [![GitHub stars](https://img.shields.io/github/stars/Checkmarx/dustilock?cacheSeconds=3600)](https://github.com/Checkmarx/dustilock) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**git_diff**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_git_diff.md)
[_REPOSITORY_GIT_DIFF_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_git_diff.md) | [![GitHub stars](https://img.shields.io/github/stars/git/git?cacheSeconds=3600)](https://github.com/git/git) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**gitleaks**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_gitleaks.md)
[_REPOSITORY_GITLEAKS_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_gitleaks.md) | [![GitHub stars](https://img.shields.io/github/stars/zricethezav/gitleaks?cacheSeconds=3600)](https://github.com/zricethezav/gitleaks) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**goodcheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_goodcheck.md)
[_REPOSITORY_GOODCHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_goodcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/sider/goodcheck?cacheSeconds=3600)](https://github.com/sider/goodcheck) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**secretlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_secretlint.md)
[_REPOSITORY_SECRETLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_secretlint.md) | [![GitHub stars](https://img.shields.io/github/stars/secretlint/secretlint?cacheSeconds=3600)](https://github.com/secretlint/secretlint) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**semgrep**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_semgrep.md)
[_REPOSITORY_SEMGREP_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_semgrep.md) | [![GitHub stars](https://img.shields.io/github/stars/returntocorp/semgrep?cacheSeconds=3600)](https://github.com/returntocorp/semgrep) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**syft**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_syft.md)
[_REPOSITORY_SYFT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_syft.md) | [![GitHub stars](https://img.shields.io/github/stars/anchore/syft?cacheSeconds=3600)](https://github.com/anchore/syft) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**trivy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_trivy.md)
[_REPOSITORY_TRIVY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_trivy.md) | [![GitHub stars](https://img.shields.io/github/stars/aquasecurity/trivy?cacheSeconds=3600)](https://github.com/aquasecurity/trivy) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**misspell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_misspell.md)
[_SPELL_MISSPELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_misspell.md) | [![GitHub stars](https://img.shields.io/github/stars/client9/misspell?cacheSeconds=3600)](https://github.com/client9/misspell) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**cspell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_cspell.md)
[_SPELL_CSPELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_cspell.md) | [![GitHub stars](https://img.shields.io/github/stars/streetsidesoftware/cspell?cacheSeconds=3600)](https://github.com/streetsidesoftware/cspell) | -| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**proselint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_proselint.md)
[_SPELL_PROSELINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_proselint.md) | [![GitHub stars](https://img.shields.io/github/stars/amperser/proselint?cacheSeconds=3600)](https://github.com/amperser/proselint) | +| | Code quality checker | Linter | Additional | +|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**COPYPASTE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste.md) | [**jscpd**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste_jscpd.md)
[_COPYPASTE_JSCPD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste_jscpd.md) | [![GitHub stars](https://img.shields.io/github/stars/kucherenko/jscpd?cacheSeconds=3600)](https://github.com/kucherenko/jscpd) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**checkov**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_checkov.md)
[_REPOSITORY_CHECKOV_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_checkov.md) | [![GitHub stars](https://img.shields.io/github/stars/bridgecrewio/checkov?cacheSeconds=3600)](https://github.com/bridgecrewio/checkov) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**devskim**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_devskim.md)
[_REPOSITORY_DEVSKIM_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_devskim.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/DevSkim?cacheSeconds=3600)](https://github.com/microsoft/DevSkim) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**dustilock**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_dustilock.md)
[_REPOSITORY_DUSTILOCK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_dustilock.md) | [![GitHub stars](https://img.shields.io/github/stars/Checkmarx/dustilock?cacheSeconds=3600)](https://github.com/Checkmarx/dustilock) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**git_diff**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_git_diff.md)
[_REPOSITORY_GIT_DIFF_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_git_diff.md) | [![GitHub stars](https://img.shields.io/github/stars/git/git?cacheSeconds=3600)](https://github.com/git/git) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**gitleaks**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_gitleaks.md)
[_REPOSITORY_GITLEAKS_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_gitleaks.md) | [![GitHub stars](https://img.shields.io/github/stars/zricethezav/gitleaks?cacheSeconds=3600)](https://github.com/zricethezav/gitleaks) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**goodcheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_goodcheck.md)
[_REPOSITORY_GOODCHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_goodcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/sider/goodcheck?cacheSeconds=3600)](https://github.com/sider/goodcheck) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**secretlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_secretlint.md)
[_REPOSITORY_SECRETLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_secretlint.md) | [![GitHub stars](https://img.shields.io/github/stars/secretlint/secretlint?cacheSeconds=3600)](https://github.com/secretlint/secretlint) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**semgrep**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_semgrep.md)
[_REPOSITORY_SEMGREP_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_semgrep.md) | [![GitHub stars](https://img.shields.io/github/stars/returntocorp/semgrep?cacheSeconds=3600)](https://github.com/returntocorp/semgrep) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**syft**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_syft.md)
[_REPOSITORY_SYFT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_syft.md) | [![GitHub stars](https://img.shields.io/github/stars/anchore/syft?cacheSeconds=3600)](https://github.com/anchore/syft) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**trivy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_trivy.md)
[_REPOSITORY_TRIVY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_trivy.md) | [![GitHub stars](https://img.shields.io/github/stars/aquasecurity/trivy?cacheSeconds=3600)](https://github.com/aquasecurity/trivy) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**misspell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_misspell.md)
[_SPELL_MISSPELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_misspell.md) | [![GitHub stars](https://img.shields.io/github/stars/client9/misspell?cacheSeconds=3600)](https://github.com/client9/misspell) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**cspell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_cspell.md)
[_SPELL_CSPELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_cspell.md) | [![GitHub stars](https://img.shields.io/github/stars/streetsidesoftware/cspell?cacheSeconds=3600)](https://github.com/streetsidesoftware/cspell) | +| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**proselint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_proselint.md)
[_SPELL_PROSELINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_proselint.md) | [![GitHub stars](https://img.shields.io/github/stars/amperser/proselint?cacheSeconds=3600)](https://github.com/amperser/proselint) | diff --git a/docs/descriptors/csharp_csharpier.md b/docs/descriptors/csharp_csharpier.md index 9b25ee32810..c898693e71f 100644 --- a/docs/descriptors/csharp_csharpier.md +++ b/docs/descriptors/csharp_csharpier.md @@ -22,6 +22,8 @@ description: How to use csharpier (configure, ignore files, ignore errors, help - Enable csharpier by adding `CSHARP_CSHARPIER` in [ENABLE_LINTERS variable](https://megalinter.io/beta/configuration/#activation-and-deactivation) - Disable csharpier by adding `CSHARP_CSHARPIER` in [DISABLE_LINTERS variable](https://megalinter.io/beta/configuration/#activation-and-deactivation) +- Enable **auto-fixes** by adding `CSHARP_CSHARPIER` in [APPLY_FIXES variable](https://megalinter.io/beta/configuration/#apply-fixes) + | Variable | Description | Default value | |----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| | CSHARP_CSHARPIER_ARGUMENTS | User custom arguments to add in linter CLI call
Ex: `-s --foo "bar"` | | diff --git a/docs/descriptors/powershell_powershell.md b/docs/descriptors/powershell_powershell.md index 35cd053a55e..e120d14bc19 100644 --- a/docs/descriptors/powershell_powershell.md +++ b/docs/descriptors/powershell_powershell.md @@ -12,7 +12,6 @@ description: How to use powershell (configure, ignore files, ignore errors, help - Version in MegaLinter: **7.3.2** - Visit [Official Web Site](https://github.com/PowerShell/PSScriptAnalyzer#readme){target=_blank} - See [How to configure powershell rules](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules#explicit){target=_blank} - - If custom `.powershell-psscriptanalyzer.psd1` config file is not found, [.powershell-psscriptanalyzer.psd1](https://github.com/oxsecurity/megalinter/tree/main/TEMPLATES/.powershell-psscriptanalyzer.psd1){target=_blank} will be used - See [How to disable powershell rules in files](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules#suppressing-rules){target=_blank} - See [Index of problems detected by powershell](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/rules/readme?view=ps-modules){target=_blank} diff --git a/docs/descriptors/powershell_powershell_formatter.md b/docs/descriptors/powershell_powershell_formatter.md index 023c820f2a9..4589fe06001 100644 --- a/docs/descriptors/powershell_powershell_formatter.md +++ b/docs/descriptors/powershell_powershell_formatter.md @@ -12,7 +12,6 @@ description: How to use powershell_formatter (configure, ignore files, ignore er - Version in MegaLinter: **7.3.2** - Visit [Official Web Site](https://github.com/PowerShell/PSScriptAnalyzer#readme){target=_blank} - See [How to configure powershell_formatter rules](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules#explicit){target=_blank} - - If custom `.powershell-formatter.psd1` config file is not found, [.powershell-formatter.psd1](https://github.com/oxsecurity/megalinter/tree/main/TEMPLATES/.powershell-formatter.psd1){target=_blank} will be used - See [How to disable powershell_formatter rules in files](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules#suppressing-rules){target=_blank} - See [Index of problems detected by powershell_formatter](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/rules/readme?view=ps-modules){target=_blank} @@ -23,6 +22,8 @@ description: How to use powershell_formatter (configure, ignore files, ignore er - Enable powershell_formatter by adding `POWERSHELL_POWERSHELL_FORMATTER` in [ENABLE_LINTERS variable](https://megalinter.io/beta/configuration/#activation-and-deactivation) - Disable powershell_formatter by adding `POWERSHELL_POWERSHELL_FORMATTER` in [DISABLE_LINTERS variable](https://megalinter.io/beta/configuration/#activation-and-deactivation) +- Enable **auto-fixes** by adding `POWERSHELL_POWERSHELL_FORMATTER` in [APPLY_FIXES variable](https://megalinter.io/beta/configuration/#apply-fixes) + | Variable | Description | Default value | |-------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------| | POWERSHELL_POWERSHELL_FORMATTER_OUTPUT_ENCODING | `-Encoding` to be used when writing content to the file | `utf8` | diff --git a/docs/descriptors/swift_swiftlint.md b/docs/descriptors/swift_swiftlint.md index 33cea96c50b..fe5ce8695c2 100644 --- a/docs/descriptors/swift_swiftlint.md +++ b/docs/descriptors/swift_swiftlint.md @@ -82,7 +82,7 @@ docker run -v /tmp/lint:/tmp/lint:rw norionomura/swiftlint:latest swiftlint lint ``` ```shell -docker run -v /tmp/lint:/tmp/lint:rw norionomura/swiftlint:latest swiftlint autocorrect --path /tmp/lint --strict +docker run -v /tmp/lint:/tmp/lint:rw norionomura/swiftlint:latest swiftlint --fix --path /tmp/lint --strict ``` diff --git a/docs/descriptors/tsx.md b/docs/descriptors/tsx.md index 435015c39ac..93d8aad5b5d 100644 --- a/docs/descriptors/tsx.md +++ b/docs/descriptors/tsx.md @@ -9,9 +9,9 @@ description: eslint is available to analyze TSX files in MegaLinter ## Linters -| Linter | Additional | -|---------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**eslint**](tsx_eslint.md)
[_TSX_ESLINT_](tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| Linter | Additional | +|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [**eslint**](tsx_eslint.md)
[_TSX_ESLINT_](tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/jsx-eslint/eslint-plugin-react?cacheSeconds=3600)](https://github.com/jsx-eslint/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | ## Linted files diff --git a/docs/descriptors/tsx_eslint.md b/docs/descriptors/tsx_eslint.md index 9e5570554ff..4e1df27797c 100644 --- a/docs/descriptors/tsx_eslint.md +++ b/docs/descriptors/tsx_eslint.md @@ -6,12 +6,12 @@ description: How to use eslint (configure, ignore files, ignore errors, help & v -[![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/yannickcr/eslint-plugin-react?sort=semver)](https://github.com/yannickcr/eslint-plugin-react/releases) [![GitHub last commit](https://img.shields.io/github/last-commit/yannickcr/eslint-plugin-react)](https://github.com/yannickcr/eslint-plugin-react/commits) [![GitHub commit activity](https://img.shields.io/github/commit-activity/y/yannickcr/eslint-plugin-react)](https://github.com/yannickcr/eslint-plugin-react/graphs/commit-activity/) [![GitHub contributors](https://img.shields.io/github/contributors/yannickcr/eslint-plugin-react)](https://github.com/yannickcr/eslint-plugin-react/graphs/contributors/) +[![GitHub stars](https://img.shields.io/github/stars/jsx-eslint/eslint-plugin-react?cacheSeconds=3600)](https://github.com/jsx-eslint/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/jsx-eslint/eslint-plugin-react?sort=semver)](https://github.com/jsx-eslint/eslint-plugin-react/releases) [![GitHub last commit](https://img.shields.io/github/last-commit/jsx-eslint/eslint-plugin-react)](https://github.com/jsx-eslint/eslint-plugin-react/commits) [![GitHub commit activity](https://img.shields.io/github/commit-activity/y/jsx-eslint/eslint-plugin-react)](https://github.com/jsx-eslint/eslint-plugin-react/graphs/commit-activity/) [![GitHub contributors](https://img.shields.io/github/contributors/jsx-eslint/eslint-plugin-react)](https://github.com/jsx-eslint/eslint-plugin-react/graphs/contributors/) eslint requires a custom configuration file applicable to your project. @@ -19,15 +19,15 @@ You can create it by typing `npx eslint --init` in the root of your repository ## eslint documentation -- Version in MegaLinter: **8.34.0** -- Visit [Official Web Site](https://github.com/yannickcr/eslint-plugin-react#readme){target=_blank} -- See [How to configure eslint rules](https://github.com/yannickcr/eslint-plugin-react#configuration){target=_blank} +- Version in MegaLinter: **8.33.0** +- Visit [Official Web Site](https://github.com/jsx-eslint/eslint-plugin-react#readme){target=_blank} +- See [How to configure eslint rules](https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc){target=_blank} - See [How to disable eslint rules in files](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments){target=_blank} - See [How to ignore files and directories with eslint](https://eslint.org/docs/latest/user-guide/configuring/ignoring-code#the-eslintignore-file){target=_blank} - You can define a `.eslintignore` file to ignore files and folders -- See [Index of problems detected by eslint](https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules){target=_blank} +- See [Index of problems detected by eslint](https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules){target=_blank} -[![eslint-plugin-react - GitHub](https://gh-card.dev/repos/yannickcr/eslint-plugin-react.svg?fullname=)](https://github.com/yannickcr/eslint-plugin-react){target=_blank} +[![eslint-plugin-react - GitHub](https://gh-card.dev/repos/jsx-eslint/eslint-plugin-react.svg?fullname=)](https://github.com/jsx-eslint/eslint-plugin-react){target=_blank} ## Configuration in MegaLinter diff --git a/docs/descriptors/typescript.md b/docs/descriptors/typescript.md index 624f8025d79..6b7d5b8fe4b 100644 --- a/docs/descriptors/typescript.md +++ b/docs/descriptors/typescript.md @@ -9,11 +9,11 @@ description: eslint, standard, prettier are available to analyze TYPESCRIPT file ## Linters -| Linter | Additional | -|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**eslint**](typescript_eslint.md)
[_TYPESCRIPT_ES_](typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| [**standard**](typescript_standard.md)
[_TYPESCRIPT_STANDARD_](typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| [**prettier**](typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| Linter | Additional | +|--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [**eslint**](typescript_eslint.md)
[_TYPESCRIPT_ES_](typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/typescript-eslint/typescript-eslint?cacheSeconds=3600)](https://github.com/typescript-eslint/typescript-eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| [**standard**](typescript_standard.md)
[_TYPESCRIPT_STANDARD_](typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| [**prettier**](typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | ## Linted files diff --git a/docs/descriptors/typescript_eslint.md b/docs/descriptors/typescript_eslint.md index 6e269da8758..db9271a6c37 100644 --- a/docs/descriptors/typescript_eslint.md +++ b/docs/descriptors/typescript_eslint.md @@ -6,12 +6,12 @@ description: How to use eslint (configure, ignore files, ignore errors, help & v -[![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/eslint/eslint?sort=semver)](https://github.com/eslint/eslint/releases) [![GitHub last commit](https://img.shields.io/github/last-commit/eslint/eslint)](https://github.com/eslint/eslint/commits) [![GitHub commit activity](https://img.shields.io/github/commit-activity/y/eslint/eslint)](https://github.com/eslint/eslint/graphs/commit-activity/) [![GitHub contributors](https://img.shields.io/github/contributors/eslint/eslint)](https://github.com/eslint/eslint/graphs/contributors/) +[![GitHub stars](https://img.shields.io/github/stars/typescript-eslint/typescript-eslint?cacheSeconds=3600)](https://github.com/typescript-eslint/typescript-eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/typescript-eslint/typescript-eslint?sort=semver)](https://github.com/typescript-eslint/typescript-eslint/releases) [![GitHub last commit](https://img.shields.io/github/last-commit/typescript-eslint/typescript-eslint)](https://github.com/typescript-eslint/typescript-eslint/commits) [![GitHub commit activity](https://img.shields.io/github/commit-activity/y/typescript-eslint/typescript-eslint)](https://github.com/typescript-eslint/typescript-eslint/graphs/commit-activity/) [![GitHub contributors](https://img.shields.io/github/contributors/typescript-eslint/typescript-eslint)](https://github.com/typescript-eslint/typescript-eslint/graphs/contributors/) eslint requires a custom configuration file applicable to your project. @@ -19,15 +19,15 @@ You can create it by typing `npx eslint --init` in the root of your repository ## eslint documentation -- Version in MegaLinter: **8.34.0** -- Visit [Official Web Site](https://eslint.org){target=_blank} -- See [How to configure eslint rules](https://eslint.org/docs/user-guide/configuring){target=_blank} +- Version in MegaLinter: **8.33.0** +- Visit [Official Web Site](https://typescript-eslint.io/){target=_blank} +- See [How to configure eslint rules](https://typescript-eslint.io/getting-started/#configuration-values){target=_blank} - See [How to disable eslint rules in files](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments){target=_blank} - See [How to ignore files and directories with eslint](https://eslint.org/docs/latest/user-guide/configuring/ignoring-code#the-eslintignore-file){target=_blank} - You can define a `.eslintignore` file to ignore files and folders -- See [Index of problems detected by eslint](https://eslint.org/docs/rules/){target=_blank} +- See [Index of problems detected by eslint](https://typescript-eslint.io/rules/){target=_blank} -[![eslint - GitHub](https://gh-card.dev/repos/eslint/eslint.svg?fullname=)](https://github.com/eslint/eslint){target=_blank} +[![typescript-eslint - GitHub](https://gh-card.dev/repos/typescript-eslint/typescript-eslint.svg?fullname=)](https://github.com/typescript-eslint/typescript-eslint){target=_blank} ## Configuration in MegaLinter diff --git a/docs/descriptors/xml_xmllint.md b/docs/descriptors/xml_xmllint.md index abebef13cdb..819a23de36a 100644 --- a/docs/descriptors/xml_xmllint.md +++ b/docs/descriptors/xml_xmllint.md @@ -25,7 +25,7 @@ To apply file formatting you must set `XML_XMLLINT_CLI_LINT_MODE: file` and `XML | Variable | Description | Default value | |-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| | XML_XMLLINT_AUTOFORMAT | If set to `true`, it will reformat and reindent the output | `false` | -| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | `` | +| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | ` ` | | XML_XMLLINT_ARGUMENTS | User custom arguments to add in linter CLI call
Ex: `-s --foo "bar"` | | | XML_XMLLINT_FILTER_REGEX_INCLUDE | Custom regex including filter
Ex: `(src\|lib)` | Include every file | | XML_XMLLINT_FILTER_REGEX_EXCLUDE | Custom regex excluding filter
Ex: `(test\|examples)` | Exclude no file | diff --git a/docs/flavors/cupcake.md b/docs/flavors/cupcake.md index c42ff67688b..ad275ccc026 100644 --- a/docs/flavors/cupcake.md +++ b/docs/flavors/cupcake.md @@ -21,44 +21,44 @@ MegaLinter for the most commonly used languages ### Languages -| | Language | Linter | Additional | -|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**bash-exec**](https://megalinter.io/beta/descriptors/bash_bash_exec/)
[_BASH_EXEC_](https://megalinter.io/beta/descriptors/bash_bash_exec/) | | -| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**shellcheck**](https://megalinter.io/beta/descriptors/bash_shellcheck/)
[_BASH_SHELLCHECK_](https://megalinter.io/beta/descriptors/bash_shellcheck/) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**shfmt**](https://megalinter.io/beta/descriptors/bash_shfmt/)
[_BASH_SHFMT_](https://megalinter.io/beta/descriptors/bash_shfmt/) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**C**](https://megalinter.io/beta/descriptors/c/) | [**cpplint**](https://megalinter.io/beta/descriptors/c_cpplint/)
[_C_CPPLINT_](https://megalinter.io/beta/descriptors/c_cpplint/) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**CLOJURE**](https://megalinter.io/beta/descriptors/clojure/) | [**clj-kondo**](https://megalinter.io/beta/descriptors/clojure_clj_kondo/)
[_CLOJURE_CLJ_KONDO_](https://megalinter.io/beta/descriptors/clojure_clj_kondo/) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | -| | [**C++** (CPP)](https://megalinter.io/beta/descriptors/cpp/) | [**cpplint**](https://megalinter.io/beta/descriptors/cpp_cpplint/)
[_CPP_CPPLINT_](https://megalinter.io/beta/descriptors/cpp_cpplint/) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**GO**](https://megalinter.io/beta/descriptors/go/) | [**golangci-lint**](https://megalinter.io/beta/descriptors/go_golangci_lint/)
[_GO_GOLANGCI_LINT_](https://megalinter.io/beta/descriptors/go_golangci_lint/) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | -| | [**GO**](https://megalinter.io/beta/descriptors/go/) | [**revive**](https://megalinter.io/beta/descriptors/go_revive/)
[_GO_REVIVE_](https://megalinter.io/beta/descriptors/go_revive/) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**GROOVY**](https://megalinter.io/beta/descriptors/groovy/) | [**npm-groovy-lint**](https://megalinter.io/beta/descriptors/groovy_npm_groovy_lint/)
[_GROOVY_NPM_GROOVY_LINT_](https://megalinter.io/beta/descriptors/groovy_npm_groovy_lint/) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](https://megalinter.io/beta/descriptors/java/) | [**checkstyle**](https://megalinter.io/beta/descriptors/java_checkstyle/)
[_JAVA_CHECKSTYLE_](https://megalinter.io/beta/descriptors/java_checkstyle/) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](https://megalinter.io/beta/descriptors/java/) | [**pmd**](https://megalinter.io/beta/descriptors/java_pmd/)
[_JAVA_PMD_](https://megalinter.io/beta/descriptors/java_pmd/) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**eslint**](https://megalinter.io/beta/descriptors/javascript_eslint/)
[_JAVASCRIPT_ES_](https://megalinter.io/beta/descriptors/javascript_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**standard**](https://megalinter.io/beta/descriptors/javascript_standard/)
[_JAVASCRIPT_STANDARD_](https://megalinter.io/beta/descriptors/javascript_standard/) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**prettier**](https://megalinter.io/beta/descriptors/javascript_prettier/)
[_JAVASCRIPT_PRETTIER_](https://megalinter.io/beta/descriptors/javascript_prettier/) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**JSX**](https://megalinter.io/beta/descriptors/jsx/) | [**eslint**](https://megalinter.io/beta/descriptors/jsx_eslint/)
[_JSX_ESLINT_](https://megalinter.io/beta/descriptors/jsx_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**KOTLIN**](https://megalinter.io/beta/descriptors/kotlin/) | [**ktlint**](https://megalinter.io/beta/descriptors/kotlin_ktlint/)
[_KOTLIN_KTLINT_](https://megalinter.io/beta/descriptors/kotlin_ktlint/) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**MAKEFILE**](https://megalinter.io/beta/descriptors/makefile/) | [**checkmake**](https://megalinter.io/beta/descriptors/makefile_checkmake/)
[_MAKEFILE_CHECKMAKE_](https://megalinter.io/beta/descriptors/makefile_checkmake/) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | -| | [**PHP**](https://megalinter.io/beta/descriptors/php/) | [**phpcs**](https://megalinter.io/beta/descriptors/php_phpcs/)
[_PHP_PHPCS_](https://megalinter.io/beta/descriptors/php_phpcs/) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | -| | [**PHP**](https://megalinter.io/beta/descriptors/php/) | [**phpstan**](https://megalinter.io/beta/descriptors/php_phpstan/)
[_PHP_PHPSTAN_](https://megalinter.io/beta/descriptors/php_phpstan/) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | -| | [**PHP**](https://megalinter.io/beta/descriptors/php/) | [**psalm**](https://megalinter.io/beta/descriptors/php_psalm/)
[_PHP_PSALM_](https://megalinter.io/beta/descriptors/php_psalm/) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**PHP**](https://megalinter.io/beta/descriptors/php/) | [**phplint**](https://megalinter.io/beta/descriptors/php_phplint/)
[_PHP_PHPLINT_](https://megalinter.io/beta/descriptors/php_phplint/) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | -| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**pylint**](https://megalinter.io/beta/descriptors/python_pylint/)
[_PYTHON_PYLINT_](https://megalinter.io/beta/descriptors/python_pylint/) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | -| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**black**](https://megalinter.io/beta/descriptors/python_black/)
[_PYTHON_BLACK_](https://megalinter.io/beta/descriptors/python_black/) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**flake8**](https://megalinter.io/beta/descriptors/python_flake8/)
[_PYTHON_FLAKE8_](https://megalinter.io/beta/descriptors/python_flake8/) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | -| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**isort**](https://megalinter.io/beta/descriptors/python_isort/)
[_PYTHON_ISORT_](https://megalinter.io/beta/descriptors/python_isort/) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**mypy**](https://megalinter.io/beta/descriptors/python_mypy/)
[_PYTHON_MYPY_](https://megalinter.io/beta/descriptors/python_mypy/) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | -| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**pyright**](https://megalinter.io/beta/descriptors/python_pyright/)
[_PYTHON_PYRIGHT_](https://megalinter.io/beta/descriptors/python_pyright/) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | -| | [**RUBY**](https://megalinter.io/beta/descriptors/ruby/) | [**rubocop**](https://megalinter.io/beta/descriptors/ruby_rubocop/)
[_RUBY_RUBOCOP_](https://megalinter.io/beta/descriptors/ruby_rubocop/) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**RUST**](https://megalinter.io/beta/descriptors/rust/) | [**clippy**](https://megalinter.io/beta/descriptors/rust_clippy/)
[_RUST_CLIPPY_](https://megalinter.io/beta/descriptors/rust_clippy/) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | -| | [**SQL**](https://megalinter.io/beta/descriptors/sql/) | [**sql-lint**](https://megalinter.io/beta/descriptors/sql_sql_lint/)
[_SQL_SQL_LINT_](https://megalinter.io/beta/descriptors/sql_sql_lint/) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | -| | [**SQL**](https://megalinter.io/beta/descriptors/sql/) | [**sqlfluff**](https://megalinter.io/beta/descriptors/sql_sqlfluff/)
[_SQL_SQLFLUFF_](https://megalinter.io/beta/descriptors/sql_sqlfluff/) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | -| | [**SWIFT**](https://megalinter.io/beta/descriptors/swift/) | [**swiftlint**](https://megalinter.io/beta/descriptors/swift_swiftlint/)
[_SWIFT_SWIFTLINT_](https://megalinter.io/beta/descriptors/swift_swiftlint/) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TSX**](https://megalinter.io/beta/descriptors/tsx/) | [**eslint**](https://megalinter.io/beta/descriptors/tsx_eslint/)
[_TSX_ESLINT_](https://megalinter.io/beta/descriptors/tsx_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**eslint**](https://megalinter.io/beta/descriptors/typescript_eslint/)
[_TYPESCRIPT_ES_](https://megalinter.io/beta/descriptors/typescript_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**standard**](https://megalinter.io/beta/descriptors/typescript_standard/)
[_TYPESCRIPT_STANDARD_](https://megalinter.io/beta/descriptors/typescript_standard/) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**prettier**](https://megalinter.io/beta/descriptors/typescript_prettier/)
[_TYPESCRIPT_PRETTIER_](https://megalinter.io/beta/descriptors/typescript_prettier/) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | Language | Linter | Additional | +|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**bash-exec**](https://megalinter.io/beta/descriptors/bash_bash_exec/)
[_BASH_EXEC_](https://megalinter.io/beta/descriptors/bash_bash_exec/) | | +| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**shellcheck**](https://megalinter.io/beta/descriptors/bash_shellcheck/)
[_BASH_SHELLCHECK_](https://megalinter.io/beta/descriptors/bash_shellcheck/) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**shfmt**](https://megalinter.io/beta/descriptors/bash_shfmt/)
[_BASH_SHFMT_](https://megalinter.io/beta/descriptors/bash_shfmt/) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**C**](https://megalinter.io/beta/descriptors/c/) | [**cpplint**](https://megalinter.io/beta/descriptors/c_cpplint/)
[_C_CPPLINT_](https://megalinter.io/beta/descriptors/c_cpplint/) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**CLOJURE**](https://megalinter.io/beta/descriptors/clojure/) | [**clj-kondo**](https://megalinter.io/beta/descriptors/clojure_clj_kondo/)
[_CLOJURE_CLJ_KONDO_](https://megalinter.io/beta/descriptors/clojure_clj_kondo/) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | +| | [**C++** (CPP)](https://megalinter.io/beta/descriptors/cpp/) | [**cpplint**](https://megalinter.io/beta/descriptors/cpp_cpplint/)
[_CPP_CPPLINT_](https://megalinter.io/beta/descriptors/cpp_cpplint/) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**GO**](https://megalinter.io/beta/descriptors/go/) | [**golangci-lint**](https://megalinter.io/beta/descriptors/go_golangci_lint/)
[_GO_GOLANGCI_LINT_](https://megalinter.io/beta/descriptors/go_golangci_lint/) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | +| | [**GO**](https://megalinter.io/beta/descriptors/go/) | [**revive**](https://megalinter.io/beta/descriptors/go_revive/)
[_GO_REVIVE_](https://megalinter.io/beta/descriptors/go_revive/) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**GROOVY**](https://megalinter.io/beta/descriptors/groovy/) | [**npm-groovy-lint**](https://megalinter.io/beta/descriptors/groovy_npm_groovy_lint/)
[_GROOVY_NPM_GROOVY_LINT_](https://megalinter.io/beta/descriptors/groovy_npm_groovy_lint/) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](https://megalinter.io/beta/descriptors/java/) | [**checkstyle**](https://megalinter.io/beta/descriptors/java_checkstyle/)
[_JAVA_CHECKSTYLE_](https://megalinter.io/beta/descriptors/java_checkstyle/) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](https://megalinter.io/beta/descriptors/java/) | [**pmd**](https://megalinter.io/beta/descriptors/java_pmd/)
[_JAVA_PMD_](https://megalinter.io/beta/descriptors/java_pmd/) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**eslint**](https://megalinter.io/beta/descriptors/javascript_eslint/)
[_JAVASCRIPT_ES_](https://megalinter.io/beta/descriptors/javascript_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**standard**](https://megalinter.io/beta/descriptors/javascript_standard/)
[_JAVASCRIPT_STANDARD_](https://megalinter.io/beta/descriptors/javascript_standard/) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**prettier**](https://megalinter.io/beta/descriptors/javascript_prettier/)
[_JAVASCRIPT_PRETTIER_](https://megalinter.io/beta/descriptors/javascript_prettier/) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**JSX**](https://megalinter.io/beta/descriptors/jsx/) | [**eslint**](https://megalinter.io/beta/descriptors/jsx_eslint/)
[_JSX_ESLINT_](https://megalinter.io/beta/descriptors/jsx_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**KOTLIN**](https://megalinter.io/beta/descriptors/kotlin/) | [**ktlint**](https://megalinter.io/beta/descriptors/kotlin_ktlint/)
[_KOTLIN_KTLINT_](https://megalinter.io/beta/descriptors/kotlin_ktlint/) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**MAKEFILE**](https://megalinter.io/beta/descriptors/makefile/) | [**checkmake**](https://megalinter.io/beta/descriptors/makefile_checkmake/)
[_MAKEFILE_CHECKMAKE_](https://megalinter.io/beta/descriptors/makefile_checkmake/) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | +| | [**PHP**](https://megalinter.io/beta/descriptors/php/) | [**phpcs**](https://megalinter.io/beta/descriptors/php_phpcs/)
[_PHP_PHPCS_](https://megalinter.io/beta/descriptors/php_phpcs/) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | +| | [**PHP**](https://megalinter.io/beta/descriptors/php/) | [**phpstan**](https://megalinter.io/beta/descriptors/php_phpstan/)
[_PHP_PHPSTAN_](https://megalinter.io/beta/descriptors/php_phpstan/) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | +| | [**PHP**](https://megalinter.io/beta/descriptors/php/) | [**psalm**](https://megalinter.io/beta/descriptors/php_psalm/)
[_PHP_PSALM_](https://megalinter.io/beta/descriptors/php_psalm/) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**PHP**](https://megalinter.io/beta/descriptors/php/) | [**phplint**](https://megalinter.io/beta/descriptors/php_phplint/)
[_PHP_PHPLINT_](https://megalinter.io/beta/descriptors/php_phplint/) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | +| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**pylint**](https://megalinter.io/beta/descriptors/python_pylint/)
[_PYTHON_PYLINT_](https://megalinter.io/beta/descriptors/python_pylint/) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | +| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**black**](https://megalinter.io/beta/descriptors/python_black/)
[_PYTHON_BLACK_](https://megalinter.io/beta/descriptors/python_black/) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**flake8**](https://megalinter.io/beta/descriptors/python_flake8/)
[_PYTHON_FLAKE8_](https://megalinter.io/beta/descriptors/python_flake8/) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | +| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**isort**](https://megalinter.io/beta/descriptors/python_isort/)
[_PYTHON_ISORT_](https://megalinter.io/beta/descriptors/python_isort/) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**mypy**](https://megalinter.io/beta/descriptors/python_mypy/)
[_PYTHON_MYPY_](https://megalinter.io/beta/descriptors/python_mypy/) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | +| | [**PYTHON**](https://megalinter.io/beta/descriptors/python/) | [**pyright**](https://megalinter.io/beta/descriptors/python_pyright/)
[_PYTHON_PYRIGHT_](https://megalinter.io/beta/descriptors/python_pyright/) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | +| | [**RUBY**](https://megalinter.io/beta/descriptors/ruby/) | [**rubocop**](https://megalinter.io/beta/descriptors/ruby_rubocop/)
[_RUBY_RUBOCOP_](https://megalinter.io/beta/descriptors/ruby_rubocop/) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**RUST**](https://megalinter.io/beta/descriptors/rust/) | [**clippy**](https://megalinter.io/beta/descriptors/rust_clippy/)
[_RUST_CLIPPY_](https://megalinter.io/beta/descriptors/rust_clippy/) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | +| | [**SQL**](https://megalinter.io/beta/descriptors/sql/) | [**sql-lint**](https://megalinter.io/beta/descriptors/sql_sql_lint/)
[_SQL_SQL_LINT_](https://megalinter.io/beta/descriptors/sql_sql_lint/) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | +| | [**SQL**](https://megalinter.io/beta/descriptors/sql/) | [**sqlfluff**](https://megalinter.io/beta/descriptors/sql_sqlfluff/)
[_SQL_SQLFLUFF_](https://megalinter.io/beta/descriptors/sql_sqlfluff/) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | +| | [**SWIFT**](https://megalinter.io/beta/descriptors/swift/) | [**swiftlint**](https://megalinter.io/beta/descriptors/swift_swiftlint/)
[_SWIFT_SWIFTLINT_](https://megalinter.io/beta/descriptors/swift_swiftlint/) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TSX**](https://megalinter.io/beta/descriptors/tsx/) | [**eslint**](https://megalinter.io/beta/descriptors/tsx_eslint/)
[_TSX_ESLINT_](https://megalinter.io/beta/descriptors/tsx_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/jsx-eslint/eslint-plugin-react?cacheSeconds=3600)](https://github.com/jsx-eslint/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**eslint**](https://megalinter.io/beta/descriptors/typescript_eslint/)
[_TYPESCRIPT_ES_](https://megalinter.io/beta/descriptors/typescript_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/typescript-eslint/typescript-eslint?cacheSeconds=3600)](https://github.com/typescript-eslint/typescript-eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**standard**](https://megalinter.io/beta/descriptors/typescript_standard/)
[_TYPESCRIPT_STANDARD_](https://megalinter.io/beta/descriptors/typescript_standard/) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**prettier**](https://megalinter.io/beta/descriptors/typescript_prettier/)
[_TYPESCRIPT_PRETTIER_](https://megalinter.io/beta/descriptors/typescript_prettier/) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | ### Formats diff --git a/docs/flavors/javascript.md b/docs/flavors/javascript.md index 19b1304e96d..3be9af77f93 100644 --- a/docs/flavors/javascript.md +++ b/docs/flavors/javascript.md @@ -21,24 +21,24 @@ Optimized for JAVASCRIPT or TYPESCRIPT based projects ### Languages -| | Language | Linter | Additional | -|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**bash-exec**](https://megalinter.io/beta/descriptors/bash_bash_exec/)
[_BASH_EXEC_](https://megalinter.io/beta/descriptors/bash_bash_exec/) | | -| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**shellcheck**](https://megalinter.io/beta/descriptors/bash_shellcheck/)
[_BASH_SHELLCHECK_](https://megalinter.io/beta/descriptors/bash_shellcheck/) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**shfmt**](https://megalinter.io/beta/descriptors/bash_shfmt/)
[_BASH_SHFMT_](https://megalinter.io/beta/descriptors/bash_shfmt/) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**COFFEE**](https://megalinter.io/beta/descriptors/coffee/) | [**coffeelint**](https://megalinter.io/beta/descriptors/coffee_coffeelint/)
[_COFFEE_COFFEELINT_](https://megalinter.io/beta/descriptors/coffee_coffeelint/) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | -| | [**GROOVY**](https://megalinter.io/beta/descriptors/groovy/) | [**npm-groovy-lint**](https://megalinter.io/beta/descriptors/groovy_npm_groovy_lint/)
[_GROOVY_NPM_GROOVY_LINT_](https://megalinter.io/beta/descriptors/groovy_npm_groovy_lint/) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**eslint**](https://megalinter.io/beta/descriptors/javascript_eslint/)
[_JAVASCRIPT_ES_](https://megalinter.io/beta/descriptors/javascript_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**standard**](https://megalinter.io/beta/descriptors/javascript_standard/)
[_JAVASCRIPT_STANDARD_](https://megalinter.io/beta/descriptors/javascript_standard/) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**prettier**](https://megalinter.io/beta/descriptors/javascript_prettier/)
[_JAVASCRIPT_PRETTIER_](https://megalinter.io/beta/descriptors/javascript_prettier/) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**JSX**](https://megalinter.io/beta/descriptors/jsx/) | [**eslint**](https://megalinter.io/beta/descriptors/jsx_eslint/)
[_JSX_ESLINT_](https://megalinter.io/beta/descriptors/jsx_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**KOTLIN**](https://megalinter.io/beta/descriptors/kotlin/) | [**ktlint**](https://megalinter.io/beta/descriptors/kotlin_ktlint/)
[_KOTLIN_KTLINT_](https://megalinter.io/beta/descriptors/kotlin_ktlint/) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**SQL**](https://megalinter.io/beta/descriptors/sql/) | [**sql-lint**](https://megalinter.io/beta/descriptors/sql_sql_lint/)
[_SQL_SQL_LINT_](https://megalinter.io/beta/descriptors/sql_sql_lint/) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | -| | [**SQL**](https://megalinter.io/beta/descriptors/sql/) | [**sqlfluff**](https://megalinter.io/beta/descriptors/sql_sqlfluff/)
[_SQL_SQLFLUFF_](https://megalinter.io/beta/descriptors/sql_sqlfluff/) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | -| | [**TSX**](https://megalinter.io/beta/descriptors/tsx/) | [**eslint**](https://megalinter.io/beta/descriptors/tsx_eslint/)
[_TSX_ESLINT_](https://megalinter.io/beta/descriptors/tsx_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**eslint**](https://megalinter.io/beta/descriptors/typescript_eslint/)
[_TYPESCRIPT_ES_](https://megalinter.io/beta/descriptors/typescript_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**standard**](https://megalinter.io/beta/descriptors/typescript_standard/)
[_TYPESCRIPT_STANDARD_](https://megalinter.io/beta/descriptors/typescript_standard/) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**prettier**](https://megalinter.io/beta/descriptors/typescript_prettier/)
[_TYPESCRIPT_PRETTIER_](https://megalinter.io/beta/descriptors/typescript_prettier/) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | Language | Linter | Additional | +|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**bash-exec**](https://megalinter.io/beta/descriptors/bash_bash_exec/)
[_BASH_EXEC_](https://megalinter.io/beta/descriptors/bash_bash_exec/) | | +| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**shellcheck**](https://megalinter.io/beta/descriptors/bash_shellcheck/)
[_BASH_SHELLCHECK_](https://megalinter.io/beta/descriptors/bash_shellcheck/) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**BASH**](https://megalinter.io/beta/descriptors/bash/) | [**shfmt**](https://megalinter.io/beta/descriptors/bash_shfmt/)
[_BASH_SHFMT_](https://megalinter.io/beta/descriptors/bash_shfmt/) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**COFFEE**](https://megalinter.io/beta/descriptors/coffee/) | [**coffeelint**](https://megalinter.io/beta/descriptors/coffee_coffeelint/)
[_COFFEE_COFFEELINT_](https://megalinter.io/beta/descriptors/coffee_coffeelint/) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | +| | [**GROOVY**](https://megalinter.io/beta/descriptors/groovy/) | [**npm-groovy-lint**](https://megalinter.io/beta/descriptors/groovy_npm_groovy_lint/)
[_GROOVY_NPM_GROOVY_LINT_](https://megalinter.io/beta/descriptors/groovy_npm_groovy_lint/) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**eslint**](https://megalinter.io/beta/descriptors/javascript_eslint/)
[_JAVASCRIPT_ES_](https://megalinter.io/beta/descriptors/javascript_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**standard**](https://megalinter.io/beta/descriptors/javascript_standard/)
[_JAVASCRIPT_STANDARD_](https://megalinter.io/beta/descriptors/javascript_standard/) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**JAVASCRIPT**](https://megalinter.io/beta/descriptors/javascript/) | [**prettier**](https://megalinter.io/beta/descriptors/javascript_prettier/)
[_JAVASCRIPT_PRETTIER_](https://megalinter.io/beta/descriptors/javascript_prettier/) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**JSX**](https://megalinter.io/beta/descriptors/jsx/) | [**eslint**](https://megalinter.io/beta/descriptors/jsx_eslint/)
[_JSX_ESLINT_](https://megalinter.io/beta/descriptors/jsx_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**KOTLIN**](https://megalinter.io/beta/descriptors/kotlin/) | [**ktlint**](https://megalinter.io/beta/descriptors/kotlin_ktlint/)
[_KOTLIN_KTLINT_](https://megalinter.io/beta/descriptors/kotlin_ktlint/) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**SQL**](https://megalinter.io/beta/descriptors/sql/) | [**sql-lint**](https://megalinter.io/beta/descriptors/sql_sql_lint/)
[_SQL_SQL_LINT_](https://megalinter.io/beta/descriptors/sql_sql_lint/) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | +| | [**SQL**](https://megalinter.io/beta/descriptors/sql/) | [**sqlfluff**](https://megalinter.io/beta/descriptors/sql_sqlfluff/)
[_SQL_SQLFLUFF_](https://megalinter.io/beta/descriptors/sql_sqlfluff/) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | +| | [**TSX**](https://megalinter.io/beta/descriptors/tsx/) | [**eslint**](https://megalinter.io/beta/descriptors/tsx_eslint/)
[_TSX_ESLINT_](https://megalinter.io/beta/descriptors/tsx_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/jsx-eslint/eslint-plugin-react?cacheSeconds=3600)](https://github.com/jsx-eslint/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**eslint**](https://megalinter.io/beta/descriptors/typescript_eslint/)
[_TYPESCRIPT_ES_](https://megalinter.io/beta/descriptors/typescript_eslint/) | [![GitHub stars](https://img.shields.io/github/stars/typescript-eslint/typescript-eslint?cacheSeconds=3600)](https://github.com/typescript-eslint/typescript-eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**standard**](https://megalinter.io/beta/descriptors/typescript_standard/)
[_TYPESCRIPT_STANDARD_](https://megalinter.io/beta/descriptors/typescript_standard/) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TYPESCRIPT**](https://megalinter.io/beta/descriptors/typescript/) | [**prettier**](https://megalinter.io/beta/descriptors/typescript_prettier/)
[_TYPESCRIPT_PRETTIER_](https://megalinter.io/beta/descriptors/typescript_prettier/) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | ### Formats diff --git a/docs/index.md b/docs/index.md index 94e15141366..726b29acf77 100644 --- a/docs/index.md +++ b/docs/index.md @@ -105,61 +105,61 @@ All linters are integrated in the [MegaLinter docker image](https://hub.docker.c ### Languages -| | Language | Linter | Additional | -|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**BASH**](descriptors/bash.md) | [**bash-exec**](descriptors/bash_bash_exec.md)
[_BASH_EXEC_](descriptors/bash_bash_exec.md) | | -| | [**BASH**](descriptors/bash.md) | [**shellcheck**](descriptors/bash_shellcheck.md)
[_BASH_SHELLCHECK_](descriptors/bash_shellcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**BASH**](descriptors/bash.md) | [**shfmt**](descriptors/bash_shfmt.md)
[_BASH_SHFMT_](descriptors/bash_shfmt.md) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**C**](descriptors/c.md) | [**cpplint**](descriptors/c_cpplint.md)
[_C_CPPLINT_](descriptors/c_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**CLOJURE**](descriptors/clojure.md) | [**clj-kondo**](descriptors/clojure_clj_kondo.md)
[_CLOJURE_CLJ_KONDO_](descriptors/clojure_clj_kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | -| | [**COFFEE**](descriptors/coffee.md) | [**coffeelint**](descriptors/coffee_coffeelint.md)
[_COFFEE_COFFEELINT_](descriptors/coffee_coffeelint.md) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | -| | [**C++** (CPP)](descriptors/cpp.md) | [**cpplint**](descriptors/cpp_cpplint.md)
[_CPP_CPPLINT_](descriptors/cpp_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**C#** (CSHARP)](descriptors/csharp.md) | [**dotnet-format**](descriptors/csharp_dotnet_format.md)
[_CSHARP_DOTNET_FORMAT_](descriptors/csharp_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**C#** (CSHARP)](descriptors/csharp.md) | [**csharpier**](descriptors/csharp_csharpier.md)
[_CSHARP_CSHARPIER_](descriptors/csharp_csharpier.md) | [![GitHub stars](https://img.shields.io/github/stars/belav/csharpier?cacheSeconds=3600)](https://github.com/belav/csharpier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**DART**](descriptors/dart.md) | [**dartanalyzer**](descriptors/dart_dartanalyzer.md)
[_DART_DARTANALYZER_](descriptors/dart_dartanalyzer.md) | ![downgraded version](https://shields.io/badge/-downgraded%20version-orange) [![GitHub stars](https://img.shields.io/github/stars/dart-lang/sdk?cacheSeconds=3600)](https://github.com/dart-lang/sdk) | -| | [**GO**](descriptors/go.md) | [**golangci-lint**](descriptors/go_golangci_lint.md)
[_GO_GOLANGCI_LINT_](descriptors/go_golangci_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | -| | [**GO**](descriptors/go.md) | [**revive**](descriptors/go_revive.md)
[_GO_REVIVE_](descriptors/go_revive.md) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**GROOVY**](descriptors/groovy.md) | [**npm-groovy-lint**](descriptors/groovy_npm_groovy_lint.md)
[_GROOVY_NPM_GROOVY_LINT_](descriptors/groovy_npm_groovy_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](descriptors/java.md) | [**checkstyle**](descriptors/java_checkstyle.md)
[_JAVA_CHECKSTYLE_](descriptors/java_checkstyle.md) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](descriptors/java.md) | [**pmd**](descriptors/java_pmd.md)
[_JAVA_PMD_](descriptors/java_pmd.md) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](descriptors/javascript.md) | [**eslint**](descriptors/javascript_eslint.md)
[_JAVASCRIPT_ES_](descriptors/javascript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](descriptors/javascript.md) | [**standard**](descriptors/javascript_standard.md)
[_JAVASCRIPT_STANDARD_](descriptors/javascript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**JAVASCRIPT**](descriptors/javascript.md) | [**prettier**](descriptors/javascript_prettier.md)
[_JAVASCRIPT_PRETTIER_](descriptors/javascript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**JSX**](descriptors/jsx.md) | [**eslint**](descriptors/jsx_eslint.md)
[_JSX_ESLINT_](descriptors/jsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**KOTLIN**](descriptors/kotlin.md) | [**ktlint**](descriptors/kotlin_ktlint.md)
[_KOTLIN_KTLINT_](descriptors/kotlin_ktlint.md) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**LUA**](descriptors/lua.md) | [**luacheck**](descriptors/lua_luacheck.md)
[_LUA_LUACHECK_](descriptors/lua_luacheck.md) | [![GitHub stars](https://img.shields.io/github/stars/luarocks/luacheck?cacheSeconds=3600)](https://github.com/luarocks/luacheck) | -| | [**MAKEFILE**](descriptors/makefile.md) | [**checkmake**](descriptors/makefile_checkmake.md)
[_MAKEFILE_CHECKMAKE_](descriptors/makefile_checkmake.md) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | -| | [**PERL**](descriptors/perl.md) | [**perlcritic**](descriptors/perl_perlcritic.md)
[_PERL_PERLCRITIC_](descriptors/perl_perlcritic.md) | [![GitHub stars](https://img.shields.io/github/stars/Perl-Critic/Perl-Critic?cacheSeconds=3600)](https://github.com/Perl-Critic/Perl-Critic) | -| | [**PHP**](descriptors/php.md) | [**phpcs**](descriptors/php_phpcs.md)
[_PHP_PHPCS_](descriptors/php_phpcs.md) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | -| | [**PHP**](descriptors/php.md) | [**phpstan**](descriptors/php_phpstan.md)
[_PHP_PHPSTAN_](descriptors/php_phpstan.md) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | -| | [**PHP**](descriptors/php.md) | [**psalm**](descriptors/php_psalm.md)
[_PHP_PSALM_](descriptors/php_psalm.md) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**PHP**](descriptors/php.md) | [**phplint**](descriptors/php_phplint.md)
[_PHP_PHPLINT_](descriptors/php_phplint.md) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | -| | [**POWERSHELL**](descriptors/powershell.md) | [**powershell**](descriptors/powershell_powershell.md)
[_POWERSHELL_POWERSHELL_](descriptors/powershell_powershell.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**POWERSHELL**](descriptors/powershell.md) | [**powershell_formatter**](descriptors/powershell_powershell_formatter.md)
[_POWERSHELL_POWERSHELL_FORMATTER_](descriptors/powershell_powershell_formatter.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](descriptors/python.md) | [**pylint**](descriptors/python_pylint.md)
[_PYTHON_PYLINT_](descriptors/python_pylint.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | -| | [**PYTHON**](descriptors/python.md) | [**black**](descriptors/python_black.md)
[_PYTHON_BLACK_](descriptors/python_black.md) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](descriptors/python.md) | [**flake8**](descriptors/python_flake8.md)
[_PYTHON_FLAKE8_](descriptors/python_flake8.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | -| | [**PYTHON**](descriptors/python.md) | [**isort**](descriptors/python_isort.md)
[_PYTHON_ISORT_](descriptors/python_isort.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](descriptors/python.md) | [**bandit**](descriptors/python_bandit.md)
[_PYTHON_BANDIT_](descriptors/python_bandit.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/bandit?cacheSeconds=3600)](https://github.com/PyCQA/bandit) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**PYTHON**](descriptors/python.md) | [**mypy**](descriptors/python_mypy.md)
[_PYTHON_MYPY_](descriptors/python_mypy.md) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | -| | [**PYTHON**](descriptors/python.md) | [**pyright**](descriptors/python_pyright.md)
[_PYTHON_PYRIGHT_](descriptors/python_pyright.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | -| | [**R**](descriptors/r.md) | [**lintr**](descriptors/r_lintr.md)
[_R_LINTR_](descriptors/r_lintr.md) | [![GitHub stars](https://img.shields.io/github/stars/r-lib/lintr?cacheSeconds=3600)](https://github.com/r-lib/lintr) | -| | [**RAKU**](descriptors/raku.md) | [**raku**](descriptors/raku_raku.md)
[_RAKU_RAKU_](descriptors/raku_raku.md) | [![GitHub stars](https://img.shields.io/github/stars/rakudo/rakudo?cacheSeconds=3600)](https://github.com/rakudo/rakudo) | -| | [**RUBY**](descriptors/ruby.md) | [**rubocop**](descriptors/ruby_rubocop.md)
[_RUBY_RUBOCOP_](descriptors/ruby_rubocop.md) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**RUST**](descriptors/rust.md) | [**clippy**](descriptors/rust_clippy.md)
[_RUST_CLIPPY_](descriptors/rust_clippy.md) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | -| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-apex**](descriptors/salesforce_sfdx_scanner_apex.md)
[_SALESFORCE_SFDX_SCANNER_APEX_](descriptors/salesforce_sfdx_scanner_apex.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-aura**](descriptors/salesforce_sfdx_scanner_aura.md)
[_SALESFORCE_SFDX_SCANNER_AURA_](descriptors/salesforce_sfdx_scanner_aura.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-lwc**](descriptors/salesforce_sfdx_scanner_lwc.md)
[_SALESFORCE_SFDX_SCANNER_LWC_](descriptors/salesforce_sfdx_scanner_lwc.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SCALA**](descriptors/scala.md) | [**scalafix**](descriptors/scala_scalafix.md)
[_SCALA_SCALAFIX_](descriptors/scala_scalafix.md) | [![GitHub stars](https://img.shields.io/github/stars/scalacenter/scalafix?cacheSeconds=3600)](https://github.com/scalacenter/scalafix) | -| | [**SQL**](descriptors/sql.md) | [**sql-lint**](descriptors/sql_sql_lint.md)
[_SQL_SQL_LINT_](descriptors/sql_sql_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | -| | [**SQL**](descriptors/sql.md) | [**sqlfluff**](descriptors/sql_sqlfluff.md)
[_SQL_SQLFLUFF_](descriptors/sql_sqlfluff.md) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | -| | [**SQL**](descriptors/sql.md) | [**tsqllint**](descriptors/sql_tsqllint.md)
[_SQL_TSQLLINT_](descriptors/sql_tsqllint.md) | [![GitHub stars](https://img.shields.io/github/stars/tsqllint/tsqllint?cacheSeconds=3600)](https://github.com/tsqllint/tsqllint) | -| | [**SWIFT**](descriptors/swift.md) | [**swiftlint**](descriptors/swift_swiftlint.md)
[_SWIFT_SWIFTLINT_](descriptors/swift_swiftlint.md) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TSX**](descriptors/tsx.md) | [**eslint**](descriptors/tsx_eslint.md)
[_TSX_ESLINT_](descriptors/tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](descriptors/typescript.md) | [**eslint**](descriptors/typescript_eslint.md)
[_TYPESCRIPT_ES_](descriptors/typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](descriptors/typescript.md) | [**standard**](descriptors/typescript_standard.md)
[_TYPESCRIPT_STANDARD_](descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TYPESCRIPT**](descriptors/typescript.md) | [**prettier**](descriptors/typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](descriptors/typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**Visual Basic .NET** (VBDOTNET)](descriptors/vbdotnet.md) | [**dotnet-format**](descriptors/vbdotnet_dotnet_format.md)
[_VBDOTNET_DOTNET_FORMAT_](descriptors/vbdotnet_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | +| | Language | Linter | Additional | +|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**BASH**](descriptors/bash.md) | [**bash-exec**](descriptors/bash_bash_exec.md)
[_BASH_EXEC_](descriptors/bash_bash_exec.md) | | +| | [**BASH**](descriptors/bash.md) | [**shellcheck**](descriptors/bash_shellcheck.md)
[_BASH_SHELLCHECK_](descriptors/bash_shellcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**BASH**](descriptors/bash.md) | [**shfmt**](descriptors/bash_shfmt.md)
[_BASH_SHFMT_](descriptors/bash_shfmt.md) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**C**](descriptors/c.md) | [**cpplint**](descriptors/c_cpplint.md)
[_C_CPPLINT_](descriptors/c_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**CLOJURE**](descriptors/clojure.md) | [**clj-kondo**](descriptors/clojure_clj_kondo.md)
[_CLOJURE_CLJ_KONDO_](descriptors/clojure_clj_kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | +| | [**COFFEE**](descriptors/coffee.md) | [**coffeelint**](descriptors/coffee_coffeelint.md)
[_COFFEE_COFFEELINT_](descriptors/coffee_coffeelint.md) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | +| | [**C++** (CPP)](descriptors/cpp.md) | [**cpplint**](descriptors/cpp_cpplint.md)
[_CPP_CPPLINT_](descriptors/cpp_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**C#** (CSHARP)](descriptors/csharp.md) | [**dotnet-format**](descriptors/csharp_dotnet_format.md)
[_CSHARP_DOTNET_FORMAT_](descriptors/csharp_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**C#** (CSHARP)](descriptors/csharp.md) | [**csharpier**](descriptors/csharp_csharpier.md)
[_CSHARP_CSHARPIER_](descriptors/csharp_csharpier.md) | [![GitHub stars](https://img.shields.io/github/stars/belav/csharpier?cacheSeconds=3600)](https://github.com/belav/csharpier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**DART**](descriptors/dart.md) | [**dartanalyzer**](descriptors/dart_dartanalyzer.md)
[_DART_DARTANALYZER_](descriptors/dart_dartanalyzer.md) | [![GitHub stars](https://img.shields.io/github/stars/dart-lang/sdk?cacheSeconds=3600)](https://github.com/dart-lang/sdk) | +| | [**GO**](descriptors/go.md) | [**golangci-lint**](descriptors/go_golangci_lint.md)
[_GO_GOLANGCI_LINT_](descriptors/go_golangci_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | +| | [**GO**](descriptors/go.md) | [**revive**](descriptors/go_revive.md)
[_GO_REVIVE_](descriptors/go_revive.md) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**GROOVY**](descriptors/groovy.md) | [**npm-groovy-lint**](descriptors/groovy_npm_groovy_lint.md)
[_GROOVY_NPM_GROOVY_LINT_](descriptors/groovy_npm_groovy_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](descriptors/java.md) | [**checkstyle**](descriptors/java_checkstyle.md)
[_JAVA_CHECKSTYLE_](descriptors/java_checkstyle.md) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](descriptors/java.md) | [**pmd**](descriptors/java_pmd.md)
[_JAVA_PMD_](descriptors/java_pmd.md) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](descriptors/javascript.md) | [**eslint**](descriptors/javascript_eslint.md)
[_JAVASCRIPT_ES_](descriptors/javascript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](descriptors/javascript.md) | [**standard**](descriptors/javascript_standard.md)
[_JAVASCRIPT_STANDARD_](descriptors/javascript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**JAVASCRIPT**](descriptors/javascript.md) | [**prettier**](descriptors/javascript_prettier.md)
[_JAVASCRIPT_PRETTIER_](descriptors/javascript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**JSX**](descriptors/jsx.md) | [**eslint**](descriptors/jsx_eslint.md)
[_JSX_ESLINT_](descriptors/jsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**KOTLIN**](descriptors/kotlin.md) | [**ktlint**](descriptors/kotlin_ktlint.md)
[_KOTLIN_KTLINT_](descriptors/kotlin_ktlint.md) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**LUA**](descriptors/lua.md) | [**luacheck**](descriptors/lua_luacheck.md)
[_LUA_LUACHECK_](descriptors/lua_luacheck.md) | [![GitHub stars](https://img.shields.io/github/stars/luarocks/luacheck?cacheSeconds=3600)](https://github.com/luarocks/luacheck) | +| | [**MAKEFILE**](descriptors/makefile.md) | [**checkmake**](descriptors/makefile_checkmake.md)
[_MAKEFILE_CHECKMAKE_](descriptors/makefile_checkmake.md) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | +| | [**PERL**](descriptors/perl.md) | [**perlcritic**](descriptors/perl_perlcritic.md)
[_PERL_PERLCRITIC_](descriptors/perl_perlcritic.md) | [![GitHub stars](https://img.shields.io/github/stars/Perl-Critic/Perl-Critic?cacheSeconds=3600)](https://github.com/Perl-Critic/Perl-Critic) | +| | [**PHP**](descriptors/php.md) | [**phpcs**](descriptors/php_phpcs.md)
[_PHP_PHPCS_](descriptors/php_phpcs.md) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | +| | [**PHP**](descriptors/php.md) | [**phpstan**](descriptors/php_phpstan.md)
[_PHP_PHPSTAN_](descriptors/php_phpstan.md) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | +| | [**PHP**](descriptors/php.md) | [**psalm**](descriptors/php_psalm.md)
[_PHP_PSALM_](descriptors/php_psalm.md) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**PHP**](descriptors/php.md) | [**phplint**](descriptors/php_phplint.md)
[_PHP_PHPLINT_](descriptors/php_phplint.md) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | +| | [**POWERSHELL**](descriptors/powershell.md) | [**powershell**](descriptors/powershell_powershell.md)
[_POWERSHELL_POWERSHELL_](descriptors/powershell_powershell.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**POWERSHELL**](descriptors/powershell.md) | [**powershell_formatter**](descriptors/powershell_powershell_formatter.md)
[_POWERSHELL_POWERSHELL_FORMATTER_](descriptors/powershell_powershell_formatter.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](descriptors/python.md) | [**pylint**](descriptors/python_pylint.md)
[_PYTHON_PYLINT_](descriptors/python_pylint.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | +| | [**PYTHON**](descriptors/python.md) | [**black**](descriptors/python_black.md)
[_PYTHON_BLACK_](descriptors/python_black.md) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](descriptors/python.md) | [**flake8**](descriptors/python_flake8.md)
[_PYTHON_FLAKE8_](descriptors/python_flake8.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | +| | [**PYTHON**](descriptors/python.md) | [**isort**](descriptors/python_isort.md)
[_PYTHON_ISORT_](descriptors/python_isort.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](descriptors/python.md) | [**bandit**](descriptors/python_bandit.md)
[_PYTHON_BANDIT_](descriptors/python_bandit.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/bandit?cacheSeconds=3600)](https://github.com/PyCQA/bandit) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**PYTHON**](descriptors/python.md) | [**mypy**](descriptors/python_mypy.md)
[_PYTHON_MYPY_](descriptors/python_mypy.md) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | +| | [**PYTHON**](descriptors/python.md) | [**pyright**](descriptors/python_pyright.md)
[_PYTHON_PYRIGHT_](descriptors/python_pyright.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | +| | [**R**](descriptors/r.md) | [**lintr**](descriptors/r_lintr.md)
[_R_LINTR_](descriptors/r_lintr.md) | [![GitHub stars](https://img.shields.io/github/stars/r-lib/lintr?cacheSeconds=3600)](https://github.com/r-lib/lintr) | +| | [**RAKU**](descriptors/raku.md) | [**raku**](descriptors/raku_raku.md)
[_RAKU_RAKU_](descriptors/raku_raku.md) | [![GitHub stars](https://img.shields.io/github/stars/rakudo/rakudo?cacheSeconds=3600)](https://github.com/rakudo/rakudo) | +| | [**RUBY**](descriptors/ruby.md) | [**rubocop**](descriptors/ruby_rubocop.md)
[_RUBY_RUBOCOP_](descriptors/ruby_rubocop.md) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**RUST**](descriptors/rust.md) | [**clippy**](descriptors/rust_clippy.md)
[_RUST_CLIPPY_](descriptors/rust_clippy.md) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | +| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-apex**](descriptors/salesforce_sfdx_scanner_apex.md)
[_SALESFORCE_SFDX_SCANNER_APEX_](descriptors/salesforce_sfdx_scanner_apex.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-aura**](descriptors/salesforce_sfdx_scanner_aura.md)
[_SALESFORCE_SFDX_SCANNER_AURA_](descriptors/salesforce_sfdx_scanner_aura.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-lwc**](descriptors/salesforce_sfdx_scanner_lwc.md)
[_SALESFORCE_SFDX_SCANNER_LWC_](descriptors/salesforce_sfdx_scanner_lwc.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SCALA**](descriptors/scala.md) | [**scalafix**](descriptors/scala_scalafix.md)
[_SCALA_SCALAFIX_](descriptors/scala_scalafix.md) | [![GitHub stars](https://img.shields.io/github/stars/scalacenter/scalafix?cacheSeconds=3600)](https://github.com/scalacenter/scalafix) | +| | [**SQL**](descriptors/sql.md) | [**sql-lint**](descriptors/sql_sql_lint.md)
[_SQL_SQL_LINT_](descriptors/sql_sql_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | +| | [**SQL**](descriptors/sql.md) | [**sqlfluff**](descriptors/sql_sqlfluff.md)
[_SQL_SQLFLUFF_](descriptors/sql_sqlfluff.md) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | +| | [**SQL**](descriptors/sql.md) | [**tsqllint**](descriptors/sql_tsqllint.md)
[_SQL_TSQLLINT_](descriptors/sql_tsqllint.md) | [![GitHub stars](https://img.shields.io/github/stars/tsqllint/tsqllint?cacheSeconds=3600)](https://github.com/tsqllint/tsqllint) | +| | [**SWIFT**](descriptors/swift.md) | [**swiftlint**](descriptors/swift_swiftlint.md)
[_SWIFT_SWIFTLINT_](descriptors/swift_swiftlint.md) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TSX**](descriptors/tsx.md) | [**eslint**](descriptors/tsx_eslint.md)
[_TSX_ESLINT_](descriptors/tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/jsx-eslint/eslint-plugin-react?cacheSeconds=3600)](https://github.com/jsx-eslint/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](descriptors/typescript.md) | [**eslint**](descriptors/typescript_eslint.md)
[_TYPESCRIPT_ES_](descriptors/typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/typescript-eslint/typescript-eslint?cacheSeconds=3600)](https://github.com/typescript-eslint/typescript-eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](descriptors/typescript.md) | [**standard**](descriptors/typescript_standard.md)
[_TYPESCRIPT_STANDARD_](descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TYPESCRIPT**](descriptors/typescript.md) | [**prettier**](descriptors/typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](descriptors/typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**Visual Basic .NET** (VBDOTNET)](descriptors/vbdotnet.md) | [**dotnet-format**](descriptors/vbdotnet_dotnet_format.md)
[_VBDOTNET_DOTNET_FORMAT_](descriptors/vbdotnet_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | ### Formats @@ -218,22 +218,22 @@ All linters are integrated in the [MegaLinter docker image](https://hub.docker.c ### Other -| | Code quality checker | Linter | Additional | -|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**COPYPASTE**](descriptors/copypaste.md) | [**jscpd**](descriptors/copypaste_jscpd.md)
[_COPYPASTE_JSCPD_](descriptors/copypaste_jscpd.md) | [![GitHub stars](https://img.shields.io/github/stars/kucherenko/jscpd?cacheSeconds=3600)](https://github.com/kucherenko/jscpd) | -| | [**REPOSITORY**](descriptors/repository.md) | [**checkov**](descriptors/repository_checkov.md)
[_REPOSITORY_CHECKOV_](descriptors/repository_checkov.md) | [![GitHub stars](https://img.shields.io/github/stars/bridgecrewio/checkov?cacheSeconds=3600)](https://github.com/bridgecrewio/checkov) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**devskim**](descriptors/repository_devskim.md)
[_REPOSITORY_DEVSKIM_](descriptors/repository_devskim.md) | ![downgraded version](https://shields.io/badge/-downgraded%20version-orange) [![GitHub stars](https://img.shields.io/github/stars/microsoft/DevSkim?cacheSeconds=3600)](https://github.com/microsoft/DevSkim) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**dustilock**](descriptors/repository_dustilock.md)
[_REPOSITORY_DUSTILOCK_](descriptors/repository_dustilock.md) | [![GitHub stars](https://img.shields.io/github/stars/Checkmarx/dustilock?cacheSeconds=3600)](https://github.com/Checkmarx/dustilock) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**git_diff**](descriptors/repository_git_diff.md)
[_REPOSITORY_GIT_DIFF_](descriptors/repository_git_diff.md) | [![GitHub stars](https://img.shields.io/github/stars/git/git?cacheSeconds=3600)](https://github.com/git/git) | -| | [**REPOSITORY**](descriptors/repository.md) | [**gitleaks**](descriptors/repository_gitleaks.md)
[_REPOSITORY_GITLEAKS_](descriptors/repository_gitleaks.md) | [![GitHub stars](https://img.shields.io/github/stars/zricethezav/gitleaks?cacheSeconds=3600)](https://github.com/zricethezav/gitleaks) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**goodcheck**](descriptors/repository_goodcheck.md)
[_REPOSITORY_GOODCHECK_](descriptors/repository_goodcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/sider/goodcheck?cacheSeconds=3600)](https://github.com/sider/goodcheck) | -| | [**REPOSITORY**](descriptors/repository.md) | [**secretlint**](descriptors/repository_secretlint.md)
[_REPOSITORY_SECRETLINT_](descriptors/repository_secretlint.md) | [![GitHub stars](https://img.shields.io/github/stars/secretlint/secretlint?cacheSeconds=3600)](https://github.com/secretlint/secretlint) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**semgrep**](descriptors/repository_semgrep.md)
[_REPOSITORY_SEMGREP_](descriptors/repository_semgrep.md) | [![GitHub stars](https://img.shields.io/github/stars/returntocorp/semgrep?cacheSeconds=3600)](https://github.com/returntocorp/semgrep) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**syft**](descriptors/repository_syft.md)
[_REPOSITORY_SYFT_](descriptors/repository_syft.md) | [![GitHub stars](https://img.shields.io/github/stars/anchore/syft?cacheSeconds=3600)](https://github.com/anchore/syft) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**trivy**](descriptors/repository_trivy.md)
[_REPOSITORY_TRIVY_](descriptors/repository_trivy.md) | [![GitHub stars](https://img.shields.io/github/stars/aquasecurity/trivy?cacheSeconds=3600)](https://github.com/aquasecurity/trivy) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**SPELL**](descriptors/spell.md) | [**misspell**](descriptors/spell_misspell.md)
[_SPELL_MISSPELL_](descriptors/spell_misspell.md) | [![GitHub stars](https://img.shields.io/github/stars/client9/misspell?cacheSeconds=3600)](https://github.com/client9/misspell) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**SPELL**](descriptors/spell.md) | [**cspell**](descriptors/spell_cspell.md)
[_SPELL_CSPELL_](descriptors/spell_cspell.md) | [![GitHub stars](https://img.shields.io/github/stars/streetsidesoftware/cspell?cacheSeconds=3600)](https://github.com/streetsidesoftware/cspell) | -| | [**SPELL**](descriptors/spell.md) | [**proselint**](descriptors/spell_proselint.md)
[_SPELL_PROSELINT_](descriptors/spell_proselint.md) | [![GitHub stars](https://img.shields.io/github/stars/amperser/proselint?cacheSeconds=3600)](https://github.com/amperser/proselint) | +| | Code quality checker | Linter | Additional | +|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**COPYPASTE**](descriptors/copypaste.md) | [**jscpd**](descriptors/copypaste_jscpd.md)
[_COPYPASTE_JSCPD_](descriptors/copypaste_jscpd.md) | [![GitHub stars](https://img.shields.io/github/stars/kucherenko/jscpd?cacheSeconds=3600)](https://github.com/kucherenko/jscpd) | +| | [**REPOSITORY**](descriptors/repository.md) | [**checkov**](descriptors/repository_checkov.md)
[_REPOSITORY_CHECKOV_](descriptors/repository_checkov.md) | [![GitHub stars](https://img.shields.io/github/stars/bridgecrewio/checkov?cacheSeconds=3600)](https://github.com/bridgecrewio/checkov) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**devskim**](descriptors/repository_devskim.md)
[_REPOSITORY_DEVSKIM_](descriptors/repository_devskim.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/DevSkim?cacheSeconds=3600)](https://github.com/microsoft/DevSkim) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**dustilock**](descriptors/repository_dustilock.md)
[_REPOSITORY_DUSTILOCK_](descriptors/repository_dustilock.md) | [![GitHub stars](https://img.shields.io/github/stars/Checkmarx/dustilock?cacheSeconds=3600)](https://github.com/Checkmarx/dustilock) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**git_diff**](descriptors/repository_git_diff.md)
[_REPOSITORY_GIT_DIFF_](descriptors/repository_git_diff.md) | [![GitHub stars](https://img.shields.io/github/stars/git/git?cacheSeconds=3600)](https://github.com/git/git) | +| | [**REPOSITORY**](descriptors/repository.md) | [**gitleaks**](descriptors/repository_gitleaks.md)
[_REPOSITORY_GITLEAKS_](descriptors/repository_gitleaks.md) | [![GitHub stars](https://img.shields.io/github/stars/zricethezav/gitleaks?cacheSeconds=3600)](https://github.com/zricethezav/gitleaks) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**goodcheck**](descriptors/repository_goodcheck.md)
[_REPOSITORY_GOODCHECK_](descriptors/repository_goodcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/sider/goodcheck?cacheSeconds=3600)](https://github.com/sider/goodcheck) | +| | [**REPOSITORY**](descriptors/repository.md) | [**secretlint**](descriptors/repository_secretlint.md)
[_REPOSITORY_SECRETLINT_](descriptors/repository_secretlint.md) | [![GitHub stars](https://img.shields.io/github/stars/secretlint/secretlint?cacheSeconds=3600)](https://github.com/secretlint/secretlint) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**semgrep**](descriptors/repository_semgrep.md)
[_REPOSITORY_SEMGREP_](descriptors/repository_semgrep.md) | [![GitHub stars](https://img.shields.io/github/stars/returntocorp/semgrep?cacheSeconds=3600)](https://github.com/returntocorp/semgrep) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**syft**](descriptors/repository_syft.md)
[_REPOSITORY_SYFT_](descriptors/repository_syft.md) | [![GitHub stars](https://img.shields.io/github/stars/anchore/syft?cacheSeconds=3600)](https://github.com/anchore/syft) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**trivy**](descriptors/repository_trivy.md)
[_REPOSITORY_TRIVY_](descriptors/repository_trivy.md) | [![GitHub stars](https://img.shields.io/github/stars/aquasecurity/trivy?cacheSeconds=3600)](https://github.com/aquasecurity/trivy) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**SPELL**](descriptors/spell.md) | [**misspell**](descriptors/spell_misspell.md)
[_SPELL_MISSPELL_](descriptors/spell_misspell.md) | [![GitHub stars](https://img.shields.io/github/stars/client9/misspell?cacheSeconds=3600)](https://github.com/client9/misspell) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**SPELL**](descriptors/spell.md) | [**cspell**](descriptors/spell_cspell.md)
[_SPELL_CSPELL_](descriptors/spell_cspell.md) | [![GitHub stars](https://img.shields.io/github/stars/streetsidesoftware/cspell?cacheSeconds=3600)](https://github.com/streetsidesoftware/cspell) | +| | [**SPELL**](descriptors/spell.md) | [**proselint**](descriptors/spell_proselint.md)
[_SPELL_PROSELINT_](descriptors/spell_proselint.md) | [![GitHub stars](https://img.shields.io/github/stars/amperser/proselint?cacheSeconds=3600)](https://github.com/amperser/proselint) | diff --git a/docs/supported-linters.md b/docs/supported-linters.md index b8db2c666e2..45229a53c9f 100644 --- a/docs/supported-linters.md +++ b/docs/supported-linters.md @@ -14,61 +14,61 @@ All linters are integrated in the [MegaLinter docker image](https://hub.docker.c ## Languages -| | Language | Linter | Additional | -|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**BASH**](descriptors/bash.md) | [**bash-exec**](descriptors/bash_bash_exec.md)
[_BASH_EXEC_](descriptors/bash_bash_exec.md) | | -| | [**BASH**](descriptors/bash.md) | [**shellcheck**](descriptors/bash_shellcheck.md)
[_BASH_SHELLCHECK_](descriptors/bash_shellcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**BASH**](descriptors/bash.md) | [**shfmt**](descriptors/bash_shfmt.md)
[_BASH_SHFMT_](descriptors/bash_shfmt.md) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**C**](descriptors/c.md) | [**cpplint**](descriptors/c_cpplint.md)
[_C_CPPLINT_](descriptors/c_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**CLOJURE**](descriptors/clojure.md) | [**clj-kondo**](descriptors/clojure_clj_kondo.md)
[_CLOJURE_CLJ_KONDO_](descriptors/clojure_clj_kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | -| | [**COFFEE**](descriptors/coffee.md) | [**coffeelint**](descriptors/coffee_coffeelint.md)
[_COFFEE_COFFEELINT_](descriptors/coffee_coffeelint.md) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | -| | [**C++** (CPP)](descriptors/cpp.md) | [**cpplint**](descriptors/cpp_cpplint.md)
[_CPP_CPPLINT_](descriptors/cpp_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**C#** (CSHARP)](descriptors/csharp.md) | [**dotnet-format**](descriptors/csharp_dotnet_format.md)
[_CSHARP_DOTNET_FORMAT_](descriptors/csharp_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**C#** (CSHARP)](descriptors/csharp.md) | [**csharpier**](descriptors/csharp_csharpier.md)
[_CSHARP_CSHARPIER_](descriptors/csharp_csharpier.md) | [![GitHub stars](https://img.shields.io/github/stars/belav/csharpier?cacheSeconds=3600)](https://github.com/belav/csharpier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**DART**](descriptors/dart.md) | [**dartanalyzer**](descriptors/dart_dartanalyzer.md)
[_DART_DARTANALYZER_](descriptors/dart_dartanalyzer.md) | ![downgraded version](https://shields.io/badge/-downgraded%20version-orange) [![GitHub stars](https://img.shields.io/github/stars/dart-lang/sdk?cacheSeconds=3600)](https://github.com/dart-lang/sdk) | -| | [**GO**](descriptors/go.md) | [**golangci-lint**](descriptors/go_golangci_lint.md)
[_GO_GOLANGCI_LINT_](descriptors/go_golangci_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | -| | [**GO**](descriptors/go.md) | [**revive**](descriptors/go_revive.md)
[_GO_REVIVE_](descriptors/go_revive.md) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**GROOVY**](descriptors/groovy.md) | [**npm-groovy-lint**](descriptors/groovy_npm_groovy_lint.md)
[_GROOVY_NPM_GROOVY_LINT_](descriptors/groovy_npm_groovy_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](descriptors/java.md) | [**checkstyle**](descriptors/java_checkstyle.md)
[_JAVA_CHECKSTYLE_](descriptors/java_checkstyle.md) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](descriptors/java.md) | [**pmd**](descriptors/java_pmd.md)
[_JAVA_PMD_](descriptors/java_pmd.md) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](descriptors/javascript.md) | [**eslint**](descriptors/javascript_eslint.md)
[_JAVASCRIPT_ES_](descriptors/javascript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](descriptors/javascript.md) | [**standard**](descriptors/javascript_standard.md)
[_JAVASCRIPT_STANDARD_](descriptors/javascript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**JAVASCRIPT**](descriptors/javascript.md) | [**prettier**](descriptors/javascript_prettier.md)
[_JAVASCRIPT_PRETTIER_](descriptors/javascript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**JSX**](descriptors/jsx.md) | [**eslint**](descriptors/jsx_eslint.md)
[_JSX_ESLINT_](descriptors/jsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**KOTLIN**](descriptors/kotlin.md) | [**ktlint**](descriptors/kotlin_ktlint.md)
[_KOTLIN_KTLINT_](descriptors/kotlin_ktlint.md) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**LUA**](descriptors/lua.md) | [**luacheck**](descriptors/lua_luacheck.md)
[_LUA_LUACHECK_](descriptors/lua_luacheck.md) | [![GitHub stars](https://img.shields.io/github/stars/luarocks/luacheck?cacheSeconds=3600)](https://github.com/luarocks/luacheck) | -| | [**MAKEFILE**](descriptors/makefile.md) | [**checkmake**](descriptors/makefile_checkmake.md)
[_MAKEFILE_CHECKMAKE_](descriptors/makefile_checkmake.md) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | -| | [**PERL**](descriptors/perl.md) | [**perlcritic**](descriptors/perl_perlcritic.md)
[_PERL_PERLCRITIC_](descriptors/perl_perlcritic.md) | [![GitHub stars](https://img.shields.io/github/stars/Perl-Critic/Perl-Critic?cacheSeconds=3600)](https://github.com/Perl-Critic/Perl-Critic) | -| | [**PHP**](descriptors/php.md) | [**phpcs**](descriptors/php_phpcs.md)
[_PHP_PHPCS_](descriptors/php_phpcs.md) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | -| | [**PHP**](descriptors/php.md) | [**phpstan**](descriptors/php_phpstan.md)
[_PHP_PHPSTAN_](descriptors/php_phpstan.md) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | -| | [**PHP**](descriptors/php.md) | [**psalm**](descriptors/php_psalm.md)
[_PHP_PSALM_](descriptors/php_psalm.md) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**PHP**](descriptors/php.md) | [**phplint**](descriptors/php_phplint.md)
[_PHP_PHPLINT_](descriptors/php_phplint.md) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | -| | [**POWERSHELL**](descriptors/powershell.md) | [**powershell**](descriptors/powershell_powershell.md)
[_POWERSHELL_POWERSHELL_](descriptors/powershell_powershell.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**POWERSHELL**](descriptors/powershell.md) | [**powershell_formatter**](descriptors/powershell_powershell_formatter.md)
[_POWERSHELL_POWERSHELL_FORMATTER_](descriptors/powershell_powershell_formatter.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](descriptors/python.md) | [**pylint**](descriptors/python_pylint.md)
[_PYTHON_PYLINT_](descriptors/python_pylint.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | -| | [**PYTHON**](descriptors/python.md) | [**black**](descriptors/python_black.md)
[_PYTHON_BLACK_](descriptors/python_black.md) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](descriptors/python.md) | [**flake8**](descriptors/python_flake8.md)
[_PYTHON_FLAKE8_](descriptors/python_flake8.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | -| | [**PYTHON**](descriptors/python.md) | [**isort**](descriptors/python_isort.md)
[_PYTHON_ISORT_](descriptors/python_isort.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](descriptors/python.md) | [**bandit**](descriptors/python_bandit.md)
[_PYTHON_BANDIT_](descriptors/python_bandit.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/bandit?cacheSeconds=3600)](https://github.com/PyCQA/bandit) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**PYTHON**](descriptors/python.md) | [**mypy**](descriptors/python_mypy.md)
[_PYTHON_MYPY_](descriptors/python_mypy.md) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | -| | [**PYTHON**](descriptors/python.md) | [**pyright**](descriptors/python_pyright.md)
[_PYTHON_PYRIGHT_](descriptors/python_pyright.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | -| | [**R**](descriptors/r.md) | [**lintr**](descriptors/r_lintr.md)
[_R_LINTR_](descriptors/r_lintr.md) | [![GitHub stars](https://img.shields.io/github/stars/r-lib/lintr?cacheSeconds=3600)](https://github.com/r-lib/lintr) | -| | [**RAKU**](descriptors/raku.md) | [**raku**](descriptors/raku_raku.md)
[_RAKU_RAKU_](descriptors/raku_raku.md) | [![GitHub stars](https://img.shields.io/github/stars/rakudo/rakudo?cacheSeconds=3600)](https://github.com/rakudo/rakudo) | -| | [**RUBY**](descriptors/ruby.md) | [**rubocop**](descriptors/ruby_rubocop.md)
[_RUBY_RUBOCOP_](descriptors/ruby_rubocop.md) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**RUST**](descriptors/rust.md) | [**clippy**](descriptors/rust_clippy.md)
[_RUST_CLIPPY_](descriptors/rust_clippy.md) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | -| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-apex**](descriptors/salesforce_sfdx_scanner_apex.md)
[_SALESFORCE_SFDX_SCANNER_APEX_](descriptors/salesforce_sfdx_scanner_apex.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-aura**](descriptors/salesforce_sfdx_scanner_aura.md)
[_SALESFORCE_SFDX_SCANNER_AURA_](descriptors/salesforce_sfdx_scanner_aura.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-lwc**](descriptors/salesforce_sfdx_scanner_lwc.md)
[_SALESFORCE_SFDX_SCANNER_LWC_](descriptors/salesforce_sfdx_scanner_lwc.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SCALA**](descriptors/scala.md) | [**scalafix**](descriptors/scala_scalafix.md)
[_SCALA_SCALAFIX_](descriptors/scala_scalafix.md) | [![GitHub stars](https://img.shields.io/github/stars/scalacenter/scalafix?cacheSeconds=3600)](https://github.com/scalacenter/scalafix) | -| | [**SQL**](descriptors/sql.md) | [**sql-lint**](descriptors/sql_sql_lint.md)
[_SQL_SQL_LINT_](descriptors/sql_sql_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | -| | [**SQL**](descriptors/sql.md) | [**sqlfluff**](descriptors/sql_sqlfluff.md)
[_SQL_SQLFLUFF_](descriptors/sql_sqlfluff.md) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | -| | [**SQL**](descriptors/sql.md) | [**tsqllint**](descriptors/sql_tsqllint.md)
[_SQL_TSQLLINT_](descriptors/sql_tsqllint.md) | [![GitHub stars](https://img.shields.io/github/stars/tsqllint/tsqllint?cacheSeconds=3600)](https://github.com/tsqllint/tsqllint) | -| | [**SWIFT**](descriptors/swift.md) | [**swiftlint**](descriptors/swift_swiftlint.md)
[_SWIFT_SWIFTLINT_](descriptors/swift_swiftlint.md) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TSX**](descriptors/tsx.md) | [**eslint**](descriptors/tsx_eslint.md)
[_TSX_ESLINT_](descriptors/tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](descriptors/typescript.md) | [**eslint**](descriptors/typescript_eslint.md)
[_TYPESCRIPT_ES_](descriptors/typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](descriptors/typescript.md) | [**standard**](descriptors/typescript_standard.md)
[_TYPESCRIPT_STANDARD_](descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TYPESCRIPT**](descriptors/typescript.md) | [**prettier**](descriptors/typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](descriptors/typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**Visual Basic .NET** (VBDOTNET)](descriptors/vbdotnet.md) | [**dotnet-format**](descriptors/vbdotnet_dotnet_format.md)
[_VBDOTNET_DOTNET_FORMAT_](descriptors/vbdotnet_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | +| | Language | Linter | Additional | +|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**BASH**](descriptors/bash.md) | [**bash-exec**](descriptors/bash_bash_exec.md)
[_BASH_EXEC_](descriptors/bash_bash_exec.md) | | +| | [**BASH**](descriptors/bash.md) | [**shellcheck**](descriptors/bash_shellcheck.md)
[_BASH_SHELLCHECK_](descriptors/bash_shellcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**BASH**](descriptors/bash.md) | [**shfmt**](descriptors/bash_shfmt.md)
[_BASH_SHFMT_](descriptors/bash_shfmt.md) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**C**](descriptors/c.md) | [**cpplint**](descriptors/c_cpplint.md)
[_C_CPPLINT_](descriptors/c_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**CLOJURE**](descriptors/clojure.md) | [**clj-kondo**](descriptors/clojure_clj_kondo.md)
[_CLOJURE_CLJ_KONDO_](descriptors/clojure_clj_kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | +| | [**COFFEE**](descriptors/coffee.md) | [**coffeelint**](descriptors/coffee_coffeelint.md)
[_COFFEE_COFFEELINT_](descriptors/coffee_coffeelint.md) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | +| | [**C++** (CPP)](descriptors/cpp.md) | [**cpplint**](descriptors/cpp_cpplint.md)
[_CPP_CPPLINT_](descriptors/cpp_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**C#** (CSHARP)](descriptors/csharp.md) | [**dotnet-format**](descriptors/csharp_dotnet_format.md)
[_CSHARP_DOTNET_FORMAT_](descriptors/csharp_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**C#** (CSHARP)](descriptors/csharp.md) | [**csharpier**](descriptors/csharp_csharpier.md)
[_CSHARP_CSHARPIER_](descriptors/csharp_csharpier.md) | [![GitHub stars](https://img.shields.io/github/stars/belav/csharpier?cacheSeconds=3600)](https://github.com/belav/csharpier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**DART**](descriptors/dart.md) | [**dartanalyzer**](descriptors/dart_dartanalyzer.md)
[_DART_DARTANALYZER_](descriptors/dart_dartanalyzer.md) | [![GitHub stars](https://img.shields.io/github/stars/dart-lang/sdk?cacheSeconds=3600)](https://github.com/dart-lang/sdk) | +| | [**GO**](descriptors/go.md) | [**golangci-lint**](descriptors/go_golangci_lint.md)
[_GO_GOLANGCI_LINT_](descriptors/go_golangci_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | +| | [**GO**](descriptors/go.md) | [**revive**](descriptors/go_revive.md)
[_GO_REVIVE_](descriptors/go_revive.md) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**GROOVY**](descriptors/groovy.md) | [**npm-groovy-lint**](descriptors/groovy_npm_groovy_lint.md)
[_GROOVY_NPM_GROOVY_LINT_](descriptors/groovy_npm_groovy_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](descriptors/java.md) | [**checkstyle**](descriptors/java_checkstyle.md)
[_JAVA_CHECKSTYLE_](descriptors/java_checkstyle.md) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](descriptors/java.md) | [**pmd**](descriptors/java_pmd.md)
[_JAVA_PMD_](descriptors/java_pmd.md) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](descriptors/javascript.md) | [**eslint**](descriptors/javascript_eslint.md)
[_JAVASCRIPT_ES_](descriptors/javascript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](descriptors/javascript.md) | [**standard**](descriptors/javascript_standard.md)
[_JAVASCRIPT_STANDARD_](descriptors/javascript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**JAVASCRIPT**](descriptors/javascript.md) | [**prettier**](descriptors/javascript_prettier.md)
[_JAVASCRIPT_PRETTIER_](descriptors/javascript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**JSX**](descriptors/jsx.md) | [**eslint**](descriptors/jsx_eslint.md)
[_JSX_ESLINT_](descriptors/jsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**KOTLIN**](descriptors/kotlin.md) | [**ktlint**](descriptors/kotlin_ktlint.md)
[_KOTLIN_KTLINT_](descriptors/kotlin_ktlint.md) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**LUA**](descriptors/lua.md) | [**luacheck**](descriptors/lua_luacheck.md)
[_LUA_LUACHECK_](descriptors/lua_luacheck.md) | [![GitHub stars](https://img.shields.io/github/stars/luarocks/luacheck?cacheSeconds=3600)](https://github.com/luarocks/luacheck) | +| | [**MAKEFILE**](descriptors/makefile.md) | [**checkmake**](descriptors/makefile_checkmake.md)
[_MAKEFILE_CHECKMAKE_](descriptors/makefile_checkmake.md) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | +| | [**PERL**](descriptors/perl.md) | [**perlcritic**](descriptors/perl_perlcritic.md)
[_PERL_PERLCRITIC_](descriptors/perl_perlcritic.md) | [![GitHub stars](https://img.shields.io/github/stars/Perl-Critic/Perl-Critic?cacheSeconds=3600)](https://github.com/Perl-Critic/Perl-Critic) | +| | [**PHP**](descriptors/php.md) | [**phpcs**](descriptors/php_phpcs.md)
[_PHP_PHPCS_](descriptors/php_phpcs.md) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | +| | [**PHP**](descriptors/php.md) | [**phpstan**](descriptors/php_phpstan.md)
[_PHP_PHPSTAN_](descriptors/php_phpstan.md) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | +| | [**PHP**](descriptors/php.md) | [**psalm**](descriptors/php_psalm.md)
[_PHP_PSALM_](descriptors/php_psalm.md) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**PHP**](descriptors/php.md) | [**phplint**](descriptors/php_phplint.md)
[_PHP_PHPLINT_](descriptors/php_phplint.md) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | +| | [**POWERSHELL**](descriptors/powershell.md) | [**powershell**](descriptors/powershell_powershell.md)
[_POWERSHELL_POWERSHELL_](descriptors/powershell_powershell.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**POWERSHELL**](descriptors/powershell.md) | [**powershell_formatter**](descriptors/powershell_powershell_formatter.md)
[_POWERSHELL_POWERSHELL_FORMATTER_](descriptors/powershell_powershell_formatter.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](descriptors/python.md) | [**pylint**](descriptors/python_pylint.md)
[_PYTHON_PYLINT_](descriptors/python_pylint.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | +| | [**PYTHON**](descriptors/python.md) | [**black**](descriptors/python_black.md)
[_PYTHON_BLACK_](descriptors/python_black.md) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](descriptors/python.md) | [**flake8**](descriptors/python_flake8.md)
[_PYTHON_FLAKE8_](descriptors/python_flake8.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | +| | [**PYTHON**](descriptors/python.md) | [**isort**](descriptors/python_isort.md)
[_PYTHON_ISORT_](descriptors/python_isort.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](descriptors/python.md) | [**bandit**](descriptors/python_bandit.md)
[_PYTHON_BANDIT_](descriptors/python_bandit.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/bandit?cacheSeconds=3600)](https://github.com/PyCQA/bandit) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**PYTHON**](descriptors/python.md) | [**mypy**](descriptors/python_mypy.md)
[_PYTHON_MYPY_](descriptors/python_mypy.md) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | +| | [**PYTHON**](descriptors/python.md) | [**pyright**](descriptors/python_pyright.md)
[_PYTHON_PYRIGHT_](descriptors/python_pyright.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | +| | [**R**](descriptors/r.md) | [**lintr**](descriptors/r_lintr.md)
[_R_LINTR_](descriptors/r_lintr.md) | [![GitHub stars](https://img.shields.io/github/stars/r-lib/lintr?cacheSeconds=3600)](https://github.com/r-lib/lintr) | +| | [**RAKU**](descriptors/raku.md) | [**raku**](descriptors/raku_raku.md)
[_RAKU_RAKU_](descriptors/raku_raku.md) | [![GitHub stars](https://img.shields.io/github/stars/rakudo/rakudo?cacheSeconds=3600)](https://github.com/rakudo/rakudo) | +| | [**RUBY**](descriptors/ruby.md) | [**rubocop**](descriptors/ruby_rubocop.md)
[_RUBY_RUBOCOP_](descriptors/ruby_rubocop.md) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**RUST**](descriptors/rust.md) | [**clippy**](descriptors/rust_clippy.md)
[_RUST_CLIPPY_](descriptors/rust_clippy.md) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | +| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-apex**](descriptors/salesforce_sfdx_scanner_apex.md)
[_SALESFORCE_SFDX_SCANNER_APEX_](descriptors/salesforce_sfdx_scanner_apex.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-aura**](descriptors/salesforce_sfdx_scanner_aura.md)
[_SALESFORCE_SFDX_SCANNER_AURA_](descriptors/salesforce_sfdx_scanner_aura.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SALESFORCE**](descriptors/salesforce.md) | [**sfdx-scanner-lwc**](descriptors/salesforce_sfdx_scanner_lwc.md)
[_SALESFORCE_SFDX_SCANNER_LWC_](descriptors/salesforce_sfdx_scanner_lwc.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SCALA**](descriptors/scala.md) | [**scalafix**](descriptors/scala_scalafix.md)
[_SCALA_SCALAFIX_](descriptors/scala_scalafix.md) | [![GitHub stars](https://img.shields.io/github/stars/scalacenter/scalafix?cacheSeconds=3600)](https://github.com/scalacenter/scalafix) | +| | [**SQL**](descriptors/sql.md) | [**sql-lint**](descriptors/sql_sql_lint.md)
[_SQL_SQL_LINT_](descriptors/sql_sql_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | +| | [**SQL**](descriptors/sql.md) | [**sqlfluff**](descriptors/sql_sqlfluff.md)
[_SQL_SQLFLUFF_](descriptors/sql_sqlfluff.md) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | +| | [**SQL**](descriptors/sql.md) | [**tsqllint**](descriptors/sql_tsqllint.md)
[_SQL_TSQLLINT_](descriptors/sql_tsqllint.md) | [![GitHub stars](https://img.shields.io/github/stars/tsqllint/tsqllint?cacheSeconds=3600)](https://github.com/tsqllint/tsqllint) | +| | [**SWIFT**](descriptors/swift.md) | [**swiftlint**](descriptors/swift_swiftlint.md)
[_SWIFT_SWIFTLINT_](descriptors/swift_swiftlint.md) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TSX**](descriptors/tsx.md) | [**eslint**](descriptors/tsx_eslint.md)
[_TSX_ESLINT_](descriptors/tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/jsx-eslint/eslint-plugin-react?cacheSeconds=3600)](https://github.com/jsx-eslint/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](descriptors/typescript.md) | [**eslint**](descriptors/typescript_eslint.md)
[_TYPESCRIPT_ES_](descriptors/typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/typescript-eslint/typescript-eslint?cacheSeconds=3600)](https://github.com/typescript-eslint/typescript-eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](descriptors/typescript.md) | [**standard**](descriptors/typescript_standard.md)
[_TYPESCRIPT_STANDARD_](descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TYPESCRIPT**](descriptors/typescript.md) | [**prettier**](descriptors/typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](descriptors/typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**Visual Basic .NET** (VBDOTNET)](descriptors/vbdotnet.md) | [**dotnet-format**](descriptors/vbdotnet_dotnet_format.md)
[_VBDOTNET_DOTNET_FORMAT_](descriptors/vbdotnet_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | ## Formats @@ -127,22 +127,22 @@ All linters are integrated in the [MegaLinter docker image](https://hub.docker.c ## Other -| | Code quality checker | Linter | Additional | -|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**COPYPASTE**](descriptors/copypaste.md) | [**jscpd**](descriptors/copypaste_jscpd.md)
[_COPYPASTE_JSCPD_](descriptors/copypaste_jscpd.md) | [![GitHub stars](https://img.shields.io/github/stars/kucherenko/jscpd?cacheSeconds=3600)](https://github.com/kucherenko/jscpd) | -| | [**REPOSITORY**](descriptors/repository.md) | [**checkov**](descriptors/repository_checkov.md)
[_REPOSITORY_CHECKOV_](descriptors/repository_checkov.md) | [![GitHub stars](https://img.shields.io/github/stars/bridgecrewio/checkov?cacheSeconds=3600)](https://github.com/bridgecrewio/checkov) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**devskim**](descriptors/repository_devskim.md)
[_REPOSITORY_DEVSKIM_](descriptors/repository_devskim.md) | ![downgraded version](https://shields.io/badge/-downgraded%20version-orange) [![GitHub stars](https://img.shields.io/github/stars/microsoft/DevSkim?cacheSeconds=3600)](https://github.com/microsoft/DevSkim) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**dustilock**](descriptors/repository_dustilock.md)
[_REPOSITORY_DUSTILOCK_](descriptors/repository_dustilock.md) | [![GitHub stars](https://img.shields.io/github/stars/Checkmarx/dustilock?cacheSeconds=3600)](https://github.com/Checkmarx/dustilock) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**git_diff**](descriptors/repository_git_diff.md)
[_REPOSITORY_GIT_DIFF_](descriptors/repository_git_diff.md) | [![GitHub stars](https://img.shields.io/github/stars/git/git?cacheSeconds=3600)](https://github.com/git/git) | -| | [**REPOSITORY**](descriptors/repository.md) | [**gitleaks**](descriptors/repository_gitleaks.md)
[_REPOSITORY_GITLEAKS_](descriptors/repository_gitleaks.md) | [![GitHub stars](https://img.shields.io/github/stars/zricethezav/gitleaks?cacheSeconds=3600)](https://github.com/zricethezav/gitleaks) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**goodcheck**](descriptors/repository_goodcheck.md)
[_REPOSITORY_GOODCHECK_](descriptors/repository_goodcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/sider/goodcheck?cacheSeconds=3600)](https://github.com/sider/goodcheck) | -| | [**REPOSITORY**](descriptors/repository.md) | [**secretlint**](descriptors/repository_secretlint.md)
[_REPOSITORY_SECRETLINT_](descriptors/repository_secretlint.md) | [![GitHub stars](https://img.shields.io/github/stars/secretlint/secretlint?cacheSeconds=3600)](https://github.com/secretlint/secretlint) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**semgrep**](descriptors/repository_semgrep.md)
[_REPOSITORY_SEMGREP_](descriptors/repository_semgrep.md) | [![GitHub stars](https://img.shields.io/github/stars/returntocorp/semgrep?cacheSeconds=3600)](https://github.com/returntocorp/semgrep) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**syft**](descriptors/repository_syft.md)
[_REPOSITORY_SYFT_](descriptors/repository_syft.md) | [![GitHub stars](https://img.shields.io/github/stars/anchore/syft?cacheSeconds=3600)](https://github.com/anchore/syft) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](descriptors/repository.md) | [**trivy**](descriptors/repository_trivy.md)
[_REPOSITORY_TRIVY_](descriptors/repository_trivy.md) | [![GitHub stars](https://img.shields.io/github/stars/aquasecurity/trivy?cacheSeconds=3600)](https://github.com/aquasecurity/trivy) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**SPELL**](descriptors/spell.md) | [**misspell**](descriptors/spell_misspell.md)
[_SPELL_MISSPELL_](descriptors/spell_misspell.md) | [![GitHub stars](https://img.shields.io/github/stars/client9/misspell?cacheSeconds=3600)](https://github.com/client9/misspell) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**SPELL**](descriptors/spell.md) | [**cspell**](descriptors/spell_cspell.md)
[_SPELL_CSPELL_](descriptors/spell_cspell.md) | [![GitHub stars](https://img.shields.io/github/stars/streetsidesoftware/cspell?cacheSeconds=3600)](https://github.com/streetsidesoftware/cspell) | -| | [**SPELL**](descriptors/spell.md) | [**proselint**](descriptors/spell_proselint.md)
[_SPELL_PROSELINT_](descriptors/spell_proselint.md) | [![GitHub stars](https://img.shields.io/github/stars/amperser/proselint?cacheSeconds=3600)](https://github.com/amperser/proselint) | +| | Code quality checker | Linter | Additional | +|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**COPYPASTE**](descriptors/copypaste.md) | [**jscpd**](descriptors/copypaste_jscpd.md)
[_COPYPASTE_JSCPD_](descriptors/copypaste_jscpd.md) | [![GitHub stars](https://img.shields.io/github/stars/kucherenko/jscpd?cacheSeconds=3600)](https://github.com/kucherenko/jscpd) | +| | [**REPOSITORY**](descriptors/repository.md) | [**checkov**](descriptors/repository_checkov.md)
[_REPOSITORY_CHECKOV_](descriptors/repository_checkov.md) | [![GitHub stars](https://img.shields.io/github/stars/bridgecrewio/checkov?cacheSeconds=3600)](https://github.com/bridgecrewio/checkov) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**devskim**](descriptors/repository_devskim.md)
[_REPOSITORY_DEVSKIM_](descriptors/repository_devskim.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/DevSkim?cacheSeconds=3600)](https://github.com/microsoft/DevSkim) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**dustilock**](descriptors/repository_dustilock.md)
[_REPOSITORY_DUSTILOCK_](descriptors/repository_dustilock.md) | [![GitHub stars](https://img.shields.io/github/stars/Checkmarx/dustilock?cacheSeconds=3600)](https://github.com/Checkmarx/dustilock) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**git_diff**](descriptors/repository_git_diff.md)
[_REPOSITORY_GIT_DIFF_](descriptors/repository_git_diff.md) | [![GitHub stars](https://img.shields.io/github/stars/git/git?cacheSeconds=3600)](https://github.com/git/git) | +| | [**REPOSITORY**](descriptors/repository.md) | [**gitleaks**](descriptors/repository_gitleaks.md)
[_REPOSITORY_GITLEAKS_](descriptors/repository_gitleaks.md) | [![GitHub stars](https://img.shields.io/github/stars/zricethezav/gitleaks?cacheSeconds=3600)](https://github.com/zricethezav/gitleaks) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**goodcheck**](descriptors/repository_goodcheck.md)
[_REPOSITORY_GOODCHECK_](descriptors/repository_goodcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/sider/goodcheck?cacheSeconds=3600)](https://github.com/sider/goodcheck) | +| | [**REPOSITORY**](descriptors/repository.md) | [**secretlint**](descriptors/repository_secretlint.md)
[_REPOSITORY_SECRETLINT_](descriptors/repository_secretlint.md) | [![GitHub stars](https://img.shields.io/github/stars/secretlint/secretlint?cacheSeconds=3600)](https://github.com/secretlint/secretlint) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**semgrep**](descriptors/repository_semgrep.md)
[_REPOSITORY_SEMGREP_](descriptors/repository_semgrep.md) | [![GitHub stars](https://img.shields.io/github/stars/returntocorp/semgrep?cacheSeconds=3600)](https://github.com/returntocorp/semgrep) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**syft**](descriptors/repository_syft.md)
[_REPOSITORY_SYFT_](descriptors/repository_syft.md) | [![GitHub stars](https://img.shields.io/github/stars/anchore/syft?cacheSeconds=3600)](https://github.com/anchore/syft) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](descriptors/repository.md) | [**trivy**](descriptors/repository_trivy.md)
[_REPOSITORY_TRIVY_](descriptors/repository_trivy.md) | [![GitHub stars](https://img.shields.io/github/stars/aquasecurity/trivy?cacheSeconds=3600)](https://github.com/aquasecurity/trivy) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**SPELL**](descriptors/spell.md) | [**misspell**](descriptors/spell_misspell.md)
[_SPELL_MISSPELL_](descriptors/spell_misspell.md) | [![GitHub stars](https://img.shields.io/github/stars/client9/misspell?cacheSeconds=3600)](https://github.com/client9/misspell) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**SPELL**](descriptors/spell.md) | [**cspell**](descriptors/spell_cspell.md)
[_SPELL_CSPELL_](descriptors/spell_cspell.md) | [![GitHub stars](https://img.shields.io/github/stars/streetsidesoftware/cspell?cacheSeconds=3600)](https://github.com/streetsidesoftware/cspell) | +| | [**SPELL**](descriptors/spell.md) | [**proselint**](descriptors/spell_proselint.md)
[_SPELL_PROSELINT_](descriptors/spell_proselint.md) | [![GitHub stars](https://img.shields.io/github/stars/amperser/proselint?cacheSeconds=3600)](https://github.com/amperser/proselint) | diff --git a/linters/action_actionlint/Dockerfile b/linters/action_actionlint/Dockerfile index 58f9cdd96d1..65e788fb066 100644 --- a/linters/action_actionlint/Dockerfile +++ b/linters/action_actionlint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/arm_arm_ttk/Dockerfile b/linters/arm_arm_ttk/Dockerfile index 613cb15f243..8bd85da78b4 100644 --- a/linters/arm_arm_ttk/Dockerfile +++ b/linters/arm_arm_ttk/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/bash_exec/Dockerfile b/linters/bash_exec/Dockerfile index 125bc88394a..6660ff5dbf5 100644 --- a/linters/bash_exec/Dockerfile +++ b/linters/bash_exec/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/bash_shfmt/Dockerfile b/linters/bash_shfmt/Dockerfile index 1e86d709e5f..d1365f3e93c 100644 --- a/linters/bash_shfmt/Dockerfile +++ b/linters/bash_shfmt/Dockerfile @@ -17,7 +17,7 @@ FROM mvdan/shfmt:latest-alpine as shfmt # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -47,7 +47,6 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ && git config --global core.autocrlf true #APK__END diff --git a/linters/bicep_bicep_linter/Dockerfile b/linters/bicep_bicep_linter/Dockerfile index 8fdaa2a50ee..7b6ed93035d 100644 --- a/linters/bicep_bicep_linter/Dockerfile +++ b/linters/bicep_bicep_linter/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/c_cpplint/Dockerfile b/linters/c_cpplint/Dockerfile index f436435ba21..600c89618bf 100644 --- a/linters/c_cpplint/Dockerfile +++ b/linters/c_cpplint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/clojure_clj_kondo/Dockerfile b/linters/clojure_clj_kondo/Dockerfile index 931a4da8a33..fc354968ef8 100644 --- a/linters/clojure_clj_kondo/Dockerfile +++ b/linters/clojure_clj_kondo/Dockerfile @@ -10,14 +10,14 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM cljkondo/clj-kondo:2023.01.12-alpine as clj-kondo +FROM cljkondo/clj-kondo:2023.01.20-alpine as clj-kondo #FROM__END ################## # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/coffee_coffeelint/Dockerfile b/linters/coffee_coffeelint/Dockerfile index 995050e929a..6bfb2cce27c 100644 --- a/linters/coffee_coffeelint/Dockerfile +++ b/linters/coffee_coffeelint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/copypaste_jscpd/Dockerfile b/linters/copypaste_jscpd/Dockerfile index 7db1ab65509..de14fd29263 100644 --- a/linters/copypaste_jscpd/Dockerfile +++ b/linters/copypaste_jscpd/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/cpp_cpplint/Dockerfile b/linters/cpp_cpplint/Dockerfile index bb2e52bd858..978611245e5 100644 --- a/linters/cpp_cpplint/Dockerfile +++ b/linters/cpp_cpplint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/csharp_csharpier/Dockerfile b/linters/csharp_csharpier/Dockerfile index 92a2879958c..0a4ef6d64e9 100644 --- a/linters/csharp_csharpier/Dockerfile +++ b/linters/csharp_csharpier/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/csharp_dotnet_format/Dockerfile b/linters/csharp_dotnet_format/Dockerfile index 7e16c259315..59c6255e7bf 100644 --- a/linters/csharp_dotnet_format/Dockerfile +++ b/linters/csharp_dotnet_format/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -136,9 +136,6 @@ RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" -# dotnet-format installation -RUN /usr/share/dotnet/dotnet tool install -g dotnet-format - #OTHER__END ################################ diff --git a/linters/css_scss_lint/Dockerfile b/linters/css_scss_lint/Dockerfile index 935e24fe481..26b7c5315d8 100644 --- a/linters/css_scss_lint/Dockerfile +++ b/linters/css_scss_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/css_stylelint/Dockerfile b/linters/css_stylelint/Dockerfile index 166b0392aee..90596179cec 100644 --- a/linters/css_stylelint/Dockerfile +++ b/linters/css_stylelint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/dart_dartanalyzer/Dockerfile b/linters/dart_dartanalyzer/Dockerfile index 8d9a40df26d..5cebe9340db 100644 --- a/linters/dart_dartanalyzer/Dockerfile +++ b/linters/dart_dartanalyzer/Dockerfile @@ -17,14 +17,14 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START ARG DART_VERSION='2.8.4' -ARG GLIBC_VERSION='2.31-r0' +ARG GLIBC_VERSION='2.34-r0' #ARG__END #################### @@ -125,7 +125,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ # dartanalyzer installation RUN wget --tries=50 -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ && wget --tries=5 -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk \ - && apk add --no-cache glibc-${GLIBC_VERSION}.apk && rm glibc-${GLIBC_VERSION}.apk \ + && apk add --force-overwrite --no-cache glibc-${GLIBC_VERSION}.apk && rm glibc-${GLIBC_VERSION}.apk \ && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip -O - -q | unzip -q - \ && chmod +x dart-sdk/bin/dart* \ && mv dart-sdk/bin/* /usr/bin/ && mv dart-sdk/lib/* /usr/lib/ && mv dart-sdk/include/* /usr/include/ \ diff --git a/linters/editorconfig_editorconfig_checker/Dockerfile b/linters/editorconfig_editorconfig_checker/Dockerfile index 9a4beeeb0ed..ef4192dbd41 100644 --- a/linters/editorconfig_editorconfig_checker/Dockerfile +++ b/linters/editorconfig_editorconfig_checker/Dockerfile @@ -17,7 +17,7 @@ FROM mstruebing/editorconfig-checker:2.4.0 as editorconfig-checker # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/env_dotenv_linter/Dockerfile b/linters/env_dotenv_linter/Dockerfile index 393dd28d281..aaf23e6aaf0 100644 --- a/linters/env_dotenv_linter/Dockerfile +++ b/linters/env_dotenv_linter/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/gherkin_gherkin_lint/Dockerfile b/linters/gherkin_gherkin_lint/Dockerfile index 8ce6bcf41c7..b9d83b7b439 100644 --- a/linters/gherkin_gherkin_lint/Dockerfile +++ b/linters/gherkin_gherkin_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/go_golangci_lint/Dockerfile b/linters/go_golangci_lint/Dockerfile index b350e54e6c2..23605f526e4 100644 --- a/linters/go_golangci_lint/Dockerfile +++ b/linters/go_golangci_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/graphql_graphql_schema_linter/Dockerfile b/linters/graphql_graphql_schema_linter/Dockerfile index 9e1ba155705..174405917b7 100644 --- a/linters/graphql_graphql_schema_linter/Dockerfile +++ b/linters/graphql_graphql_schema_linter/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/html_djlint/Dockerfile b/linters/html_djlint/Dockerfile index e059b2cc02d..407e47ff8d2 100644 --- a/linters/html_djlint/Dockerfile +++ b/linters/html_djlint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/html_htmlhint/Dockerfile b/linters/html_htmlhint/Dockerfile index 29904cc4100..c7d3faf20a9 100644 --- a/linters/html_htmlhint/Dockerfile +++ b/linters/html_htmlhint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/javascript_prettier/Dockerfile b/linters/javascript_prettier/Dockerfile index eabbbad67b7..eedd92b27ce 100644 --- a/linters/javascript_prettier/Dockerfile +++ b/linters/javascript_prettier/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/javascript_standard/Dockerfile b/linters/javascript_standard/Dockerfile index 45d91e07bfb..6955d171d20 100644 --- a/linters/javascript_standard/Dockerfile +++ b/linters/javascript_standard/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/json_jsonlint/Dockerfile b/linters/json_jsonlint/Dockerfile index 863683b4f81..9400b05ac9a 100644 --- a/linters/json_jsonlint/Dockerfile +++ b/linters/json_jsonlint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/json_npm_package_json_lint/Dockerfile b/linters/json_npm_package_json_lint/Dockerfile index 4f7db9187db..550656ed8c7 100644 --- a/linters/json_npm_package_json_lint/Dockerfile +++ b/linters/json_npm_package_json_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/json_prettier/Dockerfile b/linters/json_prettier/Dockerfile index 5ad3602dbab..03d81dcfbcb 100644 --- a/linters/json_prettier/Dockerfile +++ b/linters/json_prettier/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/json_v8r/Dockerfile b/linters/json_v8r/Dockerfile index f76c3ea3d6d..78d7083f550 100644 --- a/linters/json_v8r/Dockerfile +++ b/linters/json_v8r/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/kubernetes_kubeconform/Dockerfile b/linters/kubernetes_kubeconform/Dockerfile index 378af8f3848..73421679b0f 100644 --- a/linters/kubernetes_kubeconform/Dockerfile +++ b/linters/kubernetes_kubeconform/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/kubernetes_kubeval/Dockerfile b/linters/kubernetes_kubeval/Dockerfile index fedf3ea417d..269e0afea66 100644 --- a/linters/kubernetes_kubeval/Dockerfile +++ b/linters/kubernetes_kubeval/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/latex_chktex/Dockerfile b/linters/latex_chktex/Dockerfile index 99b51f94bd8..41960148fba 100644 --- a/linters/latex_chktex/Dockerfile +++ b/linters/latex_chktex/Dockerfile @@ -17,7 +17,7 @@ FROM ghcr.io/assignuser/chktex-alpine:latest as chktex # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/lua_luacheck/Dockerfile b/linters/lua_luacheck/Dockerfile index afc4c4ce4a0..902d0050795 100644 --- a/linters/lua_luacheck/Dockerfile +++ b/linters/lua_luacheck/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/makefile_checkmake/Dockerfile b/linters/makefile_checkmake/Dockerfile index ba96c9855b6..58d1c51bafc 100644 --- a/linters/makefile_checkmake/Dockerfile +++ b/linters/makefile_checkmake/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/markdown_markdown_link_check/Dockerfile b/linters/markdown_markdown_link_check/Dockerfile index 17659f57dc1..184454d6988 100644 --- a/linters/markdown_markdown_link_check/Dockerfile +++ b/linters/markdown_markdown_link_check/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/markdown_markdown_table_formatter/Dockerfile b/linters/markdown_markdown_table_formatter/Dockerfile index 4a4722006f8..68e96fb4f88 100644 --- a/linters/markdown_markdown_table_formatter/Dockerfile +++ b/linters/markdown_markdown_table_formatter/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/markdown_markdownlint/Dockerfile b/linters/markdown_markdownlint/Dockerfile index fe30018f1c9..36767064b9f 100644 --- a/linters/markdown_markdownlint/Dockerfile +++ b/linters/markdown_markdownlint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/markdown_remark_lint/Dockerfile b/linters/markdown_remark_lint/Dockerfile index 843ba1504d3..bfeea44a600 100644 --- a/linters/markdown_remark_lint/Dockerfile +++ b/linters/markdown_remark_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/openapi_spectral/Dockerfile b/linters/openapi_spectral/Dockerfile index e1849860d6d..453de8c69cb 100644 --- a/linters/openapi_spectral/Dockerfile +++ b/linters/openapi_spectral/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/perl_perlcritic/Dockerfile b/linters/perl_perlcritic/Dockerfile index cfbe2353c95..8590528c314 100644 --- a/linters/perl_perlcritic/Dockerfile +++ b/linters/perl_perlcritic/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/php_phpcs/Dockerfile b/linters/php_phpcs/Dockerfile index 60c4836b901..f9d4700b4a6 100644 --- a/linters/php_phpcs/Dockerfile +++ b/linters/php_phpcs/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/php_phplint/Dockerfile b/linters/php_phplint/Dockerfile index c1abd6cdfa8..1c9b5a9e67e 100644 --- a/linters/php_phplint/Dockerfile +++ b/linters/php_phplint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/php_phpstan/Dockerfile b/linters/php_phpstan/Dockerfile index e64a18b7e31..73fb012034c 100644 --- a/linters/php_phpstan/Dockerfile +++ b/linters/php_phpstan/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/powershell_powershell/Dockerfile b/linters/powershell_powershell/Dockerfile index 34b428921af..ccbb6cd5a51 100644 --- a/linters/powershell_powershell/Dockerfile +++ b/linters/powershell_powershell/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/powershell_powershell_formatter/Dockerfile b/linters/powershell_powershell_formatter/Dockerfile index 16f3a386c82..b56d52966d5 100644 --- a/linters/powershell_powershell_formatter/Dockerfile +++ b/linters/powershell_powershell_formatter/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/protobuf_protolint/Dockerfile b/linters/protobuf_protolint/Dockerfile index 66bc16a5c8e..352a433585f 100644 --- a/linters/protobuf_protolint/Dockerfile +++ b/linters/protobuf_protolint/Dockerfile @@ -17,7 +17,7 @@ FROM yoheimuta/protolint:latest as protolint # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/puppet_puppet_lint/Dockerfile b/linters/puppet_puppet_lint/Dockerfile index 728187fc4ed..97bb6d1c5a3 100644 --- a/linters/puppet_puppet_lint/Dockerfile +++ b/linters/puppet_puppet_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_black/Dockerfile b/linters/python_black/Dockerfile index a10250613ba..511838b15d1 100644 --- a/linters/python_black/Dockerfile +++ b/linters/python_black/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_flake8/Dockerfile b/linters/python_flake8/Dockerfile index c56ffc32330..4f0607b030d 100644 --- a/linters/python_flake8/Dockerfile +++ b/linters/python_flake8/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_isort/Dockerfile b/linters/python_isort/Dockerfile index 77860b24fa1..d50c29af0d1 100644 --- a/linters/python_isort/Dockerfile +++ b/linters/python_isort/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_mypy/Dockerfile b/linters/python_mypy/Dockerfile index adaf9a38e52..c4ac6070de5 100644 --- a/linters/python_mypy/Dockerfile +++ b/linters/python_mypy/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_pylint/Dockerfile b/linters/python_pylint/Dockerfile index 3c261ceefeb..b3b29f0fe4d 100644 --- a/linters/python_pylint/Dockerfile +++ b/linters/python_pylint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_pyright/Dockerfile b/linters/python_pyright/Dockerfile index d35de5812a7..5fa4b6d0d32 100644 --- a/linters/python_pyright/Dockerfile +++ b/linters/python_pyright/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/r_lintr/Dockerfile b/linters/r_lintr/Dockerfile index 5e9ca014173..a7a5fd84aa7 100644 --- a/linters/r_lintr/Dockerfile +++ b/linters/r_lintr/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/raku_raku/Dockerfile b/linters/raku_raku/Dockerfile index c7eac2535aa..1f81f8b0d02 100644 --- a/linters/raku_raku/Dockerfile +++ b/linters/raku_raku/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_git_diff/Dockerfile b/linters/repository_git_diff/Dockerfile index bea7ddcde60..a17e920363c 100644 --- a/linters/repository_git_diff/Dockerfile +++ b/linters/repository_git_diff/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_goodcheck/Dockerfile b/linters/repository_goodcheck/Dockerfile index 0b4d1d74ed7..68dbf9e1c9e 100644 --- a/linters/repository_goodcheck/Dockerfile +++ b/linters/repository_goodcheck/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/rst_rst_lint/Dockerfile b/linters/rst_rst_lint/Dockerfile index 70638d5c052..a801e0de378 100644 --- a/linters/rst_rst_lint/Dockerfile +++ b/linters/rst_rst_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/rst_rstcheck/Dockerfile b/linters/rst_rstcheck/Dockerfile index 213bb5e8fc1..bc654221ae7 100644 --- a/linters/rst_rstcheck/Dockerfile +++ b/linters/rst_rstcheck/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/rst_rstfmt/Dockerfile b/linters/rst_rstfmt/Dockerfile index 9cea880ba62..c13d88b9e3b 100644 --- a/linters/rst_rstfmt/Dockerfile +++ b/linters/rst_rstfmt/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/ruby_rubocop/Dockerfile b/linters/ruby_rubocop/Dockerfile index dbe96e6ddb0..1f73a235653 100644 --- a/linters/ruby_rubocop/Dockerfile +++ b/linters/ruby_rubocop/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/rust_clippy/Dockerfile b/linters/rust_clippy/Dockerfile index 611eb861ccd..99c41cdd2d8 100644 --- a/linters/rust_clippy/Dockerfile +++ b/linters/rust_clippy/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/salesforce_sfdx_scanner_apex/Dockerfile b/linters/salesforce_sfdx_scanner_apex/Dockerfile index 278a157b402..efe9470fd9d 100644 --- a/linters/salesforce_sfdx_scanner_apex/Dockerfile +++ b/linters/salesforce_sfdx_scanner_apex/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/salesforce_sfdx_scanner_aura/Dockerfile b/linters/salesforce_sfdx_scanner_aura/Dockerfile index 156b4f8e74c..cafa83e29b6 100644 --- a/linters/salesforce_sfdx_scanner_aura/Dockerfile +++ b/linters/salesforce_sfdx_scanner_aura/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/salesforce_sfdx_scanner_lwc/Dockerfile b/linters/salesforce_sfdx_scanner_lwc/Dockerfile index 563c2d3c301..ecbd06673b6 100644 --- a/linters/salesforce_sfdx_scanner_lwc/Dockerfile +++ b/linters/salesforce_sfdx_scanner_lwc/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/scala_scalafix/Dockerfile b/linters/scala_scalafix/Dockerfile index 592698b046a..797656f2ef2 100644 --- a/linters/scala_scalafix/Dockerfile +++ b/linters/scala_scalafix/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/snakemake_lint/Dockerfile b/linters/snakemake_lint/Dockerfile index 71989928239..c926502917d 100644 --- a/linters/snakemake_lint/Dockerfile +++ b/linters/snakemake_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/snakemake_snakefmt/Dockerfile b/linters/snakemake_snakefmt/Dockerfile index ddbd447eafe..843469a8ef9 100644 --- a/linters/snakemake_snakefmt/Dockerfile +++ b/linters/snakemake_snakefmt/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/spell_cspell/Dockerfile b/linters/spell_cspell/Dockerfile index 2dd1f04d270..27debfae62f 100644 --- a/linters/spell_cspell/Dockerfile +++ b/linters/spell_cspell/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/spell_misspell/Dockerfile b/linters/spell_misspell/Dockerfile index df99adf8ef7..9c0cd277cc3 100644 --- a/linters/spell_misspell/Dockerfile +++ b/linters/spell_misspell/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/spell_proselint/Dockerfile b/linters/spell_proselint/Dockerfile index 78d0b0d68f6..9eb619fbe26 100644 --- a/linters/spell_proselint/Dockerfile +++ b/linters/spell_proselint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/sql_sql_lint/Dockerfile b/linters/sql_sql_lint/Dockerfile index c47baef7185..7cdbfd60cc9 100644 --- a/linters/sql_sql_lint/Dockerfile +++ b/linters/sql_sql_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/sql_sqlfluff/Dockerfile b/linters/sql_sqlfluff/Dockerfile index a3e1f2362d8..3da300cf3ec 100644 --- a/linters/sql_sqlfluff/Dockerfile +++ b/linters/sql_sqlfluff/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/sql_tsqllint/Dockerfile b/linters/sql_tsqllint/Dockerfile index 710e913d09a..5e456028a30 100644 --- a/linters/sql_tsqllint/Dockerfile +++ b/linters/sql_tsqllint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/swift_swiftlint/Dockerfile b/linters/swift_swiftlint/Dockerfile index 810d0922b93..6ae52bad2f2 100644 --- a/linters/swift_swiftlint/Dockerfile +++ b/linters/swift_swiftlint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/tekton_tekton_lint/Dockerfile b/linters/tekton_tekton_lint/Dockerfile index 19fa22a7a36..3314c0a7c91 100644 --- a/linters/tekton_tekton_lint/Dockerfile +++ b/linters/tekton_tekton_lint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_kics/Dockerfile b/linters/terraform_kics/Dockerfile index c6643c35499..b0fe2479eef 100644 --- a/linters/terraform_kics/Dockerfile +++ b/linters/terraform_kics/Dockerfile @@ -17,7 +17,7 @@ FROM checkmarx/kics:alpine as kics # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_terraform_fmt/Dockerfile b/linters/terraform_terraform_fmt/Dockerfile index d56bba722a7..366282e603d 100644 --- a/linters/terraform_terraform_fmt/Dockerfile +++ b/linters/terraform_terraform_fmt/Dockerfile @@ -17,7 +17,7 @@ FROM alpine/terragrunt:latest as terragrunt # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_terragrunt/Dockerfile b/linters/terraform_terragrunt/Dockerfile index e8afbfab27f..6d647c742fb 100644 --- a/linters/terraform_terragrunt/Dockerfile +++ b/linters/terraform_terragrunt/Dockerfile @@ -17,7 +17,7 @@ FROM alpine/terragrunt:latest as terragrunt # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/typescript_prettier/Dockerfile b/linters/typescript_prettier/Dockerfile index 0cc4c8f4bc5..396993d4188 100644 --- a/linters/typescript_prettier/Dockerfile +++ b/linters/typescript_prettier/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/typescript_standard/Dockerfile b/linters/typescript_standard/Dockerfile index 7795cc14637..61e75cda80c 100644 --- a/linters/typescript_standard/Dockerfile +++ b/linters/typescript_standard/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/vbdotnet_dotnet_format/Dockerfile b/linters/vbdotnet_dotnet_format/Dockerfile index 7182f448179..24ce6ebf976 100644 --- a/linters/vbdotnet_dotnet_format/Dockerfile +++ b/linters/vbdotnet_dotnet_format/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/xml_xmllint/Dockerfile b/linters/xml_xmllint/Dockerfile index bbec254de1f..2e7c31391e0 100644 --- a/linters/xml_xmllint/Dockerfile +++ b/linters/xml_xmllint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/yaml_prettier/Dockerfile b/linters/yaml_prettier/Dockerfile index 959e00e424c..a7a462f2e88 100644 --- a/linters/yaml_prettier/Dockerfile +++ b/linters/yaml_prettier/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/yaml_v8r/Dockerfile b/linters/yaml_v8r/Dockerfile index 3c87c2f6250..c8bee5ad568 100644 --- a/linters/yaml_v8r/Dockerfile +++ b/linters/yaml_v8r/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/yaml_yamllint/Dockerfile b/linters/yaml_yamllint/Dockerfile index 1fb36dfc80e..6106784b6dc 100644 --- a/linters/yaml_yamllint/Dockerfile +++ b/linters/yaml_yamllint/Dockerfile @@ -17,7 +17,7 @@ # Get base image # ################## # 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.10.4-alpine3.16 +FROM python:3.11.1-alpine3.17 ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/mega-linter-runner/README.md b/mega-linter-runner/README.md index e493cf7edf8..53ab0a27dd8 100644 --- a/mega-linter-runner/README.md +++ b/mega-linter-runner/README.md @@ -140,61 +140,61 @@ You can generate a ready-to-use [.mega-linter.yml configuration file](https://me ### Languages -| | Language | Linter | Additional | -|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|---------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**bash-exec**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_bash_exec.md)
[_BASH_EXEC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_bash_exec.md) | | -| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**shellcheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shellcheck.md)
[_BASH_SHELLCHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shellcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**shfmt**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shfmt.md)
[_BASH_SHFMT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shfmt.md) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**C**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c.md) | [**cpplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c_cpplint.md)
[_C_CPPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**CLOJURE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure.md) | [**clj-kondo**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure_clj_kondo.md)
[_CLOJURE_CLJ_KONDO_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure_clj_kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | -| | [**COFFEE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee.md) | [**coffeelint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee_coffeelint.md)
[_COFFEE_COFFEELINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee_coffeelint.md) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | -| | [**C++** (CPP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp.md) | [**cpplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp_cpplint.md)
[_CPP_CPPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | -| | [**C#** (CSHARP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp.md) | [**dotnet-format**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_dotnet_format.md)
[_CSHARP_DOTNET_FORMAT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**C#** (CSHARP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp.md) | [**csharpier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_csharpier.md)
[_CSHARP_CSHARPIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_csharpier.md) | [![GitHub stars](https://img.shields.io/github/stars/belav/csharpier?cacheSeconds=3600)](https://github.com/belav/csharpier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**DART**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart.md) | [**dartanalyzer**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart_dartanalyzer.md)
[_DART_DARTANALYZER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart_dartanalyzer.md) | ![downgraded version](https://shields.io/badge/-downgraded%20version-orange) [![GitHub stars](https://img.shields.io/github/stars/dart-lang/sdk?cacheSeconds=3600)](https://github.com/dart-lang/sdk) | -| | [**GO**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go.md) | [**golangci-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_golangci_lint.md)
[_GO_GOLANGCI_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_golangci_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | -| | [**GO**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go.md) | [**revive**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_revive.md)
[_GO_REVIVE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_revive.md) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**GROOVY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy.md) | [**npm-groovy-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy_npm_groovy_lint.md)
[_GROOVY_NPM_GROOVY_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy_npm_groovy_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java.md) | [**checkstyle**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_checkstyle.md)
[_JAVA_CHECKSTYLE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_checkstyle.md) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java.md) | [**pmd**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_pmd.md)
[_JAVA_PMD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_pmd.md) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_eslint.md)
[_JAVASCRIPT_ES_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_standard.md)
[_JAVASCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**prettier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_prettier.md)
[_JAVASCRIPT_PRETTIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**JSX**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx_eslint.md)
[_JSX_ESLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**KOTLIN**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin.md) | [**ktlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin_ktlint.md)
[_KOTLIN_KTLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin_ktlint.md) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**LUA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua.md) | [**luacheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua_luacheck.md)
[_LUA_LUACHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua_luacheck.md) | [![GitHub stars](https://img.shields.io/github/stars/luarocks/luacheck?cacheSeconds=3600)](https://github.com/luarocks/luacheck) | -| | [**MAKEFILE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile.md) | [**checkmake**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile_checkmake.md)
[_MAKEFILE_CHECKMAKE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile_checkmake.md) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | -| | [**PERL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl.md) | [**perlcritic**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl_perlcritic.md)
[_PERL_PERLCRITIC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl_perlcritic.md) | [![GitHub stars](https://img.shields.io/github/stars/Perl-Critic/Perl-Critic?cacheSeconds=3600)](https://github.com/Perl-Critic/Perl-Critic) | -| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phpcs**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpcs.md)
[_PHP_PHPCS_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpcs.md) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | -| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phpstan**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpstan.md)
[_PHP_PHPSTAN_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpstan.md) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | -| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**psalm**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_psalm.md)
[_PHP_PSALM_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_psalm.md) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phplint.md)
[_PHP_PHPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phplint.md) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | -| | [**POWERSHELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell.md) | [**powershell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell.md)
[_POWERSHELL_POWERSHELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**POWERSHELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell.md) | [**powershell_formatter**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell_formatter.md)
[_POWERSHELL_POWERSHELL_FORMATTER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell_formatter.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**pylint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pylint.md)
[_PYTHON_PYLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pylint.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**black**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_black.md)
[_PYTHON_BLACK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_black.md) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**flake8**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_flake8.md)
[_PYTHON_FLAKE8_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_flake8.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**isort**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_isort.md)
[_PYTHON_ISORT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_isort.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**bandit**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_bandit.md)
[_PYTHON_BANDIT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_bandit.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/bandit?cacheSeconds=3600)](https://github.com/PyCQA/bandit) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**mypy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_mypy.md)
[_PYTHON_MYPY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_mypy.md) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | -| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**pyright**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pyright.md)
[_PYTHON_PYRIGHT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pyright.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | -| | [**R**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r.md) | [**lintr**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r_lintr.md)
[_R_LINTR_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r_lintr.md) | [![GitHub stars](https://img.shields.io/github/stars/r-lib/lintr?cacheSeconds=3600)](https://github.com/r-lib/lintr) | -| | [**RAKU**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku.md) | [**raku**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku_raku.md)
[_RAKU_RAKU_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku_raku.md) | [![GitHub stars](https://img.shields.io/github/stars/rakudo/rakudo?cacheSeconds=3600)](https://github.com/rakudo/rakudo) | -| | [**RUBY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby.md) | [**rubocop**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby_rubocop.md)
[_RUBY_RUBOCOP_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby_rubocop.md) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**RUST**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust.md) | [**clippy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust_clippy.md)
[_RUST_CLIPPY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust_clippy.md) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | -| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-apex**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_apex.md)
[_SALESFORCE_SFDX_SCANNER_APEX_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_apex.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-aura**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_aura.md)
[_SALESFORCE_SFDX_SCANNER_AURA_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_aura.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-lwc**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_lwc.md)
[_SALESFORCE_SFDX_SCANNER_LWC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_lwc.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | -| | [**SCALA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala.md) | [**scalafix**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala_scalafix.md)
[_SCALA_SCALAFIX_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala_scalafix.md) | [![GitHub stars](https://img.shields.io/github/stars/scalacenter/scalafix?cacheSeconds=3600)](https://github.com/scalacenter/scalafix) | -| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**sql-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sql_lint.md)
[_SQL_SQL_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sql_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | -| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**sqlfluff**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sqlfluff.md)
[_SQL_SQLFLUFF_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sqlfluff.md) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | -| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**tsqllint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_tsqllint.md)
[_SQL_TSQLLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_tsqllint.md) | [![GitHub stars](https://img.shields.io/github/stars/tsqllint/tsqllint?cacheSeconds=3600)](https://github.com/tsqllint/tsqllint) | -| | [**SWIFT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift.md) | [**swiftlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md)
[_SWIFT_SWIFTLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TSX**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md)
[_TSX_ESLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md)
[_TYPESCRIPT_ES_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md)
[_TYPESCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**prettier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | -| | [**Visual Basic .NET** (VBDOTNET)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet.md) | [**dotnet-format**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md)
[_VBDOTNET_DOTNET_FORMAT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | +| | Language | Linter | Additional | +|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|---------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**bash-exec**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_bash_exec.md)
[_BASH_EXEC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_bash_exec.md) | | +| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**shellcheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shellcheck.md)
[_BASH_SHELLCHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shellcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/koalaman/shellcheck?cacheSeconds=3600)](https://github.com/koalaman/shellcheck) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**BASH**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash.md) | [**shfmt**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shfmt.md)
[_BASH_SHFMT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/bash_shfmt.md) | [![GitHub stars](https://img.shields.io/github/stars/mvdan/sh?cacheSeconds=3600)](https://github.com/mvdan/sh) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**C**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c.md) | [**cpplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c_cpplint.md)
[_C_CPPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/c_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**CLOJURE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure.md) | [**clj-kondo**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure_clj_kondo.md)
[_CLOJURE_CLJ_KONDO_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/clojure_clj_kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo) | +| | [**COFFEE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee.md) | [**coffeelint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee_coffeelint.md)
[_COFFEE_COFFEELINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/coffee_coffeelint.md) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint) | +| | [**C++** (CPP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp.md) | [**cpplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp_cpplint.md)
[_CPP_CPPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/cpp_cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint) | +| | [**C#** (CSHARP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp.md) | [**dotnet-format**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_dotnet_format.md)
[_CSHARP_DOTNET_FORMAT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**C#** (CSHARP)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp.md) | [**csharpier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_csharpier.md)
[_CSHARP_CSHARPIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/csharp_csharpier.md) | [![GitHub stars](https://img.shields.io/github/stars/belav/csharpier?cacheSeconds=3600)](https://github.com/belav/csharpier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**DART**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart.md) | [**dartanalyzer**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart_dartanalyzer.md)
[_DART_DARTANALYZER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/dart_dartanalyzer.md) | [![GitHub stars](https://img.shields.io/github/stars/dart-lang/sdk?cacheSeconds=3600)](https://github.com/dart-lang/sdk) | +| | [**GO**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go.md) | [**golangci-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_golangci_lint.md)
[_GO_GOLANGCI_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_golangci_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/golangci/golangci-lint?cacheSeconds=3600)](https://github.com/golangci/golangci-lint) | +| | [**GO**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go.md) | [**revive**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_revive.md)
[_GO_REVIVE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go_revive.md) | [![GitHub stars](https://img.shields.io/github/stars/mgechev/revive?cacheSeconds=3600)](https://github.com/mgechev/revive) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**GROOVY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy.md) | [**npm-groovy-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy_npm_groovy_lint.md)
[_GROOVY_NPM_GROOVY_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/groovy_npm_groovy_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java.md) | [**checkstyle**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_checkstyle.md)
[_JAVA_CHECKSTYLE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_checkstyle.md) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java.md) | [**pmd**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_pmd.md)
[_JAVA_PMD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/java_pmd.md) | [![GitHub stars](https://img.shields.io/github/stars/pmd/pmd?cacheSeconds=3600)](https://github.com/pmd/pmd) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_eslint.md)
[_JAVASCRIPT_ES_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/eslint/eslint?cacheSeconds=3600)](https://github.com/eslint/eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_standard.md)
[_JAVASCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**JAVASCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript.md) | [**prettier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_prettier.md)
[_JAVASCRIPT_PRETTIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/javascript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**JSX**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx_eslint.md)
[_JSX_ESLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/jsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/yannickcr/eslint-plugin-react?cacheSeconds=3600)](https://github.com/yannickcr/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**KOTLIN**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin.md) | [**ktlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin_ktlint.md)
[_KOTLIN_KTLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/kotlin_ktlint.md) | [![GitHub stars](https://img.shields.io/github/stars/pinterest/ktlint?cacheSeconds=3600)](https://github.com/pinterest/ktlint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**LUA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua.md) | [**luacheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua_luacheck.md)
[_LUA_LUACHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/lua_luacheck.md) | [![GitHub stars](https://img.shields.io/github/stars/luarocks/luacheck?cacheSeconds=3600)](https://github.com/luarocks/luacheck) | +| | [**MAKEFILE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile.md) | [**checkmake**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile_checkmake.md)
[_MAKEFILE_CHECKMAKE_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/makefile_checkmake.md) | [![GitHub stars](https://img.shields.io/github/stars/mrtazz/checkmake?cacheSeconds=3600)](https://github.com/mrtazz/checkmake) | +| | [**PERL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl.md) | [**perlcritic**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl_perlcritic.md)
[_PERL_PERLCRITIC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/perl_perlcritic.md) | [![GitHub stars](https://img.shields.io/github/stars/Perl-Critic/Perl-Critic?cacheSeconds=3600)](https://github.com/Perl-Critic/Perl-Critic) | +| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phpcs**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpcs.md)
[_PHP_PHPCS_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpcs.md) | [![GitHub stars](https://img.shields.io/github/stars/squizlabs/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/squizlabs/PHP_CodeSniffer) | +| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phpstan**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpstan.md)
[_PHP_PHPSTAN_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phpstan.md) | [![GitHub stars](https://img.shields.io/github/stars/phpstan/phpstan?cacheSeconds=3600)](https://github.com/phpstan/phpstan) | +| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**psalm**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_psalm.md)
[_PHP_PSALM_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_psalm.md) | [![GitHub stars](https://img.shields.io/github/stars/vimeo/psalm?cacheSeconds=3600)](https://github.com/vimeo/psalm) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**PHP**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php.md) | [**phplint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phplint.md)
[_PHP_PHPLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/php_phplint.md) | [![GitHub stars](https://img.shields.io/github/stars/overtrue/phplint?cacheSeconds=3600)](https://github.com/overtrue/phplint) | +| | [**POWERSHELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell.md) | [**powershell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell.md)
[_POWERSHELL_POWERSHELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**POWERSHELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell.md) | [**powershell_formatter**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell_formatter.md)
[_POWERSHELL_POWERSHELL_FORMATTER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/powershell_powershell_formatter.md) | [![GitHub stars](https://img.shields.io/github/stars/PowerShell/PSScriptAnalyzer?cacheSeconds=3600)](https://github.com/PowerShell/PSScriptAnalyzer) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**pylint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pylint.md)
[_PYTHON_PYLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pylint.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/pylint?cacheSeconds=3600)](https://github.com/PyCQA/pylint) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**black**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_black.md)
[_PYTHON_BLACK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_black.md) | [![GitHub stars](https://img.shields.io/github/stars/psf/black?cacheSeconds=3600)](https://github.com/psf/black) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**flake8**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_flake8.md)
[_PYTHON_FLAKE8_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_flake8.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/flake8?cacheSeconds=3600)](https://github.com/PyCQA/flake8) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**isort**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_isort.md)
[_PYTHON_ISORT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_isort.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/isort?cacheSeconds=3600)](https://github.com/PyCQA/isort) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**bandit**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_bandit.md)
[_PYTHON_BANDIT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_bandit.md) | [![GitHub stars](https://img.shields.io/github/stars/PyCQA/bandit?cacheSeconds=3600)](https://github.com/PyCQA/bandit) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**mypy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_mypy.md)
[_PYTHON_MYPY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_mypy.md) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy) | +| | [**PYTHON**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python.md) | [**pyright**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pyright.md)
[_PYTHON_PYRIGHT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/python_pyright.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/pyright?cacheSeconds=3600)](https://github.com/microsoft/pyright) | +| | [**R**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r.md) | [**lintr**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r_lintr.md)
[_R_LINTR_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/r_lintr.md) | [![GitHub stars](https://img.shields.io/github/stars/r-lib/lintr?cacheSeconds=3600)](https://github.com/r-lib/lintr) | +| | [**RAKU**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku.md) | [**raku**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku_raku.md)
[_RAKU_RAKU_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/raku_raku.md) | [![GitHub stars](https://img.shields.io/github/stars/rakudo/rakudo?cacheSeconds=3600)](https://github.com/rakudo/rakudo) | +| | [**RUBY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby.md) | [**rubocop**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby_rubocop.md)
[_RUBY_RUBOCOP_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/ruby_rubocop.md) | [![GitHub stars](https://img.shields.io/github/stars/rubocop-hq/rubocop?cacheSeconds=3600)](https://github.com/rubocop-hq/rubocop) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**RUST**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust.md) | [**clippy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust_clippy.md)
[_RUST_CLIPPY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/rust_clippy.md) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy) | +| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-apex**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_apex.md)
[_SALESFORCE_SFDX_SCANNER_APEX_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_apex.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-aura**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_aura.md)
[_SALESFORCE_SFDX_SCANNER_AURA_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_aura.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SALESFORCE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce.md) | [**sfdx-scanner-lwc**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_lwc.md)
[_SALESFORCE_SFDX_SCANNER_LWC_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/salesforce_sfdx_scanner_lwc.md) | [![GitHub stars](https://img.shields.io/github/stars/forcedotcom/sfdx-scanner?cacheSeconds=3600)](https://github.com/forcedotcom/sfdx-scanner) | +| | [**SCALA**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala.md) | [**scalafix**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala_scalafix.md)
[_SCALA_SCALAFIX_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/scala_scalafix.md) | [![GitHub stars](https://img.shields.io/github/stars/scalacenter/scalafix?cacheSeconds=3600)](https://github.com/scalacenter/scalafix) | +| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**sql-lint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sql_lint.md)
[_SQL_SQL_LINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sql_lint.md) | [![GitHub stars](https://img.shields.io/github/stars/joereynolds/sql-lint?cacheSeconds=3600)](https://github.com/joereynolds/sql-lint) | +| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**sqlfluff**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sqlfluff.md)
[_SQL_SQLFLUFF_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_sqlfluff.md) | [![GitHub stars](https://img.shields.io/github/stars/sqlfluff/sqlfluff?cacheSeconds=3600)](https://github.com/sqlfluff/sqlfluff) | +| | [**SQL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql.md) | [**tsqllint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_tsqllint.md)
[_SQL_TSQLLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/sql_tsqllint.md) | [![GitHub stars](https://img.shields.io/github/stars/tsqllint/tsqllint?cacheSeconds=3600)](https://github.com/tsqllint/tsqllint) | +| | [**SWIFT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift.md) | [**swiftlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md)
[_SWIFT_SWIFTLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TSX**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md)
[_TSX_ESLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/jsx-eslint/eslint-plugin-react?cacheSeconds=3600)](https://github.com/jsx-eslint/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md)
[_TYPESCRIPT_ES_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/typescript-eslint/typescript-eslint?cacheSeconds=3600)](https://github.com/typescript-eslint/typescript-eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md)
[_TYPESCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**prettier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md)
[_TYPESCRIPT_PRETTIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) | +| | [**Visual Basic .NET** (VBDOTNET)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet.md) | [**dotnet-format**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md)
[_VBDOTNET_DOTNET_FORMAT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) | ### Formats @@ -253,22 +253,22 @@ You can generate a ready-to-use [.mega-linter.yml configuration file](https://me ### Other -| | Code quality checker | Linter | Additional | -|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | [**COPYPASTE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste.md) | [**jscpd**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste_jscpd.md)
[_COPYPASTE_JSCPD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste_jscpd.md) | [![GitHub stars](https://img.shields.io/github/stars/kucherenko/jscpd?cacheSeconds=3600)](https://github.com/kucherenko/jscpd) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**checkov**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_checkov.md)
[_REPOSITORY_CHECKOV_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_checkov.md) | [![GitHub stars](https://img.shields.io/github/stars/bridgecrewio/checkov?cacheSeconds=3600)](https://github.com/bridgecrewio/checkov) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**devskim**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_devskim.md)
[_REPOSITORY_DEVSKIM_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_devskim.md) | ![downgraded version](https://shields.io/badge/-downgraded%20version-orange) [![GitHub stars](https://img.shields.io/github/stars/microsoft/DevSkim?cacheSeconds=3600)](https://github.com/microsoft/DevSkim) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**dustilock**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_dustilock.md)
[_REPOSITORY_DUSTILOCK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_dustilock.md) | [![GitHub stars](https://img.shields.io/github/stars/Checkmarx/dustilock?cacheSeconds=3600)](https://github.com/Checkmarx/dustilock) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**git_diff**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_git_diff.md)
[_REPOSITORY_GIT_DIFF_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_git_diff.md) | [![GitHub stars](https://img.shields.io/github/stars/git/git?cacheSeconds=3600)](https://github.com/git/git) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**gitleaks**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_gitleaks.md)
[_REPOSITORY_GITLEAKS_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_gitleaks.md) | [![GitHub stars](https://img.shields.io/github/stars/zricethezav/gitleaks?cacheSeconds=3600)](https://github.com/zricethezav/gitleaks) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**goodcheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_goodcheck.md)
[_REPOSITORY_GOODCHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_goodcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/sider/goodcheck?cacheSeconds=3600)](https://github.com/sider/goodcheck) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**secretlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_secretlint.md)
[_REPOSITORY_SECRETLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_secretlint.md) | [![GitHub stars](https://img.shields.io/github/stars/secretlint/secretlint?cacheSeconds=3600)](https://github.com/secretlint/secretlint) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**semgrep**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_semgrep.md)
[_REPOSITORY_SEMGREP_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_semgrep.md) | [![GitHub stars](https://img.shields.io/github/stars/returntocorp/semgrep?cacheSeconds=3600)](https://github.com/returntocorp/semgrep) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**syft**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_syft.md)
[_REPOSITORY_SYFT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_syft.md) | [![GitHub stars](https://img.shields.io/github/stars/anchore/syft?cacheSeconds=3600)](https://github.com/anchore/syft) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**trivy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_trivy.md)
[_REPOSITORY_TRIVY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_trivy.md) | [![GitHub stars](https://img.shields.io/github/stars/aquasecurity/trivy?cacheSeconds=3600)](https://github.com/aquasecurity/trivy) ![sarif](https://shields.io/badge/-SARIF-orange) | -| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**misspell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_misspell.md)
[_SPELL_MISSPELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_misspell.md) | [![GitHub stars](https://img.shields.io/github/stars/client9/misspell?cacheSeconds=3600)](https://github.com/client9/misspell) ![autofix](https://shields.io/badge/-autofix-green) | -| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**cspell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_cspell.md)
[_SPELL_CSPELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_cspell.md) | [![GitHub stars](https://img.shields.io/github/stars/streetsidesoftware/cspell?cacheSeconds=3600)](https://github.com/streetsidesoftware/cspell) | -| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**proselint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_proselint.md)
[_SPELL_PROSELINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_proselint.md) | [![GitHub stars](https://img.shields.io/github/stars/amperser/proselint?cacheSeconds=3600)](https://github.com/amperser/proselint) | +| | Code quality checker | Linter | Additional | +|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| | [**COPYPASTE**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste.md) | [**jscpd**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste_jscpd.md)
[_COPYPASTE_JSCPD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/copypaste_jscpd.md) | [![GitHub stars](https://img.shields.io/github/stars/kucherenko/jscpd?cacheSeconds=3600)](https://github.com/kucherenko/jscpd) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**checkov**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_checkov.md)
[_REPOSITORY_CHECKOV_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_checkov.md) | [![GitHub stars](https://img.shields.io/github/stars/bridgecrewio/checkov?cacheSeconds=3600)](https://github.com/bridgecrewio/checkov) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**devskim**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_devskim.md)
[_REPOSITORY_DEVSKIM_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_devskim.md) | [![GitHub stars](https://img.shields.io/github/stars/microsoft/DevSkim?cacheSeconds=3600)](https://github.com/microsoft/DevSkim) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**dustilock**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_dustilock.md)
[_REPOSITORY_DUSTILOCK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_dustilock.md) | [![GitHub stars](https://img.shields.io/github/stars/Checkmarx/dustilock?cacheSeconds=3600)](https://github.com/Checkmarx/dustilock) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**git_diff**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_git_diff.md)
[_REPOSITORY_GIT_DIFF_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_git_diff.md) | [![GitHub stars](https://img.shields.io/github/stars/git/git?cacheSeconds=3600)](https://github.com/git/git) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**gitleaks**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_gitleaks.md)
[_REPOSITORY_GITLEAKS_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_gitleaks.md) | [![GitHub stars](https://img.shields.io/github/stars/zricethezav/gitleaks?cacheSeconds=3600)](https://github.com/zricethezav/gitleaks) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**goodcheck**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_goodcheck.md)
[_REPOSITORY_GOODCHECK_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_goodcheck.md) | [![GitHub stars](https://img.shields.io/github/stars/sider/goodcheck?cacheSeconds=3600)](https://github.com/sider/goodcheck) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**secretlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_secretlint.md)
[_REPOSITORY_SECRETLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_secretlint.md) | [![GitHub stars](https://img.shields.io/github/stars/secretlint/secretlint?cacheSeconds=3600)](https://github.com/secretlint/secretlint) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**semgrep**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_semgrep.md)
[_REPOSITORY_SEMGREP_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_semgrep.md) | [![GitHub stars](https://img.shields.io/github/stars/returntocorp/semgrep?cacheSeconds=3600)](https://github.com/returntocorp/semgrep) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**syft**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_syft.md)
[_REPOSITORY_SYFT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_syft.md) | [![GitHub stars](https://img.shields.io/github/stars/anchore/syft?cacheSeconds=3600)](https://github.com/anchore/syft) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**REPOSITORY**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository.md) | [**trivy**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_trivy.md)
[_REPOSITORY_TRIVY_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/repository_trivy.md) | [![GitHub stars](https://img.shields.io/github/stars/aquasecurity/trivy?cacheSeconds=3600)](https://github.com/aquasecurity/trivy) ![sarif](https://shields.io/badge/-SARIF-orange) | +| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**misspell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_misspell.md)
[_SPELL_MISSPELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_misspell.md) | [![GitHub stars](https://img.shields.io/github/stars/client9/misspell?cacheSeconds=3600)](https://github.com/client9/misspell) ![autofix](https://shields.io/badge/-autofix-green) | +| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**cspell**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_cspell.md)
[_SPELL_CSPELL_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_cspell.md) | [![GitHub stars](https://img.shields.io/github/stars/streetsidesoftware/cspell?cacheSeconds=3600)](https://github.com/streetsidesoftware/cspell) | +| | [**SPELL**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell.md) | [**proselint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_proselint.md)
[_SPELL_PROSELINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/spell_proselint.md) | [![GitHub stars](https://img.shields.io/github/stars/amperser/proselint?cacheSeconds=3600)](https://github.com/amperser/proselint) | From cd596b33d5b0303d08bd6f049f110545f854e43f Mon Sep 17 00:00:00 2001 From: bdovaz Date: Wed, 8 Feb 2023 18:41:16 +0000 Subject: [PATCH 55/63] [MegaLinter] Apply linters fixes --- docs/descriptors/xml_xmllint.md | 2 +- .../tests/test_megalinter/LinterTestRoot.py | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/docs/descriptors/xml_xmllint.md b/docs/descriptors/xml_xmllint.md index 819a23de36a..abebef13cdb 100644 --- a/docs/descriptors/xml_xmllint.md +++ b/docs/descriptors/xml_xmllint.md @@ -25,7 +25,7 @@ To apply file formatting you must set `XML_XMLLINT_CLI_LINT_MODE: file` and `XML | Variable | Description | Default value | |-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| | XML_XMLLINT_AUTOFORMAT | If set to `true`, it will reformat and reindent the output | `false` | -| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | ` ` | +| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | `` | | XML_XMLLINT_ARGUMENTS | User custom arguments to add in linter CLI call
Ex: `-s --foo "bar"` | | | XML_XMLLINT_FILTER_REGEX_INCLUDE | Custom regex including filter
Ex: `(src\|lib)` | Include every file | | XML_XMLLINT_FILTER_REGEX_EXCLUDE | Custom regex excluding filter
Ex: `(test\|examples)` | Exclude no file | diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index d7b3f93e28e..3d76bf0d55c 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -111,24 +111,15 @@ def test_format_fix(self): config.get("DEFAULT_WORKSPACE").replace("\\", "/") + f"/{linter.test_folder}/*_fix_*.json", ) - + self.set_spell_config_values() utilstest.test_linter_format_fix(linter, self) def set_spell_config_values(self): if self.linter_name == "misspell": - config.set_value( - "SPELL_MISSPELL_FILE_EXTENSIONS", - [".js", ".md"] - ) + config.set_value("SPELL_MISSPELL_FILE_EXTENSIONS", [".js", ".md"]) if self.linter_name == "cspell": - config.set_value( - "SPELL_CSPELL_FILE_EXTENSIONS", - [".js", ".md"] - ) + config.set_value("SPELL_CSPELL_FILE_EXTENSIONS", [".js", ".md"]) if self.linter_name == "proselint": - config.set_value( - "SPELL_PROSELINT_FILE_EXTENSIONS", - [".js", ".md"] - ) + config.set_value("SPELL_PROSELINT_FILE_EXTENSIONS", [".js", ".md"]) From 05287840bb7cc3977d275b1cb7412ac438b172c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Thu, 9 Feb 2023 00:11:45 +0100 Subject: [PATCH 56/63] Try to fix test --- megalinter/tests/test_megalinter/helpers/utilstest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 0161a2c88ad..cd78f22f6d5 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -623,7 +623,9 @@ def test_linter_format_fix(linter, test_self): file_map = {} - for file in glob.iglob("{workspace}/**/*", recursive=True): + search_glob_pattern = workspace.replace("\\", "/") + "/**/*" + + for file in glob.iglob(search_glob_pattern, recursive=True): file_name = os.path.basename(file) _, file_extension = os.path.splitext(file_name) if ( @@ -638,6 +640,11 @@ def test_linter_format_fix(linter, test_self): content_expected = f_expected.read() file_map[file] = content_expected + if len(file_map) == 0: + raise Exception( + f"[test] No files found in: {workspace}" + ) + linter_name = linter.linter_name env_vars = { "APPLY_FIXES": linter.name, From 783157564da7c586c24d84d6caac8d4134fc2f5b Mon Sep 17 00:00:00 2001 From: bdovaz Date: Wed, 8 Feb 2023 23:31:21 +0000 Subject: [PATCH 57/63] [MegaLinter] Apply linters fixes --- megalinter/tests/test_megalinter/helpers/utilstest.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index cd78f22f6d5..44fc5039440 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -641,9 +641,7 @@ def test_linter_format_fix(linter, test_self): file_map[file] = content_expected if len(file_map) == 0: - raise Exception( - f"[test] No files found in: {workspace}" - ) + raise Exception(f"[test] No files found in: {workspace}") linter_name = linter.linter_name env_vars = { From f279421b5ca90b160725474c7529659ff9b45b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Mon, 13 Feb 2023 18:40:32 +0100 Subject: [PATCH 58/63] Decouple pre_test from core and move to linters --- .../javascript.megalinter-descriptor.yml | 3 +- .../spell.megalinter-descriptor.yml | 6 +- .../typescript.megalinter-descriptor.yml | 3 +- megalinter/linters/CSpellLinter.py | 3 + .../linters/JavaScriptStandardLinter.py | 24 ++++++++ megalinter/linters/MisspellLinter.py | 11 ++++ megalinter/linters/ProselintLinter.py | 11 ++++ .../linters/TypeScriptStandardLinter.py | 24 ++++++++ megalinter/linters/XmlLintLinter.py | 4 ++ .../tests/test_megalinter/LinterTestRoot.py | 55 ++----------------- .../test_megalinter/helpers/utilstest.py | 2 +- 11 files changed, 90 insertions(+), 56 deletions(-) create mode 100644 megalinter/linters/JavaScriptStandardLinter.py create mode 100644 megalinter/linters/MisspellLinter.py create mode 100644 megalinter/linters/ProselintLinter.py create mode 100644 megalinter/linters/TypeScriptStandardLinter.py diff --git a/megalinter/descriptors/javascript.megalinter-descriptor.yml b/megalinter/descriptors/javascript.megalinter-descriptor.yml index ce1fc89f4fb..fb72ecfef45 100644 --- a/megalinter/descriptors/javascript.megalinter-descriptor.yml +++ b/megalinter/descriptors/javascript.megalinter-descriptor.yml @@ -97,7 +97,8 @@ linters: - name: vscode-eslint url: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint # STANDARD - - linter_name: standard + - class: JavaScriptStandardLinter + linter_name: standard activation_rules: - type: variable variable: JAVASCRIPT_DEFAULT_STYLE diff --git a/megalinter/descriptors/spell.megalinter-descriptor.yml b/megalinter/descriptors/spell.megalinter-descriptor.yml index 767fcd59a0c..50e5eef28cd 100644 --- a/megalinter/descriptors/spell.megalinter-descriptor.yml +++ b/megalinter/descriptors/spell.megalinter-descriptor.yml @@ -6,7 +6,8 @@ descriptor_flavors: lint_all_other_linters_files: true linters: # MISSPELL - - linter_name: misspell + - class: MisspellLinter + linter_name: misspell name: SPELL_MISSPELL linter_text: misspell detects and corrects commonly misspelled english words linter_url: https://github.com/client9/misspell @@ -66,7 +67,8 @@ linters: - name: Code Spell Checker url: https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker # PROSELINT - - linter_name: proselint + - class: ProselintLinter + linter_name: proselint name: SPELL_PROSELINT lint_all_other_linters_files: false file_extensions: diff --git a/megalinter/descriptors/typescript.megalinter-descriptor.yml b/megalinter/descriptors/typescript.megalinter-descriptor.yml index a3d528a0828..2f731c3db19 100644 --- a/megalinter/descriptors/typescript.megalinter-descriptor.yml +++ b/megalinter/descriptors/typescript.megalinter-descriptor.yml @@ -98,7 +98,8 @@ linters: - name: vscode-eslint url: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint # STANDARD - - linter_name: standard + - class: TypeScriptStandardLinter + linter_name: standard activation_rules: - type: variable variable: JAVASCRIPT_DEFAULT_STYLE diff --git a/megalinter/linters/CSpellLinter.py b/megalinter/linters/CSpellLinter.py index 8e9578fa0d0..1af51f441d6 100644 --- a/megalinter/linters/CSpellLinter.py +++ b/megalinter/linters/CSpellLinter.py @@ -129,3 +129,6 @@ def complete_text_reporter_report(self, reporter_self): ] ) return additional_report.splitlines() + + def pre_test(self): + config.set_value("SPELL_CSPELL_FILE_EXTENSIONS", [".js", ".md"]) diff --git a/megalinter/linters/JavaScriptStandardLinter.py b/megalinter/linters/JavaScriptStandardLinter.py new file mode 100644 index 00000000000..be732ea7bd2 --- /dev/null +++ b/megalinter/linters/JavaScriptStandardLinter.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +""" +Use Standard to lint js files +https://github.com/standard/standard +""" +import os + +from megalinter import Linter + + +class JavaScriptStandardLinter(Linter): + def pre_test(self): + # The file must be in the root of the repository so we create it temporarily for the test. + # By default eslint ignores files starting with "." so we override this behavior + # to work with the .automation folder + with open( + os.path.join(os.getcwd(), ".eslintignore"), + "w", + encoding="utf-8", + ) as f: + f.write("!.automation") + + def post_test(self): + os.remove(os.path.join(os.getcwd(), ".eslintignore")) diff --git a/megalinter/linters/MisspellLinter.py b/megalinter/linters/MisspellLinter.py new file mode 100644 index 00000000000..a18155cb892 --- /dev/null +++ b/megalinter/linters/MisspellLinter.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 +""" +Use Misspell to fix ommonly misspelled English words +https://github.com/client9/misspell +""" +from megalinter import config, Linter + + +class MisspellLinter(Linter): + def pre_test(self): + config.set_value("SPELL_MISSPELL_FILE_EXTENSIONS", [".js", ".md"]) diff --git a/megalinter/linters/ProselintLinter.py b/megalinter/linters/ProselintLinter.py new file mode 100644 index 00000000000..0c30b784304 --- /dev/null +++ b/megalinter/linters/ProselintLinter.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 +""" +Use Proselint to check spell in files +https://github.com/amperser/proselint +""" +from megalinter import config, Linter + + +class ProselintLinter(Linter): + def pre_test(self): + config.set_value("SPELL_PROSELINT_FILE_EXTENSIONS", [".js", ".md"]) diff --git a/megalinter/linters/TypeScriptStandardLinter.py b/megalinter/linters/TypeScriptStandardLinter.py new file mode 100644 index 00000000000..753d059dcfe --- /dev/null +++ b/megalinter/linters/TypeScriptStandardLinter.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +""" +Use Standard to lint js files +https://github.com/standard/standard +""" +import os + +from megalinter import Linter + + +class TypeScriptStandardLinter(Linter): + def pre_test(self): + # The file must be in the root of the repository so we create it temporarily for the test. + # By default eslint ignores files starting with "." so we override this behavior + # to work with the .automation folder + with open( + os.path.join(os.getcwd(), ".eslintignore"), + "w", + encoding="utf-8", + ) as f: + f.write("!.automation") + + def post_test(self): + os.remove(os.path.join(os.getcwd(), ".eslintignore")) diff --git a/megalinter/linters/XmlLintLinter.py b/megalinter/linters/XmlLintLinter.py index d6348c5e6b4..1d2a91c6953 100644 --- a/megalinter/linters/XmlLintLinter.py +++ b/megalinter/linters/XmlLintLinter.py @@ -27,3 +27,7 @@ def build_lint_command(self, file=None): f"You can not apply_fixes with cli_lint_mode {self.cli_lint_mode}" ) return cmd + + def pre_test(self): + config.set_value("XML_XMLLINT_AUTOFORMAT", "true") + config.set_value("XML_XMLLINT_CLI_LINT_MODE", "file") diff --git a/megalinter/tests/test_megalinter/LinterTestRoot.py b/megalinter/tests/test_megalinter/LinterTestRoot.py index 3d76bf0d55c..122a3e42723 100644 --- a/megalinter/tests/test_megalinter/LinterTestRoot.py +++ b/megalinter/tests/test_megalinter/LinterTestRoot.py @@ -4,7 +4,7 @@ """ from typing import Optional -from megalinter import config, linter_factory +from megalinter import linter_factory from megalinter.tests.test_megalinter.helpers import utilstest @@ -30,9 +30,6 @@ def get_linter_instance(self): def test_success(self): utilstest.linter_test_setup() - - self.set_spell_config_values() - linter = self.get_linter_instance() linter.pre_test() utilstest.test_linter_success(linter, self) @@ -40,9 +37,6 @@ def test_success(self): def test_failure(self): utilstest.linter_test_setup() - - self.set_spell_config_values() - linter = self.get_linter_instance() linter.pre_test() utilstest.test_linter_failure(linter, self) @@ -73,53 +67,12 @@ def test_report_sarif(self): utilstest.linter_test_setup({"report_type": "SARIF"}) linter = self.get_linter_instance() linter.pre_test() - utilstest.test_linter_report_sarif(self.get_linter_instance(), self) + utilstest.test_linter_report_sarif(linter, self) linter.post_test() def test_format_fix(self): utilstest.linter_test_setup() - - if self.linter_name == "prettier": - config.set_value("JAVASCRIPT_DEFAULT_STYLE", "prettier") - - if self.descriptor_id == "JAVASCRIPT" and self.linter_name == "standard": - config.set_value("JAVASCRIPT_DEFAULT_STYLE", "standard") - - if self.linter_name == "xmllint": - config.set_value("XML_XMLLINT_AUTOFORMAT", "true") - config.set_value("XML_XMLLINT_CLI_LINT_MODE", "file") - linter = self.get_linter_instance() - - if self.descriptor_id == "JAVASCRIPT" and self.linter_name == "standard": - config.set_value( - "JAVASCRIPT_STANDARD_ARGUMENTS", - config.get("DEFAULT_WORKSPACE").replace("\\", "/") - + f"/{linter.test_folder}/*_fix_*.js", - ) - - if self.descriptor_id == "TYPESCRIPT" and self.linter_name == "standard": - config.set_value( - "TYPESCRIPT_STANDARD_ARGUMENTS", - config.get("DEFAULT_WORKSPACE").replace("\\", "/") - + f"/{linter.test_folder}/*_fix_*.ts", - ) - - if self.linter_name == "eslint-plugin-jsonc": - config.set_value( - "JSON_ESLINT_PLUGIN_JSONC_ARGUMENTS", - config.get("DEFAULT_WORKSPACE").replace("\\", "/") - + f"/{linter.test_folder}/*_fix_*.json", - ) - - self.set_spell_config_values() - + linter.pre_test() utilstest.test_linter_format_fix(linter, self) - - def set_spell_config_values(self): - if self.linter_name == "misspell": - config.set_value("SPELL_MISSPELL_FILE_EXTENSIONS", [".js", ".md"]) - if self.linter_name == "cspell": - config.set_value("SPELL_CSPELL_FILE_EXTENSIONS", [".js", ".md"]) - if self.linter_name == "proselint": - config.set_value("SPELL_PROSELINT_FILE_EXTENSIONS", [".js", ".md"]) + linter.post_test() diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 44fc5039440..0908ff64a11 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -633,7 +633,7 @@ def test_linter_format_fix(linter, test_self): and file_extension not in linter.file_extensions ): continue - elif "fix" not in file_name: + elif "_fix_" not in file_name: continue with open(file, "r", encoding="utf-8") as f_expected: From 025dcb8a1086c18bc65e9cd88e11c2f4c3ea4d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Mon, 13 Feb 2023 18:53:33 +0100 Subject: [PATCH 59/63] Fix linter errors --- megalinter/linters/JavaScriptStandardLinter.py | 15 +++------------ megalinter/linters/MisspellLinter.py | 2 +- megalinter/linters/TypeScriptStandardLinter.py | 15 +++------------ .../tests/test_megalinter/helpers/utilstest.py | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/megalinter/linters/JavaScriptStandardLinter.py b/megalinter/linters/JavaScriptStandardLinter.py index be732ea7bd2..2a1df245f3f 100644 --- a/megalinter/linters/JavaScriptStandardLinter.py +++ b/megalinter/linters/JavaScriptStandardLinter.py @@ -3,22 +3,13 @@ Use Standard to lint js files https://github.com/standard/standard """ -import os - from megalinter import Linter +from megalinter.tests.test_megalinter.helpers import utilstest class JavaScriptStandardLinter(Linter): def pre_test(self): - # The file must be in the root of the repository so we create it temporarily for the test. - # By default eslint ignores files starting with "." so we override this behavior - # to work with the .automation folder - with open( - os.path.join(os.getcwd(), ".eslintignore"), - "w", - encoding="utf-8", - ) as f: - f.write("!.automation") + utilstest.write_eslintignore() def post_test(self): - os.remove(os.path.join(os.getcwd(), ".eslintignore")) + utilstest.delete_eslintignore() diff --git a/megalinter/linters/MisspellLinter.py b/megalinter/linters/MisspellLinter.py index a18155cb892..f35989830b0 100644 --- a/megalinter/linters/MisspellLinter.py +++ b/megalinter/linters/MisspellLinter.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Use Misspell to fix ommonly misspelled English words +Use Misspell to fix commonly misspelled English words https://github.com/client9/misspell """ from megalinter import config, Linter diff --git a/megalinter/linters/TypeScriptStandardLinter.py b/megalinter/linters/TypeScriptStandardLinter.py index 753d059dcfe..1eee5e54f86 100644 --- a/megalinter/linters/TypeScriptStandardLinter.py +++ b/megalinter/linters/TypeScriptStandardLinter.py @@ -3,22 +3,13 @@ Use Standard to lint js files https://github.com/standard/standard """ -import os - from megalinter import Linter +from megalinter.tests.test_megalinter.helpers import utilstest class TypeScriptStandardLinter(Linter): def pre_test(self): - # The file must be in the root of the repository so we create it temporarily for the test. - # By default eslint ignores files starting with "." so we override this behavior - # to work with the .automation folder - with open( - os.path.join(os.getcwd(), ".eslintignore"), - "w", - encoding="utf-8", - ) as f: - f.write("!.automation") + utilstest.write_eslintignore() def post_test(self): - os.remove(os.path.join(os.getcwd(), ".eslintignore")) + utilstest.delete_eslintignore() diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index 0908ff64a11..d7e5d209dd1 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -702,3 +702,17 @@ def test_linter_format_fix(linter, test_self): repo.index.checkout( [os.path.join(os.path.realpath(REPO_HOME), file)], force=True ) + +def write_eslintignore(): + # The file must be in the root of the repository so we create it temporarily for the test. + # By default eslint ignores files starting with "." so we override this behavior + # to work with the .automation folder + with open( + os.path.join(os.getcwd(), ".eslintignore"), + "w", + encoding="utf-8", + ) as f: + f.write("!.automation") + +def delete_eslintignore(): + os.remove(os.path.join(os.getcwd(), ".eslintignore")) From 817a447d13e18af52e8dc328d7ac28aaa06856da Mon Sep 17 00:00:00 2001 From: bdovaz Date: Mon, 13 Feb 2023 17:58:08 +0000 Subject: [PATCH 60/63] [MegaLinter] Apply linters fixes --- megalinter/linters/MisspellLinter.py | 2 +- megalinter/linters/ProselintLinter.py | 2 +- megalinter/tests/test_megalinter/helpers/utilstest.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/megalinter/linters/MisspellLinter.py b/megalinter/linters/MisspellLinter.py index f35989830b0..e39804f3fab 100644 --- a/megalinter/linters/MisspellLinter.py +++ b/megalinter/linters/MisspellLinter.py @@ -3,7 +3,7 @@ Use Misspell to fix commonly misspelled English words https://github.com/client9/misspell """ -from megalinter import config, Linter +from megalinter import Linter, config class MisspellLinter(Linter): diff --git a/megalinter/linters/ProselintLinter.py b/megalinter/linters/ProselintLinter.py index 0c30b784304..cfdabf070e2 100644 --- a/megalinter/linters/ProselintLinter.py +++ b/megalinter/linters/ProselintLinter.py @@ -3,7 +3,7 @@ Use Proselint to check spell in files https://github.com/amperser/proselint """ -from megalinter import config, Linter +from megalinter import Linter, config class ProselintLinter(Linter): diff --git a/megalinter/tests/test_megalinter/helpers/utilstest.py b/megalinter/tests/test_megalinter/helpers/utilstest.py index d7e5d209dd1..62b37c73a14 100644 --- a/megalinter/tests/test_megalinter/helpers/utilstest.py +++ b/megalinter/tests/test_megalinter/helpers/utilstest.py @@ -703,6 +703,7 @@ def test_linter_format_fix(linter, test_self): [os.path.join(os.path.realpath(REPO_HOME), file)], force=True ) + def write_eslintignore(): # The file must be in the root of the repository so we create it temporarily for the test. # By default eslint ignores files starting with "." so we override this behavior @@ -714,5 +715,6 @@ def write_eslintignore(): ) as f: f.write("!.automation") + def delete_eslintignore(): os.remove(os.path.join(os.getcwd(), ".eslintignore")) From d9f82f1a69096efd85612b06d724af1e03a90159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Mon, 13 Feb 2023 22:54:42 +0100 Subject: [PATCH 61/63] Update Dockerfiles --- linters/action_actionlint/Dockerfile | 4 ++-- linters/arm_arm_ttk/Dockerfile | 11 +++++++---- linters/bash_exec/Dockerfile | 4 ++-- linters/bash_shfmt/Dockerfile | 4 ++-- linters/bicep_bicep_linter/Dockerfile | 4 ++-- linters/c_cpplint/Dockerfile | 4 ++-- linters/clojure_clj_kondo/Dockerfile | 4 ++-- linters/coffee_coffeelint/Dockerfile | 6 +++--- linters/copypaste_jscpd/Dockerfile | 8 ++++---- linters/cpp_cpplint/Dockerfile | 4 ++-- linters/csharp_csharpier/Dockerfile | 4 ++-- linters/csharp_dotnet_format/Dockerfile | 4 ++-- linters/css_scss_lint/Dockerfile | 4 ++-- linters/css_stylelint/Dockerfile | 6 +++--- linters/dart_dartanalyzer/Dockerfile | 4 ++-- .../editorconfig_editorconfig_checker/Dockerfile | 6 +++--- linters/env_dotenv_linter/Dockerfile | 4 ++-- linters/gherkin_gherkin_lint/Dockerfile | 6 +++--- linters/go_golangci_lint/Dockerfile | 4 ++-- linters/graphql_graphql_schema_linter/Dockerfile | 6 +++--- linters/html_djlint/Dockerfile | 4 ++-- linters/html_htmlhint/Dockerfile | 6 +++--- linters/javascript_prettier/Dockerfile | 6 +++--- linters/javascript_standard/Dockerfile | 6 +++--- linters/json_jsonlint/Dockerfile | 6 +++--- linters/json_npm_package_json_lint/Dockerfile | 6 +++--- linters/json_prettier/Dockerfile | 6 +++--- linters/json_v8r/Dockerfile | 6 +++--- linters/kubernetes_kubeconform/Dockerfile | 4 ++-- linters/kubernetes_kubeval/Dockerfile | 4 ++-- linters/latex_chktex/Dockerfile | 4 ++-- linters/lua_luacheck/Dockerfile | 4 ++-- linters/makefile_checkmake/Dockerfile | 4 ++-- linters/markdown_markdown_link_check/Dockerfile | 6 +++--- .../markdown_markdown_table_formatter/Dockerfile | 6 +++--- linters/markdown_markdownlint/Dockerfile | 6 +++--- linters/markdown_remark_lint/Dockerfile | 6 +++--- linters/openapi_spectral/Dockerfile | 8 ++++---- linters/perl_perlcritic/Dockerfile | 4 ++-- linters/php_phpcs/Dockerfile | 10 ++++++---- linters/php_phplint/Dockerfile | 8 +++++--- linters/php_phpstan/Dockerfile | 10 ++++++---- linters/powershell_powershell/Dockerfile | 16 ++++++++++------ .../powershell_powershell_formatter/Dockerfile | 16 ++++++++++------ linters/protobuf_protolint/Dockerfile | 4 ++-- linters/puppet_puppet_lint/Dockerfile | 4 ++-- linters/python_black/Dockerfile | 4 ++-- linters/python_flake8/Dockerfile | 4 ++-- linters/python_isort/Dockerfile | 4 ++-- linters/python_mypy/Dockerfile | 4 ++-- linters/python_pylint/Dockerfile | 4 ++-- linters/python_pyright/Dockerfile | 6 +++--- linters/r_lintr/Dockerfile | 4 ++-- linters/raku_raku/Dockerfile | 4 ++-- linters/repository_git_diff/Dockerfile | 4 ++-- linters/repository_goodcheck/Dockerfile | 4 ++-- linters/rst_rst_lint/Dockerfile | 4 ++-- linters/rst_rstcheck/Dockerfile | 4 ++-- linters/rst_rstfmt/Dockerfile | 4 ++-- linters/ruby_rubocop/Dockerfile | 4 ++-- linters/rust_clippy/Dockerfile | 4 ++-- linters/salesforce_sfdx_scanner_apex/Dockerfile | 6 +++--- linters/salesforce_sfdx_scanner_aura/Dockerfile | 6 +++--- linters/salesforce_sfdx_scanner_lwc/Dockerfile | 6 +++--- linters/scala_scalafix/Dockerfile | 4 ++-- linters/snakemake_lint/Dockerfile | 4 ++-- linters/snakemake_snakefmt/Dockerfile | 4 ++-- linters/spell_cspell/Dockerfile | 6 +++--- linters/spell_misspell/Dockerfile | 4 ++-- linters/spell_proselint/Dockerfile | 4 ++-- linters/sql_sql_lint/Dockerfile | 6 +++--- linters/sql_sqlfluff/Dockerfile | 4 ++-- linters/sql_tsqllint/Dockerfile | 4 ++-- linters/swift_swiftlint/Dockerfile | 4 ++-- linters/tekton_tekton_lint/Dockerfile | 6 +++--- linters/terraform_kics/Dockerfile | 4 ++-- linters/terraform_terraform_fmt/Dockerfile | 4 ++-- linters/terraform_terragrunt/Dockerfile | 4 ++-- linters/typescript_prettier/Dockerfile | 6 +++--- linters/typescript_standard/Dockerfile | 6 +++--- linters/vbdotnet_dotnet_format/Dockerfile | 4 ++-- linters/xml_xmllint/Dockerfile | 4 ++-- linters/yaml_prettier/Dockerfile | 6 +++--- linters/yaml_v8r/Dockerfile | 6 +++--- linters/yaml_yamllint/Dockerfile | 4 ++-- 85 files changed, 233 insertions(+), 216 deletions(-) diff --git a/linters/action_actionlint/Dockerfile b/linters/action_actionlint/Dockerfile index 65e788fb066..9637ac63a03 100644 --- a/linters/action_actionlint/Dockerfile +++ b/linters/action_actionlint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/arm_arm_ttk/Dockerfile b/linters/arm_arm_ttk/Dockerfile index 8bd85da78b4..97f891e9194 100644 --- a/linters/arm_arm_ttk/Dockerfile +++ b/linters/arm_arm_ttk/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -127,8 +127,11 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # ARM installation -RUN mkdir -p ${PWSH_DIRECTORY} \ - && curl --retry 5 --retry-delay 5 -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \ +RUN --mount=type=secret,id=GITHUB_TOKEN mkdir -p ${PWSH_DIRECTORY} \ + && curl --retry 5 --retry-delay 5 -s \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $(cat /run/secrets/GITHUB_TOKEN)" \ + https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \ | grep browser_download_url \ | grep linux-alpine-x64 \ | cut -d '"' -f 4 \ diff --git a/linters/bash_exec/Dockerfile b/linters/bash_exec/Dockerfile index 6660ff5dbf5..7350258ac55 100644 --- a/linters/bash_exec/Dockerfile +++ b/linters/bash_exec/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/bash_shfmt/Dockerfile b/linters/bash_shfmt/Dockerfile index d1365f3e93c..b4634319892 100644 --- a/linters/bash_shfmt/Dockerfile +++ b/linters/bash_shfmt/Dockerfile @@ -16,8 +16,8 @@ FROM mvdan/shfmt:latest-alpine as shfmt ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/bicep_bicep_linter/Dockerfile b/linters/bicep_bicep_linter/Dockerfile index 7b6ed93035d..327a410f786 100644 --- a/linters/bicep_bicep_linter/Dockerfile +++ b/linters/bicep_bicep_linter/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/c_cpplint/Dockerfile b/linters/c_cpplint/Dockerfile index 600c89618bf..ffaa660617f 100644 --- a/linters/c_cpplint/Dockerfile +++ b/linters/c_cpplint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/clojure_clj_kondo/Dockerfile b/linters/clojure_clj_kondo/Dockerfile index fc354968ef8..5e48e5d9c9e 100644 --- a/linters/clojure_clj_kondo/Dockerfile +++ b/linters/clojure_clj_kondo/Dockerfile @@ -16,8 +16,8 @@ FROM cljkondo/clj-kondo:2023.01.20-alpine as clj-kondo ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/coffee_coffeelint/Dockerfile b/linters/coffee_coffeelint/Dockerfile index 6bfb2cce27c..254f8e83280 100644 --- a/linters/coffee_coffeelint/Dockerfile +++ b/linters/coffee_coffeelint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ @coffeelint/cli && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/copypaste_jscpd/Dockerfile b/linters/copypaste_jscpd/Dockerfile index de14fd29263..0ae8b9c358c 100644 --- a/linters/copypaste_jscpd/Dockerfile +++ b/linters/copypaste_jscpd/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -85,8 +85,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ - jscpd@3.3.26 && \ +RUN npm --no-cache install --force --ignore-scripts \ + jscpd && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ && rm -rf /root/.npm/_cacache \ diff --git a/linters/cpp_cpplint/Dockerfile b/linters/cpp_cpplint/Dockerfile index 978611245e5..2e62cd0235e 100644 --- a/linters/cpp_cpplint/Dockerfile +++ b/linters/cpp_cpplint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/csharp_csharpier/Dockerfile b/linters/csharp_csharpier/Dockerfile index 0a4ef6d64e9..a05fa9000ac 100644 --- a/linters/csharp_csharpier/Dockerfile +++ b/linters/csharp_csharpier/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/csharp_dotnet_format/Dockerfile b/linters/csharp_dotnet_format/Dockerfile index 59c6255e7bf..091728b6864 100644 --- a/linters/csharp_dotnet_format/Dockerfile +++ b/linters/csharp_dotnet_format/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/css_scss_lint/Dockerfile b/linters/css_scss_lint/Dockerfile index 26b7c5315d8..79c8066286c 100644 --- a/linters/css_scss_lint/Dockerfile +++ b/linters/css_scss_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/css_stylelint/Dockerfile b/linters/css_stylelint/Dockerfile index 90596179cec..6b3c6ed7848 100644 --- a/linters/css_stylelint/Dockerfile +++ b/linters/css_stylelint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ stylelint \ stylelint-config-standard \ stylelint-config-sass-guidelines \ diff --git a/linters/dart_dartanalyzer/Dockerfile b/linters/dart_dartanalyzer/Dockerfile index 5cebe9340db..3500bca11a6 100644 --- a/linters/dart_dartanalyzer/Dockerfile +++ b/linters/dart_dartanalyzer/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/editorconfig_editorconfig_checker/Dockerfile b/linters/editorconfig_editorconfig_checker/Dockerfile index ef4192dbd41..9188e66a5e6 100644 --- a/linters/editorconfig_editorconfig_checker/Dockerfile +++ b/linters/editorconfig_editorconfig_checker/Dockerfile @@ -10,14 +10,14 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM mstruebing/editorconfig-checker:2.4.0 as editorconfig-checker +FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker #FROM__END ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/env_dotenv_linter/Dockerfile b/linters/env_dotenv_linter/Dockerfile index aaf23e6aaf0..7023184beba 100644 --- a/linters/env_dotenv_linter/Dockerfile +++ b/linters/env_dotenv_linter/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/gherkin_gherkin_lint/Dockerfile b/linters/gherkin_gherkin_lint/Dockerfile index b9d83b7b439..cad1d9fe928 100644 --- a/linters/gherkin_gherkin_lint/Dockerfile +++ b/linters/gherkin_gherkin_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ gherkin-lint && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/go_golangci_lint/Dockerfile b/linters/go_golangci_lint/Dockerfile index 23605f526e4..712074a301b 100644 --- a/linters/go_golangci_lint/Dockerfile +++ b/linters/go_golangci_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/graphql_graphql_schema_linter/Dockerfile b/linters/graphql_graphql_schema_linter/Dockerfile index 174405917b7..565b5a23c67 100644 --- a/linters/graphql_graphql_schema_linter/Dockerfile +++ b/linters/graphql_graphql_schema_linter/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ graphql \ graphql-schema-linter && \ npm audit fix --audit-level=critical || true \ diff --git a/linters/html_djlint/Dockerfile b/linters/html_djlint/Dockerfile index 407e47ff8d2..24d1561f6e4 100644 --- a/linters/html_djlint/Dockerfile +++ b/linters/html_djlint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/html_htmlhint/Dockerfile b/linters/html_htmlhint/Dockerfile index c7d3faf20a9..dd248e25044 100644 --- a/linters/html_htmlhint/Dockerfile +++ b/linters/html_htmlhint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ htmlhint && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/javascript_prettier/Dockerfile b/linters/javascript_prettier/Dockerfile index eedd92b27ce..6d974a979ed 100644 --- a/linters/javascript_prettier/Dockerfile +++ b/linters/javascript_prettier/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ prettier && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/javascript_standard/Dockerfile b/linters/javascript_standard/Dockerfile index 6955d171d20..ef0fde8c332 100644 --- a/linters/javascript_standard/Dockerfile +++ b/linters/javascript_standard/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ standard && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/json_jsonlint/Dockerfile b/linters/json_jsonlint/Dockerfile index 9400b05ac9a..90422e71b2a 100644 --- a/linters/json_jsonlint/Dockerfile +++ b/linters/json_jsonlint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ @prantlf/jsonlint && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/json_npm_package_json_lint/Dockerfile b/linters/json_npm_package_json_lint/Dockerfile index 550656ed8c7..d89e4b82670 100644 --- a/linters/json_npm_package_json_lint/Dockerfile +++ b/linters/json_npm_package_json_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ npm-package-json-lint \ npm-package-json-lint-config-default && \ npm audit fix --audit-level=critical || true \ diff --git a/linters/json_prettier/Dockerfile b/linters/json_prettier/Dockerfile index 03d81dcfbcb..ccea1450e3f 100644 --- a/linters/json_prettier/Dockerfile +++ b/linters/json_prettier/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ prettier && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/json_v8r/Dockerfile b/linters/json_v8r/Dockerfile index 78d7083f550..9a8df024577 100644 --- a/linters/json_v8r/Dockerfile +++ b/linters/json_v8r/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ v8r && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/kubernetes_kubeconform/Dockerfile b/linters/kubernetes_kubeconform/Dockerfile index 73421679b0f..f092e5128cc 100644 --- a/linters/kubernetes_kubeconform/Dockerfile +++ b/linters/kubernetes_kubeconform/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/kubernetes_kubeval/Dockerfile b/linters/kubernetes_kubeval/Dockerfile index 269e0afea66..fc7dfe8a21d 100644 --- a/linters/kubernetes_kubeval/Dockerfile +++ b/linters/kubernetes_kubeval/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/latex_chktex/Dockerfile b/linters/latex_chktex/Dockerfile index 41960148fba..1b95712b4b7 100644 --- a/linters/latex_chktex/Dockerfile +++ b/linters/latex_chktex/Dockerfile @@ -16,8 +16,8 @@ FROM ghcr.io/assignuser/chktex-alpine:latest as chktex ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/lua_luacheck/Dockerfile b/linters/lua_luacheck/Dockerfile index 902d0050795..76fc2fb94e1 100644 --- a/linters/lua_luacheck/Dockerfile +++ b/linters/lua_luacheck/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/makefile_checkmake/Dockerfile b/linters/makefile_checkmake/Dockerfile index 58d1c51bafc..b6a85be7ba2 100644 --- a/linters/makefile_checkmake/Dockerfile +++ b/linters/makefile_checkmake/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/markdown_markdown_link_check/Dockerfile b/linters/markdown_markdown_link_check/Dockerfile index 184454d6988..2d29db31fd6 100644 --- a/linters/markdown_markdown_link_check/Dockerfile +++ b/linters/markdown_markdown_link_check/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ markdown-link-check && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/markdown_markdown_table_formatter/Dockerfile b/linters/markdown_markdown_table_formatter/Dockerfile index 68e96fb4f88..4ddac0f0078 100644 --- a/linters/markdown_markdown_table_formatter/Dockerfile +++ b/linters/markdown_markdown_table_formatter/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ markdown-table-formatter && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/markdown_markdownlint/Dockerfile b/linters/markdown_markdownlint/Dockerfile index 36767064b9f..37fd7b1bbe2 100644 --- a/linters/markdown_markdownlint/Dockerfile +++ b/linters/markdown_markdownlint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ markdownlint-cli && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/markdown_remark_lint/Dockerfile b/linters/markdown_remark_lint/Dockerfile index bfeea44a600..d403e69b831 100644 --- a/linters/markdown_remark_lint/Dockerfile +++ b/linters/markdown_remark_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ remark-cli \ remark-preset-lint-recommended && \ npm audit fix --audit-level=critical || true \ diff --git a/linters/openapi_spectral/Dockerfile b/linters/openapi_spectral/Dockerfile index 453de8c69cb..8186b1604dc 100644 --- a/linters/openapi_spectral/Dockerfile +++ b/linters/openapi_spectral/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,8 +84,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ - @stoplight/spectral@5.6.0 && \ +RUN npm --no-cache install --force --ignore-scripts \ + @stoplight/spectral-cli && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ && rm -rf /root/.npm/_cacache \ diff --git a/linters/perl_perlcritic/Dockerfile b/linters/perl_perlcritic/Dockerfile index 8590528c314..bfae4ff795c 100644 --- a/linters/perl_perlcritic/Dockerfile +++ b/linters/perl_perlcritic/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/php_phpcs/Dockerfile b/linters/php_phpcs/Dockerfile index f9d4700b4a6..a5950c0f701 100644 --- a/linters/php_phpcs/Dockerfile +++ b/linters/php_phpcs/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -134,7 +134,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # PHP installation -RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ +RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" \ + && export GITHUB_AUTH_TOKEN \ + && wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ && wget --tries=5 -q -O phive.phar.asc https://phar.io/releases/phive.phar.asc \ && PHAR_KEY_ID="0x9D8A98B29B2D5D79" \ && ( gpg --keyserver keyserver.pgp.com --recv-keys "$PHAR_KEY_ID" \ @@ -150,7 +152,7 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ ENV PATH="/root/.composer/vendor/bin:$PATH" # phpcs installation -RUN phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192 +RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192 #OTHER__END diff --git a/linters/php_phplint/Dockerfile b/linters/php_phplint/Dockerfile index 1c9b5a9e67e..d54e64ec2fa 100644 --- a/linters/php_phplint/Dockerfile +++ b/linters/php_phplint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -134,7 +134,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # PHP installation -RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ +RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" \ + && export GITHUB_AUTH_TOKEN \ + && wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ && wget --tries=5 -q -O phive.phar.asc https://phar.io/releases/phive.phar.asc \ && PHAR_KEY_ID="0x9D8A98B29B2D5D79" \ && ( gpg --keyserver keyserver.pgp.com --recv-keys "$PHAR_KEY_ID" \ diff --git a/linters/php_phpstan/Dockerfile b/linters/php_phpstan/Dockerfile index 73fb012034c..c0dc5c090a3 100644 --- a/linters/php_phpstan/Dockerfile +++ b/linters/php_phpstan/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -134,7 +134,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # PHP installation -RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ +RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" \ + && export GITHUB_AUTH_TOKEN \ + && wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ && wget --tries=5 -q -O phive.phar.asc https://phar.io/releases/phive.phar.asc \ && PHAR_KEY_ID="0x9D8A98B29B2D5D79" \ && ( gpg --keyserver keyserver.pgp.com --recv-keys "$PHAR_KEY_ID" \ @@ -150,7 +152,7 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ ENV PATH="/root/.composer/vendor/bin:$PATH" # phpstan installation -RUN phive --no-progress install phpstan -g --trust-gpg-keys CF1A108D0E7AE720 +RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpstan -g --trust-gpg-keys CF1A108D0E7AE720 #OTHER__END diff --git a/linters/powershell_powershell/Dockerfile b/linters/powershell_powershell/Dockerfile index ccbb6cd5a51..aaeb579ea05 100644 --- a/linters/powershell_powershell/Dockerfile +++ b/linters/powershell_powershell/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -125,18 +125,22 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # POWERSHELL installation -RUN mkdir -p ${PWSH_DIRECTORY} \ - && curl --retry 5 --retry-delay 5 -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \ +RUN --mount=type=secret,id=GITHUB_TOKEN mkdir -p ${PWSH_DIRECTORY} \ + && curl --retry 5 --retry-delay 5 -s \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $(cat /run/secrets/GITHUB_TOKEN)" \ + https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \ | grep browser_download_url \ | grep linux-alpine-x64 \ | cut -d '"' -f 4 \ | xargs -n 1 wget -O - \ | tar -xzC ${PWSH_DIRECTORY} \ && ln -sf ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh \ - && chmod +x /usr/bin/pwsh \ + && chmod +x /usr/bin/pwsh + # powershell installation - && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' +RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' #OTHER__END diff --git a/linters/powershell_powershell_formatter/Dockerfile b/linters/powershell_powershell_formatter/Dockerfile index b56d52966d5..84f62455be0 100644 --- a/linters/powershell_powershell_formatter/Dockerfile +++ b/linters/powershell_powershell_formatter/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -125,18 +125,22 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # POWERSHELL installation -RUN mkdir -p ${PWSH_DIRECTORY} \ - && curl --retry 5 --retry-delay 5 -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \ +RUN --mount=type=secret,id=GITHUB_TOKEN mkdir -p ${PWSH_DIRECTORY} \ + && curl --retry 5 --retry-delay 5 -s \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $(cat /run/secrets/GITHUB_TOKEN)" \ + https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \ | grep browser_download_url \ | grep linux-alpine-x64 \ | cut -d '"' -f 4 \ | xargs -n 1 wget -O - \ | tar -xzC ${PWSH_DIRECTORY} \ && ln -sf ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh \ - && chmod +x /usr/bin/pwsh \ + && chmod +x /usr/bin/pwsh + # powershell_formatter installation - && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' +RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' #OTHER__END diff --git a/linters/protobuf_protolint/Dockerfile b/linters/protobuf_protolint/Dockerfile index 352a433585f..2092d97336e 100644 --- a/linters/protobuf_protolint/Dockerfile +++ b/linters/protobuf_protolint/Dockerfile @@ -16,8 +16,8 @@ FROM yoheimuta/protolint:latest as protolint ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/puppet_puppet_lint/Dockerfile b/linters/puppet_puppet_lint/Dockerfile index 97bb6d1c5a3..3c8191a8395 100644 --- a/linters/puppet_puppet_lint/Dockerfile +++ b/linters/puppet_puppet_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_black/Dockerfile b/linters/python_black/Dockerfile index 511838b15d1..b366527492d 100644 --- a/linters/python_black/Dockerfile +++ b/linters/python_black/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_flake8/Dockerfile b/linters/python_flake8/Dockerfile index 4f0607b030d..c0fdf8685d7 100644 --- a/linters/python_flake8/Dockerfile +++ b/linters/python_flake8/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_isort/Dockerfile b/linters/python_isort/Dockerfile index d50c29af0d1..fcf914c93f2 100644 --- a/linters/python_isort/Dockerfile +++ b/linters/python_isort/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_mypy/Dockerfile b/linters/python_mypy/Dockerfile index c4ac6070de5..c7b4114ba7f 100644 --- a/linters/python_mypy/Dockerfile +++ b/linters/python_mypy/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_pylint/Dockerfile b/linters/python_pylint/Dockerfile index b3b29f0fe4d..7c8cd2869aa 100644 --- a/linters/python_pylint/Dockerfile +++ b/linters/python_pylint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_pyright/Dockerfile b/linters/python_pyright/Dockerfile index 5fa4b6d0d32..8ff2432e11f 100644 --- a/linters/python_pyright/Dockerfile +++ b/linters/python_pyright/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -69,7 +69,7 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ #PIPVENV__START RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ - && mkdir -p "/venvs/pyright" && cd "/venvs/pyright" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir pyright==1.1.270 && deactivate && cd ./../.. \ + && mkdir -p "/venvs/pyright" && cd "/venvs/pyright" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir pyright && deactivate && cd ./../.. \ && find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache ENV PATH="${PATH}":/venvs/pyright/bin #PIPVENV__END diff --git a/linters/r_lintr/Dockerfile b/linters/r_lintr/Dockerfile index a7a5fd84aa7..16b84aeddda 100644 --- a/linters/r_lintr/Dockerfile +++ b/linters/r_lintr/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/raku_raku/Dockerfile b/linters/raku_raku/Dockerfile index 1f81f8b0d02..d22de046e56 100644 --- a/linters/raku_raku/Dockerfile +++ b/linters/raku_raku/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_git_diff/Dockerfile b/linters/repository_git_diff/Dockerfile index a17e920363c..c4e2543e76e 100644 --- a/linters/repository_git_diff/Dockerfile +++ b/linters/repository_git_diff/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_goodcheck/Dockerfile b/linters/repository_goodcheck/Dockerfile index 68dbf9e1c9e..77acbf553bc 100644 --- a/linters/repository_goodcheck/Dockerfile +++ b/linters/repository_goodcheck/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/rst_rst_lint/Dockerfile b/linters/rst_rst_lint/Dockerfile index a801e0de378..ce68a79a94b 100644 --- a/linters/rst_rst_lint/Dockerfile +++ b/linters/rst_rst_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/rst_rstcheck/Dockerfile b/linters/rst_rstcheck/Dockerfile index bc654221ae7..bc4d1534709 100644 --- a/linters/rst_rstcheck/Dockerfile +++ b/linters/rst_rstcheck/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/rst_rstfmt/Dockerfile b/linters/rst_rstfmt/Dockerfile index c13d88b9e3b..0ca3d9b1466 100644 --- a/linters/rst_rstfmt/Dockerfile +++ b/linters/rst_rstfmt/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/ruby_rubocop/Dockerfile b/linters/ruby_rubocop/Dockerfile index 1f73a235653..13732e02398 100644 --- a/linters/ruby_rubocop/Dockerfile +++ b/linters/ruby_rubocop/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/rust_clippy/Dockerfile b/linters/rust_clippy/Dockerfile index 99c41cdd2d8..1bc8e4c6bab 100644 --- a/linters/rust_clippy/Dockerfile +++ b/linters/rust_clippy/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/salesforce_sfdx_scanner_apex/Dockerfile b/linters/salesforce_sfdx_scanner_apex/Dockerfile index efe9470fd9d..c9373bb6485 100644 --- a/linters/salesforce_sfdx_scanner_apex/Dockerfile +++ b/linters/salesforce_sfdx_scanner_apex/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -85,7 +85,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ sfdx-cli && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/salesforce_sfdx_scanner_aura/Dockerfile b/linters/salesforce_sfdx_scanner_aura/Dockerfile index cafa83e29b6..b58a6b1c051 100644 --- a/linters/salesforce_sfdx_scanner_aura/Dockerfile +++ b/linters/salesforce_sfdx_scanner_aura/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -85,7 +85,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ sfdx-cli && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/salesforce_sfdx_scanner_lwc/Dockerfile b/linters/salesforce_sfdx_scanner_lwc/Dockerfile index ecbd06673b6..20aab7283a5 100644 --- a/linters/salesforce_sfdx_scanner_lwc/Dockerfile +++ b/linters/salesforce_sfdx_scanner_lwc/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -85,7 +85,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ sfdx-cli && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/scala_scalafix/Dockerfile b/linters/scala_scalafix/Dockerfile index 797656f2ef2..08646defafe 100644 --- a/linters/scala_scalafix/Dockerfile +++ b/linters/scala_scalafix/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/snakemake_lint/Dockerfile b/linters/snakemake_lint/Dockerfile index c926502917d..44d30d27641 100644 --- a/linters/snakemake_lint/Dockerfile +++ b/linters/snakemake_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/snakemake_snakefmt/Dockerfile b/linters/snakemake_snakefmt/Dockerfile index 843469a8ef9..3a3576a00c2 100644 --- a/linters/snakemake_snakefmt/Dockerfile +++ b/linters/snakemake_snakefmt/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/spell_cspell/Dockerfile b/linters/spell_cspell/Dockerfile index 27debfae62f..3b0e5095ebf 100644 --- a/linters/spell_cspell/Dockerfile +++ b/linters/spell_cspell/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ cspell && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/spell_misspell/Dockerfile b/linters/spell_misspell/Dockerfile index 9c0cd277cc3..495b16be067 100644 --- a/linters/spell_misspell/Dockerfile +++ b/linters/spell_misspell/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/spell_proselint/Dockerfile b/linters/spell_proselint/Dockerfile index 9eb619fbe26..89a815e035b 100644 --- a/linters/spell_proselint/Dockerfile +++ b/linters/spell_proselint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/sql_sql_lint/Dockerfile b/linters/sql_sql_lint/Dockerfile index 7cdbfd60cc9..ccf760202f3 100644 --- a/linters/sql_sql_lint/Dockerfile +++ b/linters/sql_sql_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ sql-lint && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/sql_sqlfluff/Dockerfile b/linters/sql_sqlfluff/Dockerfile index 3da300cf3ec..27c551398cd 100644 --- a/linters/sql_sqlfluff/Dockerfile +++ b/linters/sql_sqlfluff/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/sql_tsqllint/Dockerfile b/linters/sql_tsqllint/Dockerfile index 5e456028a30..7e26f110858 100644 --- a/linters/sql_tsqllint/Dockerfile +++ b/linters/sql_tsqllint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/swift_swiftlint/Dockerfile b/linters/swift_swiftlint/Dockerfile index 6ae52bad2f2..7379fe416da 100644 --- a/linters/swift_swiftlint/Dockerfile +++ b/linters/swift_swiftlint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/tekton_tekton_lint/Dockerfile b/linters/tekton_tekton_lint/Dockerfile index 3314c0a7c91..543849650ab 100644 --- a/linters/tekton_tekton_lint/Dockerfile +++ b/linters/tekton_tekton_lint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ tekton-lint && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/terraform_kics/Dockerfile b/linters/terraform_kics/Dockerfile index b0fe2479eef..6870c31f55b 100644 --- a/linters/terraform_kics/Dockerfile +++ b/linters/terraform_kics/Dockerfile @@ -16,8 +16,8 @@ FROM checkmarx/kics:alpine as kics ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_terraform_fmt/Dockerfile b/linters/terraform_terraform_fmt/Dockerfile index 366282e603d..af131523b29 100644 --- a/linters/terraform_terraform_fmt/Dockerfile +++ b/linters/terraform_terraform_fmt/Dockerfile @@ -16,8 +16,8 @@ FROM alpine/terragrunt:latest as terragrunt ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_terragrunt/Dockerfile b/linters/terraform_terragrunt/Dockerfile index 6d647c742fb..03ca23eb79f 100644 --- a/linters/terraform_terragrunt/Dockerfile +++ b/linters/terraform_terragrunt/Dockerfile @@ -16,8 +16,8 @@ FROM alpine/terragrunt:latest as terragrunt ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/typescript_prettier/Dockerfile b/linters/typescript_prettier/Dockerfile index 396993d4188..0a430d0cc38 100644 --- a/linters/typescript_prettier/Dockerfile +++ b/linters/typescript_prettier/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ typescript \ prettier && \ npm audit fix --audit-level=critical || true \ diff --git a/linters/typescript_standard/Dockerfile b/linters/typescript_standard/Dockerfile index 61e75cda80c..c759177903c 100644 --- a/linters/typescript_standard/Dockerfile +++ b/linters/typescript_standard/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ typescript \ standard \ @typescript-eslint/eslint-plugin \ diff --git a/linters/vbdotnet_dotnet_format/Dockerfile b/linters/vbdotnet_dotnet_format/Dockerfile index 24ce6ebf976..38a36de80ff 100644 --- a/linters/vbdotnet_dotnet_format/Dockerfile +++ b/linters/vbdotnet_dotnet_format/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/xml_xmllint/Dockerfile b/linters/xml_xmllint/Dockerfile index 2e7c31391e0..4e06dad8435 100644 --- a/linters/xml_xmllint/Dockerfile +++ b/linters/xml_xmllint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/yaml_prettier/Dockerfile b/linters/yaml_prettier/Dockerfile index a7a462f2e88..0af5d325cc0 100644 --- a/linters/yaml_prettier/Dockerfile +++ b/linters/yaml_prettier/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ prettier && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/yaml_v8r/Dockerfile b/linters/yaml_v8r/Dockerfile index c8bee5ad568..c3d8f994b1f 100644 --- a/linters/yaml_v8r/Dockerfile +++ b/linters/yaml_v8r/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## @@ -84,7 +84,7 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ NODE_ENV=production #NPM__START WORKDIR /node-deps -RUN npm --no-cache install --ignore-scripts \ +RUN npm --no-cache install --force --ignore-scripts \ v8r && \ npm audit fix --audit-level=critical || true \ && npm cache clean --force || true \ diff --git a/linters/yaml_yamllint/Dockerfile b/linters/yaml_yamllint/Dockerfile index 6106784b6dc..fd3fcdf8852 100644 --- a/linters/yaml_yamllint/Dockerfile +++ b/linters/yaml_yamllint/Dockerfile @@ -16,8 +16,8 @@ ################## # Get base image # ################## -# 3.10.5 is not usable until https://github.com/jruere/multiprocessing-logging/issues/56 is fixed -FROM python:3.11.1-alpine3.17 +FROM python:3.11.2-alpine3.17 +ARG GITHUB_TOKEN ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## From 3c1a064a4144cbc837f79b145542735b61caa62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Mon, 13 Feb 2023 22:54:59 +0100 Subject: [PATCH 62/63] Rename input test files --- .automation/test/kotlin/{Kotlinbad1.kt => Kotlin_bad_1.kt} | 0 .automation/test/kotlin/{Kotlinfix1.kt => Kotlin_fix_1.kt} | 0 .automation/test/kotlin/{Kotlingood.kt => Kotlin_good_1.kt} | 0 .../test/swift/fix/Sources/{Task_fix.swift => Task_fix_01.swift} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename .automation/test/kotlin/{Kotlinbad1.kt => Kotlin_bad_1.kt} (100%) rename .automation/test/kotlin/{Kotlinfix1.kt => Kotlin_fix_1.kt} (100%) rename .automation/test/kotlin/{Kotlingood.kt => Kotlin_good_1.kt} (100%) rename .automation/test/swift/fix/Sources/{Task_fix.swift => Task_fix_01.swift} (100%) diff --git a/.automation/test/kotlin/Kotlinbad1.kt b/.automation/test/kotlin/Kotlin_bad_1.kt similarity index 100% rename from .automation/test/kotlin/Kotlinbad1.kt rename to .automation/test/kotlin/Kotlin_bad_1.kt diff --git a/.automation/test/kotlin/Kotlinfix1.kt b/.automation/test/kotlin/Kotlin_fix_1.kt similarity index 100% rename from .automation/test/kotlin/Kotlinfix1.kt rename to .automation/test/kotlin/Kotlin_fix_1.kt diff --git a/.automation/test/kotlin/Kotlingood.kt b/.automation/test/kotlin/Kotlin_good_1.kt similarity index 100% rename from .automation/test/kotlin/Kotlingood.kt rename to .automation/test/kotlin/Kotlin_good_1.kt diff --git a/.automation/test/swift/fix/Sources/Task_fix.swift b/.automation/test/swift/fix/Sources/Task_fix_01.swift similarity index 100% rename from .automation/test/swift/fix/Sources/Task_fix.swift rename to .automation/test/swift/fix/Sources/Task_fix_01.swift From 7f338afc554a95932d5fad1637d00922267780bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Tue, 14 Feb 2023 22:25:52 +0100 Subject: [PATCH 63/63] Fix tests --- .automation/test/css/css_fix_01.css | 15 ++++++++++++--- .automation/test/css/css_fix_02.css | 17 +++++++++++++---- .automation/test/kotlin/.editorconfig | 4 ++++ 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 .automation/test/kotlin/.editorconfig diff --git a/.automation/test/css/css_fix_01.css b/.automation/test/css/css_fix_01.css index 844dfbfe3fc..15bc656102d 100644 --- a/.automation/test/css/css_fix_01.css +++ b/.automation/test/css/css_fix_01.css @@ -1,6 +1,7 @@ /** * Multi-line comment */ + a { -webkit-transform: scale(1); } .selector-1, .selector-2, @@ -17,6 +18,14 @@ top: calc(calc(1em * 2) / 3); } -.selector-x {width: 10%;} -.selector-y { width: 20%; } -.selector-z { width: 30%; } +.selector-x { + width: 10%; +} + +.selector-y { + width: 20%; +} + +.selector-z { + width: 30%; +} diff --git a/.automation/test/css/css_fix_02.css b/.automation/test/css/css_fix_02.css index 939ec44d155..15bc656102d 100644 --- a/.automation/test/css/css_fix_02.css +++ b/.automation/test/css/css_fix_02.css @@ -1,10 +1,11 @@ /** * Multi-line comment */ + a { -webkit-transform: scale(1); } .selector-1, .selector-2, -.selector-3[type="text"]{ +.selector-3[type="text"] { background: linear-gradient(#fff, rgba(0 0 0 80%)); box-sizing: border-box; display: block; @@ -17,6 +18,14 @@ top: calc(calc(1em * 2) / 3); } -.selector-x { width: 10%; } -.selector-y { width: 20%; } -.selector-z { width: 30%; } +.selector-x { + width: 10%; +} + +.selector-y { + width: 20%; +} + +.selector-z { + width: 30%; +} diff --git a/.automation/test/kotlin/.editorconfig b/.automation/test/kotlin/.editorconfig new file mode 100644 index 00000000000..07a1ef1ea03 --- /dev/null +++ b/.automation/test/kotlin/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*.kt] +ktlint_standard_filename = disabled