You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: .github/workflows/codeql-analysis.yml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -48,11 +48,11 @@ jobs:
48
48
# If you wish to specify custom queries, you can do so here or in a config file.
49
49
# By default, queries listed here will override any specified in a config file.
50
50
# Prefix the list here with "+" to use these queries and those in the config file.
51
-
51
+
52
52
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
53
# queries: security-extended,security-and-quality
54
54
55
-
55
+
56
56
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57
57
# If this step fails, then you should remove it and run the build manually (see below)
58
58
- name: Autobuild
@@ -61,7 +61,7 @@ jobs:
61
61
# ℹ️ Command-line programs to run using the OS shell.
62
62
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
63
64
-
# If the Autobuild fails above, remove it and uncomment the following three lines.
64
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
65
65
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
37
-
- gosimple # Linter for Go source code that specializes in simplifying a code
20
+
# - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
38
21
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
39
22
- ineffassign # Detects when assignments to existing variables are not used
40
-
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
41
-
- structcheck # Finds unused struct fields
42
-
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
23
+
# - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
43
24
- unused # Checks Go code for unused constants, variables, functions and types
44
-
- varcheck # Finds unused global variables and constants
45
25
46
26
## disabled by default
47
27
@@ -55,24 +35,21 @@ linters:
55
35
- durationcheck # check for two durations multiplied together
56
36
- errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error.
57
37
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
58
-
- execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds
59
38
- exhaustive # check exhaustiveness of enum switch statements
60
-
- exportloopref # checks for pointers to enclosing loop variables
61
39
# - forbidigo # Forbids identifiers
62
40
- funlen # Tool for detection of long functions
63
41
# - gochecknoglobals # check that no global variables exist
64
42
# - gochecknoinits # Checks that no init functions are present in Go code
65
43
- gocognit # Computes and checks the cognitive complexity of functions
66
-
- goconst # Finds repeated strings that could be replaced by a constant
44
+
#- goconst # Finds repeated strings that could be replaced by a constant
67
45
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
68
46
- gocyclo # Computes and checks the cyclomatic complexity of functions
69
47
- godot # Check if comments end in a period
70
-
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt.
71
48
# - gomnd # An analyzer to detect magic numbers.
72
49
- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
73
50
- gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
74
51
- goprintffuncname # Checks that printf-like functions are named with f at the end
75
-
- gosec # Inspects source code for security problems
52
+
#- gosec # Inspects source code for security problems
76
53
- lll # Reports long lines
77
54
- makezero # Finds slice declarations with non-zero initial length
78
55
- nakedret # Finds naked returns in functions greater than a specified function length
@@ -85,11 +62,9 @@ linters:
85
62
- nosprintfhostport # Checks for misuse of Sprintf to construct a host with port in a URL.
86
63
- predeclared # find code that shadows one of Go's predeclared identifiers
87
64
- promlinter # Check Prometheus metrics naming via promlint
88
-
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
65
+
#- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
89
66
- rowserrcheck # checks whether Err of rows is checked successfully
90
67
- sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
91
-
- stylecheck # Stylecheck is a replacement for golint
92
-
- tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17
93
68
- testpackage # linter that makes you use a separate _test package
94
69
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
95
70
- unconvert # Remove unnecessary type conversions
@@ -134,6 +109,30 @@ linters:
134
109
#- interfacer # [deprecated] Linter that suggests narrower interface types
135
110
#- maligned # [deprecated, replaced by govet fieldalignment] Tool to detect Go structs that would take less memory if their fields were sorted
136
111
#- scopelint # [deprecated, replaced by exportloopref] Scopelint checks for unpinned variables in go programs
112
+
settings:
113
+
cyclop:
114
+
max-complexity: 30
115
+
package-average: 10.0
116
+
117
+
errcheck:
118
+
check-type-assertions: true
119
+
120
+
funlen:
121
+
lines: 200
122
+
statements: 100
123
+
124
+
gocognit:
125
+
min-complexity: 50
126
+
127
+
gosec:
128
+
excludes:
129
+
- G204# Subprocess launched with a potential tainted input or cmd arguments # Use os/exec
130
+
- G401# Use of weak cryptographic primitive # md5, sha1
0 commit comments