Skip to content

Commit

Permalink
Merge branch 'fixes/redis-message' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Jul 11, 2023
2 parents 17ce83f + 20da793 commit a877310
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- Devskim: Remove default --ignore-globs argument
- mypy: USe /tmp as cache folder by default with ENV MYPY_CACHE_DIR=/tmp in Dockerfile
- Fix `hadolint` to use its default configuration file properly.
- Remove linters not in flavor before calling reporters

- Reporters
- New Redis reporter (alpha)
Expand Down
9 changes: 5 additions & 4 deletions megalinter/MegaLinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,21 +211,22 @@ def run(self):
if linter.apply_fixes is True:
linters_do_fixes = True

# Initialize reports
for reporter in self.reporters:
reporter.initialize()

# Display warning if selected flavors doesn't match all linters
if (
flavor_factory.check_active_linters_match_flavor(
active_linters, self.request_id
)
is False
):
# Remove linters that are not existing in the flavor
active_linters = [
linter for linter in active_linters if linter.is_active is True
]

# Initialize reports
for reporter in self.reporters:
reporter.initialize()

if (
config.get(self.request_id, "PARALLEL", "true") == "true"
and len(active_linters) > 1
Expand Down
9 changes: 9 additions & 0 deletions server/Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM hadolint/hadolint:v2.12.0-alpine as hadolint

FROM python:3.11-alpine

WORKDIR /
Expand All @@ -10,8 +12,15 @@ RUN apk add \

RUN npm install eslint stylelint --global

COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint

ENV MEGALINTER_FLAVOR=security

# Core MegaLinter
COPY megalinter /megalinter



RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \
&& PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \
&& rm -rf /var/cache/apk/* \
Expand Down

0 comments on commit a877310

Please sign in to comment.