Skip to content

Commit

Permalink
(go/v4): remove the typecheck due the false positives
Browse files Browse the repository at this point in the history
The typecheck start to complain against many case scenarios. It might be a bug in the current version. So, we are removing it and we can revisit this decision in the future
  • Loading branch information
camilamacedo86 committed Aug 29, 2024
1 parent e93492b commit 6e656bf
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 45 deletions.
53 changes: 16 additions & 37 deletions .github/workflows/lint-sample.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Copyright 2023 The Caramello-io Authors.

name: Sample Testdata Tests
name: Linting Samples

on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'

jobs:
test:
name: "Testdata - make test"
lint:
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
steps:
Expand All @@ -18,36 +19,14 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: '~1.22'
- name: Remove pre-installed kustomize
run: sudo rm -f /usr/local/bin/kustomize
- name: Run make test for project-v4-with-deploy-image
run: cd testdata/project-v4-with-deploy-image && go mod tidy && make all && make test
- name: Run make test for project-v4-multigroup-with-deploy-image
run: cd testdata/project-v4-multigroup-with-deploy-image && go mod tidy && make all && make test

lint:
name: "Testdata - Lint"
runs-on: ubuntu-latest
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '~1.22'
- name: Clone the code
uses: actions/checkout@v4
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.57
working-directory: testdata/project-v4-with-deploy-image
args: --config .golangci.yml ./...
skip-cache: true # first lint action will handle
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.57
working-directory: testdata/project-v4-multigroup-with-deploy-image
args: --config .golangci.yml ./...
skip-cache: true # first lint action will handle
- name: Testing Lint for project-v4
working-directory: testdata/project-v4
run: |
cd testdata/project-v4/
make lint
- name: Testing Lint for project-v4-with-deploy-image
working-directory: testdata/project-v4-with-deploy-image
run: |
make lint
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ linters:
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ linters:
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ linters:
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ linters:
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
Expand Down
1 change: 0 additions & 1 deletion testdata/project-v4-multigroup/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ linters:
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
Expand Down
1 change: 0 additions & 1 deletion testdata/project-v4-with-deploy-image/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ linters:
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
Expand Down
1 change: 0 additions & 1 deletion testdata/project-v4-with-grafana/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ linters:
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
Expand Down
1 change: 0 additions & 1 deletion testdata/project-v4/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ linters:
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
Expand Down

0 comments on commit 6e656bf

Please sign in to comment.