From 0ec09e97f5a99940f5f8b6ac484ddf96b0a2b74e Mon Sep 17 00:00:00 2001
From: "a.petraki" <a.petraki@perx.ru>
Date: Thu, 16 Nov 2023 17:59:22 +0300
Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?=
 =?UTF-8?q?=D0=BD=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=20=D0=BB=D0=B8?=
 =?UTF-8?q?=D0=BD=D1=82=D0=B5=D1=80=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=B4?=
 =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20?=
 =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D0=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b0d92907..60bc720b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,11 +8,22 @@ run_tests:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
   stage: test
   script:
-    - go fmt  ./...
-    - go vet  ./...
     - go install gotest.tools/gotestsum@latest
-    - gotestsum --format testname  --junitfile report.xml
+    - gotestsum --format testname --junitfile report.xml
   artifacts:
     when: always
     reports:
       junit: report.xml
+
+lint:
+  image: golangci/golangci-lint:v1.55-alpine
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
+  stage: test
+  script:
+    - golangci-lint run --issues-exit-code 1 --print-issued-lines=false --new-from-rev $CI_MERGE_REQUEST_DIFF_BASE_SHA --out-format code-climate:gl-code-quality-report.json,line-number
+  artifacts:
+    reports:
+      codequality: gl-code-quality-report.json
+    paths:
+      - gl-code-quality-report.json
-- 
GitLab