From 6ab3c33a1cef4a5bd51656245be83bc5648f9be6 Mon Sep 17 00:00:00 2001 From: Darius Rapalis Date: Sun, 16 Mar 2025 13:36:53 +0200 Subject: [PATCH] linting (with failing code) --- .github/workflows/ci.yml | 8 ++++++++ main.go | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6905485..6184eab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,5 +34,13 @@ jobs: with: go-version: "1.23.0" + - name: Install staticcheck + uses: dominikh/staticcheck-action@v1 + with: + version: "latest" + - name: Style + run: test -z $(go fmt ./...) + + - name: Linting run: test -z $(go fmt ./...) \ No newline at end of file diff --git a/main.go b/main.go index 19d7366..a621713 100644 --- a/main.go +++ b/main.go @@ -96,3 +96,8 @@ func main() { log.Printf("Serving on port: %s\n", port) log.Fatal(srv.ListenAndServe()) } + +func unused() { + // this function does nothing + // and is called nowhere +}