Skip to content

Commit 91839ca

Browse files
Move codeformat folder to tools (go-gitea#35758)
Followup to go-gitea#35734. - Move `codeformat` folder to `tools` - Add `tools` to `GO_DIRS` - Move `misspellings.csv` to `assets` so we can lint the whole `tools` directory without filter shenanigans. --------- Co-authored-by: wxiaoguang <[email protected]>
1 parent 6b5563c commit 91839ca

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ TEST_TAGS ?= $(TAGS_SPLIT) sqlite sqlite_unlock_notify
163163

164164
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
165165

166-
GO_DIRS := build cmd models modules routers services tests
166+
GO_DIRS := build cmd models modules routers services tests tools
167167
WEB_DIRS := web_src/js web_src/css
168168

169169
ESLINT_FILES := web_src/js tools *.ts tests/e2e
170170
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
171-
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) templates options/locale/locale_en-US.ini .github $(filter-out CHANGELOG.md, $(wildcard *.go *.md *.yml *.yaml *.toml)) $(filter-out tools/misspellings.csv, $(wildcard tools/*))
171+
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) templates options/locale/locale_en-US.ini .github $(filter-out CHANGELOG.md, $(wildcard *.go *.md *.yml *.yaml *.toml))
172172
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.ini
173173

174174
GO_SOURCES := $(wildcard *.go)
@@ -376,11 +376,11 @@ lint-md: node_modules ## lint markdown files
376376

377377
.PHONY: lint-spell
378378
lint-spell: ## lint spelling
379-
@go run $(MISSPELL_PACKAGE) -dict tools/misspellings.csv -error $(SPELLCHECK_FILES)
379+
@go run $(MISSPELL_PACKAGE) -dict assets/misspellings.csv -error $(SPELLCHECK_FILES)
380380

381381
.PHONY: lint-spell-fix
382382
lint-spell-fix: ## lint spelling and fix issues
383-
@go run $(MISSPELL_PACKAGE) -dict tools/misspellings.csv -w $(SPELLCHECK_FILES)
383+
@go run $(MISSPELL_PACKAGE) -dict assets/misspellings.csv -w $(SPELLCHECK_FILES)
384384

385385
.PHONY: lint-go
386386
lint-go: ## lint go files
File renamed without changes.

tools/code-batch-process.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"strconv"
1717
"strings"
1818

19-
"code.gitea.io/gitea/build/codeformat"
19+
"code.gitea.io/gitea/tools/codeformat"
2020
)
2121

2222
// Windows has a limitation for command line arguments, the size can not exceed 32KB.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)