siderolabs / conform

Policy enforcement for your pipelines.
Mozilla Public License 2.0
432 stars 45 forks source link

ci: missing golangci-lint run #193

Closed alex1989hu closed 3 years ago

alex1989hu commented 3 years ago

The CI does not have any golangci-lint job.

alex1989hu commented 3 years ago

Created a PR https://github.com/talos-systems/conform/pull/194 which fixes linter errors to let you easily add golangci-lint job

smira commented 3 years ago

Closed via #194

alex1989hu commented 3 years ago

Closed via #194

Actually that PR does not add CI job to drone CI

smira commented 3 years ago

@alex1989hu sorry!

alex1989hu commented 3 years ago

Can it work?

diff --git a/.drone.yml b/.drone.yml
index 3dcbf4a..a63fc91 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -26,6 +26,15 @@ steps:
       - name: dockersock
         path: /var/run

+  - name: lint
+    image: golangci/golangci-lint:v1.32.2
+    pull: always
+    commands:
+      - golangci-lint run --config hack/golangci-lint.yaml
+    volumes:
+      - name: dockersock
+        path: /var/run
+
   - name: conform
     image: autonomy/build-container:latest
     pull: always

PS.: the image is huge: 858MB

smira commented 3 years ago

I don't think we need that, feels like make test does that, as in the Dockerfile it goes to hack/test.sh --all

alex1989hu commented 3 years ago

Oh, really! I can verify that; probably missed that.