From b1572c628a4a07ab189a779f4e703918f9f3a50a Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 7 Sep 2024 14:44:36 +0700 Subject: Makefile: replace golangci-lint with "go vet" This is the second we remove golangci-lint. Previously, we replace it with revive, now we replace it with go internal tools "go vet". The problem is the same, golangci-lint does not works when compiled or using gotip. Also, on VM with 8GB memory, it will crash due to OOM. --- Makefile | 4 +--- html_backend.go | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b2d6ff9..5693121 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,7 @@ all: test lint lint: -fieldalignment ./... -shadow ./... - -golangci-lint run \ - --presets bugs,metalinter,performance,unused \ - ./... + go vet ./... test: go test -coverprofile=cover.out ./... diff --git a/html_backend.go b/html_backend.go index 17e4769..b404ba7 100644 --- a/html_backend.go +++ b/html_backend.go @@ -1113,10 +1113,10 @@ func htmlWriteInlinePass(doc *Document, el *element, out io.Writer) { func htmlWriteListDescription(el *element, out io.Writer) { var openTag string switch { - case el.isStyleQandA() == true: + case el.isStyleQandA(): htmlWriteBlockBegin(el, out, `qlist qanda`) openTag = "\n
    " - case el.isStyleHorizontal() == true: + case el.isStyleHorizontal(): htmlWriteBlockBegin(el, out, `hdlist`) openTag = "\n" default: @@ -1129,9 +1129,9 @@ func htmlWriteListDescription(el *element, out io.Writer) { func htmlWriteListDescriptionEnd(el *element, out io.Writer) { switch { - case el.isStyleQandA() == true: + case el.isStyleQandA(): fmt.Fprintf(out, "\n\n") - case el.isStyleHorizontal() == true: + case el.isStyleHorizontal(): fmt.Fprintf(out, "\n
    \n") default: fmt.Fprintf(out, "\n\n") -- cgit v1.3