Skip to content
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/golang_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Linter

on:
pull_request:
types: [opened, reopened, labeled, synchronize]
# paths:
# - '**/*.go'
# - '**/*.mod'
# - '**/*.sum'
push:
branches:
- pp
# paths:
# - '**/*.go'
# - '**/*.mod'
# - '**/*.sum'
workflow_dispatch:
inputs:
release_branch:
description: 'release branch name, example: release-1.68'
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
golangci:
runs-on: fsn-dev-gitlab-runner
steps:
- name: Clean workspace
uses: freenet-actions/action-clean@v1

- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint
run: |
docker run --rm \
-v $PWD:/workspace \
-w /workspace \
${{ secrets.DEV_REGISTRY }}/prompp/ci-gcc-image:gcc-tools-x86_64 \
bash -c "
export GOFLAGS=-buildvcs=false
golangci-lint run --verbose --config pp/.golangci.yml --timeout=10m
"
2 changes: 1 addition & 1 deletion pp/go/model/labelset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (s *LabelSetSuite) TestLabelSet_FromSlice() {
})
s.Equal("__name__:example;container:~unknown;flags:empty;instance:instance;job:test;", ls.String())
}

//test comment
func (s *LabelSetSuite) TestLabelSet_FromMap() {
ls := model.LabelSetFromMap(map[string]string{
"__name__": "example",
Expand Down
Loading