Skip to content

Commit 88a3b9c

Browse files
authored
Revert "Run codegen before scanning (#374)" (#375)
This reverts commit cd6e052.
1 parent cd6e052 commit 88a3b9c

File tree

4 files changed

+33
-36
lines changed

4 files changed

+33
-36
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [master]
16+
branches: [ master ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [master]
19+
branches: [ master ]
2020
schedule:
21-
- cron: "26 0 * * 6"
21+
- cron: '26 0 * * 6'
2222
workflow_dispatch:
2323

2424
jobs:
@@ -29,40 +29,40 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
language: ["go", "javascript"]
32+
language: [ 'go', 'javascript' ]
3333
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
3434
# Learn more:
3535
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3636

3737
steps:
38-
- name: Checkout repository
39-
uses: actions/checkout@v3
38+
- name: Checkout repository
39+
uses: actions/checkout@v3
4040

41-
# Initializes the CodeQL tools for scanning.
42-
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@v2
44-
with:
45-
languages: ${{ matrix.language }}
46-
# If you wish to specify custom queries, you can do so here or in a config file.
47-
# By default, queries listed here will override any specified in a config file.
48-
# Prefix the list here with "+" to use these queries and those in the config file.
49-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
41+
# Initializes the CodeQL tools for scanning.
42+
- name: Initialize CodeQL
43+
uses: github/codeql-action/init@v2
44+
with:
45+
languages: ${{ matrix.language }}
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5050

51-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
52-
# If this step fails, then you should remove it and run the build manually (see below)
53-
# - name: Autobuild
54-
# uses: github/codeql-action/autobuild@v2
51+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
52+
# If this step fails, then you should remove it and run the build manually (see below)
53+
- name: Autobuild
54+
uses: github/codeql-action/autobuild@v2
5555

56-
# ℹ️ Command-line programs to run using the OS shell.
57-
# 📚 https://git.io/JvXDl
56+
# ℹ️ Command-line programs to run using the OS shell.
57+
# 📚 https://git.io/JvXDl
5858

59-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
60-
# and modify them (or add more) to build your code if your project
61-
# uses a compiled language
59+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
60+
# and modify them (or add more) to build your code if your project
61+
# uses a compiled language
6262

63-
- run: |
64-
make install
65-
make codegen
63+
#- run: |
64+
# make bootstrap
65+
# make release
6666

67-
- name: Perform CodeQL Analysis
68-
uses: github/codeql-action/analyze@v2
67+
- name: Perform CodeQL Analysis
68+
uses: github/codeql-action/analyze@v2

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,14 @@ uninstall:
4949

5050

5151
# ---- CODEGEN ----
52-
.PHONY: codegen
53-
codegen: $(CODEGEN_FILES) $(CLIENT_CODEGEN_DIR)
54-
5552
$(CLIENT_CODEGEN_DIR): $(CLIENT_INSTALL_DIR) openapi.yaml models.yaml
5653
cd static && npm run codegen
5754

5855
$(API_CODEGEN_FILE): openapi.yaml api/cfg.yaml
59-
go run github.com/deepmap/oapi-codegen/cmd/[email protected] --config api/cfg.yaml openapi.yaml > $@
56+
oapi-codegen --config api/cfg.yaml openapi.yaml > $@
6057

6158
$(MODELS_CODEGEN_FILE): models.yaml models/cfg.yaml
62-
go run github.com/deepmap/oapi-codegen/cmd/[email protected] --config models/cfg.yaml models.yaml > $@
59+
oapi-codegen --config models/cfg.yaml models.yaml > $@
6360

6461
$(MOCKS_CODEGEN_DIR): $(GO_FILES)
6562
go generate ./...

db/driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package db
22

3-
//go:generate go run github.com/golang/mock/mockgen@v1.6.0 -destination=../mocks/db/driver.gen.go -package=db . Driver,AppConfigurationDriver,LinkDriver,NoteDriver,UserDriver
3+
//go:generate mockgen -destination=../mocks/db/driver.gen.go -package=db . Driver,AppConfigurationDriver,LinkDriver,NoteDriver,UserDriver
44

55
import (
66
"errors"

upload/driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package upload
22

3-
//go:generate go run github.com/golang/mock/mockgen@v1.6.0 -destination=../mocks/upload/driver.gen.go -package=upload . Driver
3+
//go:generate mockgen -destination=../mocks/upload/driver.gen.go -package=upload . Driver
44

55
import (
66
"fmt"

0 commit comments

Comments
 (0)