Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2.1

orbs:
codacy: codacy/base@12.0.0
codacy_plugins_test: codacy/plugins-test@2.0.11
codacy: codacy/base@13.1.0
codacy_plugins_test: codacy/plugins-test@2.1.2

workflows:
compile_test_deploy:
Expand Down
15 changes: 0 additions & 15 deletions .env

This file was deleted.

12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM sbtscala/scala-sbt:eclipse-temurin-jammy-11.0.22_7_1.9.9_2.13.13 as doc-generator
FROM sbtscala/scala-sbt:eclipse-temurin-alpine-25.0.3_9_1.12.13_3.8.4 as doc-generator

WORKDIR /app

RUN wget https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.4.3/phpDocumentor.phar && \
RUN wget https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.10.0/phpDocumentor.phar && \
mv phpDocumentor.phar /usr/local/bin/phpdoc && \
chmod +x /usr/local/bin/phpdoc

Expand All @@ -13,7 +13,7 @@ COPY doc-generator doc-generator

RUN sbt 'doc-generator/runMain codacy.codesniffer.docsgen.GeneratorMain'

FROM sbtscala/scala-sbt:graalvm-ce-22.3.3-b1-java17_1.9.9_3.4.0 AS builder
FROM sbtscala/scala-sbt:graalvm-ce-22.3.3-b1-java17_1.12.11_3.8.4 AS builder

WORKDIR /app

Expand All @@ -24,7 +24,7 @@ COPY src src
RUN --mount=type=cache,target=/root/.cache/coursier \
sbt nativeImage

FROM php:8.2-alpine
FROM php:8.5-alpine

WORKDIR /app

Expand All @@ -34,10 +34,10 @@ ENV COMPOSER_ALLOW_SUPERUSER 1
ENV PATH ${COMPOSER_HOME}/vendor/bin:${PATH}

# Install necessary packages
RUN apk --no-cache add php82
RUN apk --no-cache add php85

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

The Dockerfile incorrectly installs a redundant PHP package and configures the wrong ini path. The base image already provides PHP; installing it again via the package manager is redundant. Furthermore, modifying the configuration in the package-specific path will be ignored by the primary binary. Use the official best practice: apply settings to the file in the directory defined by $PHP_INI_DIR (typically /usr/local/etc/php/php.ini) to ensure the short_open_tag=On setting takes effect.


# Configure PHP settings
RUN sed 's/.*short_open_tag.*=.*/short_open_tag=On/' /etc/php82/php.ini -i
RUN sed 's/.*short_open_tag.*=.*/short_open_tag=On/' /etc/php85/php.ini -i

# Install Composer and packages
RUN curl -sS https://getcomposer.org/installer | php
Expand Down
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ ThisBuild / scalaVersion := "2.13.14"

lazy val `doc-generator` = project
.settings(
libraryDependencies ++= Seq("org.scala-lang.modules" %% "scala-xml" % "2.2.0",
"org.scala-lang.modules" %% "scala-parallel-collections" % "1.0.4",
"com.codacy" %% "codacy-engine-scala-seed" % "6.1.2",
"com.lihaoyi" %% "ujson" % "3.1.2",
libraryDependencies ++= Seq("org.scala-lang.modules" %% "scala-xml" % "2.4.0",
"org.scala-lang.modules" %% "scala-parallel-collections" % "1.2.0",
"com.codacy" %% "codacy-engine-scala-seed" % "6.1.4",
"com.lihaoyi" %% "ujson" % "4.4.3",
"com.github.pathikrit" %% "better-files" % "3.9.2"
)
)

lazy val root = project
.in(file("."))
.settings(name := "codacy-codesniffer",
libraryDependencies ++= Seq("org.scala-lang.modules" %% "scala-xml" % "2.2.0",
"com.codacy" %% "codacy-engine-scala-seed" % "6.1.2"
libraryDependencies ++= Seq("org.scala-lang.modules" %% "scala-xml" % "2.4.0",
"com.codacy" %% "codacy-engine-scala-seed" % "6.1.4"
),
mainClass in Compile := Some("codacy.Engine"),
nativeImageOptions ++= List("-O1",
Expand Down
56 changes: 17 additions & 39 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
{
"require": {
"automattic/vipwpcs": "^3.0.0",
"cakephp/cakephp-codesniffer": "^5.1",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
"doctrine/coding-standard": "^12.0.0",
"drupal/coder": "^8.3.24",
"escapestudios/symfony2-coding-standard": "^3.13.0",
"magento/magento-coding-standard": "32.0",
"magento/marketplace-eqp": "^4.0.0",
"pheromone/phpcs-security-audit": "^2.0.1",
"phpcompatibility/php-compatibility": "9.3.5",
"phpcompatibility/phpcompatibility-paragonie": "^1.3.3",
"phpcompatibility/phpcompatibility-wp": "^2.1.5",
"phpstan/phpdoc-parser": "^1.28.0",
"slevomat/coding-standard": "^8.15.0",
"squizlabs/php_codesniffer": "3.10.1",
"symfony/flex": "^2.4.5",
"vaimo/phpcs-rulesets": "dev-codacy",
"wp-coding-standards/wpcs": "^3.1.0",
"vaimo/uk-phpcs-standards": "dev-master"


"cakephp/cakephp-codesniffer": "5.3.0",
"drupal/coder": "9.0.1",
"escapestudios/symfony2-coding-standard": "3.18.0",
"slevomat/coding-standard": "8.30.1",
"phpcompatibility/php-compatibility": "10.0.0-alpha2",

"squizlabs/php_codesniffer": "4.0.1",

"symfony/flex": "2.11.0",
"dealerdirect/phpcodesniffer-composer-installer": "1.2.1",
"doctrine/coding-standard": "14.0.0",
"phpcompatibility/phpcompatibility-paragonie": "2.0.0-alpha2",
"phpcompatibility/phpcompatibility-wp": "3.0.0-alpha2",
"phpstan/phpdoc-parser": "2.3.2"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/magento/marketplace-eqp.git"
},
{
"type": "vcs",
"url": "https://bitbucket.org/vaimo/phpcs-rulesets.git"
},
{
"type": "vcs",
"url": "https://bitbucket.org/vaimo/uk-phpcs-standards.git"
}
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"symfony/flex": true,
"phpdocumentor/unified-asset-installer": true
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"require-dev": {
"phpunit/phpunit": "^11.1",
"phpcompatibility/php-compatibility": "*"
}
}
Loading