Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f082b7a

Browse files
committedMar 18, 2025··
Add tags to ignore static check on helper files
We have a lot of helper files to help us test our project and those are protected to not be built with "go build" to avoid having those in the release binary. To avoid having to update tics configuration every time we rename those files or add new ones, let's tag them and filter those out in the analysis.
1 parent 5750801 commit f082b7a

File tree

17 files changed

+34
-0
lines changed

17 files changed

+34
-0
lines changed
 

‎cmd/authd/integrationtests.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // Should only be built when running integration tests.
2+
13
//go:build integrationtests
24

35
package main

‎internal/services/withexamples.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // Should only be built when building authd with the examplebroker enabled for tests.
2+
13
//go:build withexamplebroker
24

35
package services

‎internal/testsdetection/integrationtests.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // Should only be built when running integration tests.
2+
13
//go:build integrationtests
24

35
package testsdetection

‎internal/testsdetection/testdata/binary.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // Should only be built when running integration tests.
2+
13
package main
24

35
import (

‎pam/generate.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This is a helper file to generate the pam module easily.
2+
13
//go:build generate && !pam_module_generation && !pam_debug
24

35
//go:generate go generate -C internal/proto

‎pam/generate_debug.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This is a helper file to generate the pam module easily in debug mode.
2+
13
//go:build generate && !pam_module_generation && pam_debug
24

35
//go:generate go generate -C internal/proto

‎pam/go-exec/module.c

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This file is compiled indirectly through go generate.
2+
13
/* A simple PAM wrapper for GO based pam modules
24
*
35
* Copyright (C) 2024 Canonical Ltd.

‎pam/integration-tests/cmd/exec-client/client.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This is a test helper.
2+
13
//go:build pam_tests_exec_client
24

35
// Package main is the package for the exec test client.

‎pam/integration-tests/cmd/exec-client/modulewrapper.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This is a test helper.
2+
13
//go:build pam_tests_exec_client
24

35
package main

‎pam/integration-tests/sshd_preloader/sshd_preloader.c

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This is a test helper.
2+
13
#define _GNU_SOURCE 1
24
#include <assert.h>
35
#include <stdlib.h>

‎pam/internal/gdm/debug.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This is only built for tests.
2+
13
//go:build pam_gdm_debug
24

35
package gdm

‎pam/internal/gdm/extension.h

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // Header files are not built by default.
2+
13
#include <stdlib.h>
24
#include <string.h>
35

‎pam/internal/gdm/extensions/gdm-custom-json-pam-extension.h

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // Header files are not built by default.
2+
13
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
24
*
35
* Copyright (C) 2023 Canonical Ltd.

‎pam/internal/gdm/extensions/gdm-pam-extensions-common.h

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // Header files are not built by default.
2+
13
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
24
*
35
* Copyright (C) 2017 Red Hat, Inc.

‎pam/internal/proto/generate.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This is a helper to compile the proto files.
2+
13
//go:build generate
24

35
//go:generate ../../../tools/generate-proto.sh pam.proto

‎pam/tools/pam-runner/pam-runner.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This is a test helper.
2+
13
//go:build withpamrunner
24

35
package main

‎tools/tools.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TiCS: disabled // This is to pin the tools versions that we use.
2+
13
//go:build tools
24

35
package tools

0 commit comments

Comments
 (0)
Please sign in to comment.