Skip to content

Commit

Permalink
Add makefile linter within python flavor (#1771)
Browse files Browse the repository at this point in the history
* Add makefile linter within python flavor

Fixes #1760

* [MegaLinter] Apply linters fixes

Co-authored-by: nvuillam <nvuillam@users.noreply.github.com>
  • Loading branch information
nvuillam and nvuillam authored Aug 21, 2022
1 parent f7ab207 commit 34a274b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- Fix version in URL in logs produced by reporters
- Improve documentation for TAP_REPORTER
- Fix flavors suggestions to ignore linters not relevant for such flavor ([#1746](https://github.com/oxsecurity/megalinter/issues/1746))
- Add Makefile linter within python flavor

- Linter versions upgrades
- [eslint-plugin-jsonc](https://ota-meshi.github.io/eslint-plugin-jsonc/) from 2.3.1 to **2.4.0** on 2022-08-16
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi

# Manage newest git versions (related to CVE https://github.blog/2022-04-12-git-security-vulnerability-announced/)
#
if [[ "${WORKSPACE_AS_SAFE_DIR}" != 'false' && "${DEFAULT_WORKSPACE}" && -d "${DEFAULT_WORKSPACE}" ]] ; then
if [[ "${WORKSPACE_AS_SAFE_DIR}" != 'false' && "${DEFAULT_WORKSPACE}" && -d "${DEFAULT_WORKSPACE}" ]]; then
echo "Setting git safe.directory DEFAULT_WORKSPACE: ${DEFAULT_WORKSPACE} ..."
git config --global --add safe.directory "${DEFAULT_WORKSPACE}"
else
Expand Down
6 changes: 6 additions & 0 deletions flavors/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ RUN ML_THIRD_PARTY_DIR="/third-party/kubeconform" \
&& find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete


# 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


# protolint installation
COPY --from=protolint /usr/local/bin/protolint /usr/bin/

Expand Down
1 change: 1 addition & 0 deletions flavors/python/flavor.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"KOTLIN_KTLINT",
"KUBERNETES_KUBEVAL",
"KUBERNETES_KUBECONFORM",
"MAKEFILE_CHECKMAKE",
"MARKDOWN_MARKDOWNLINT",
"MARKDOWN_MARKDOWN_LINK_CHECK",
"MARKDOWN_MARKDOWN_TABLE_FORMATTER",
Expand Down
1 change: 1 addition & 0 deletions megalinter/descriptors/all_flavors.json
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@
"KOTLIN_KTLINT",
"KUBERNETES_KUBEVAL",
"KUBERNETES_KUBECONFORM",
"MAKEFILE_CHECKMAKE",
"MARKDOWN_MARKDOWNLINT",
"MARKDOWN_MARKDOWN_LINK_CHECK",
"MARKDOWN_MARKDOWN_TABLE_FORMATTER",
Expand Down
1 change: 1 addition & 0 deletions megalinter/descriptors/makefile.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ descriptor_flavors:
- all # Applicable to CI in any language project
- ci_light
- dotnet
- python
file_names_regex:
- "Makefile"
test_folder: makefile
Expand Down

0 comments on commit 34a274b

Please sign in to comment.