forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into coloris
* origin/main: Remove jQuery `.attr` from the Fomantic modal cancel buttons (go-gitea#30113) Remove jQuery `.attr` from the code comments (go-gitea#30112) Remove jQuery calls that have no effect on `showElem` and `hideElem` (go-gitea#30110) Remove jQuery `.attr` from the common issue page functions (go-gitea#30083) Restore aligned grid column CSS (go-gitea#30106) Fix possible data race on tests (go-gitea#30093) Add svg linter and fix incorrect svgs (go-gitea#30086) Fix duplicate migrated milestones (go-gitea#30102) Update JS any PY dependencies, remove workarounds (go-gitea#30085) Fix gitea doctor will remove repo-avatar files when execute command `storage-archives` (go-gitea#30094) Fix alignment in actions right view (go-gitea#29979) Remove repetitive words (go-gitea#30091) Fix table header text-align (go-gitea#30084) Fix panic for `fixBrokenRepoUnits16961` (go-gitea#30068)
- Loading branch information
Showing
27 changed files
with
470 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env node | ||
import {readdirSync, readFileSync} from 'node:fs'; | ||
import {parse, relative} from 'node:path'; | ||
import {fileURLToPath} from 'node:url'; | ||
import {exit} from 'node:process'; | ||
import fastGlob from 'fast-glob'; | ||
|
||
const knownSvgs = new Set(); | ||
for (const file of readdirSync(new URL('../public/assets/img/svg', import.meta.url))) { | ||
knownSvgs.add(parse(file).name); | ||
} | ||
|
||
const rootPath = fileURLToPath(new URL('..', import.meta.url)); | ||
let hadErrors = false; | ||
|
||
for (const file of fastGlob.sync(fileURLToPath(new URL('../templates/**/*.tmpl', import.meta.url)))) { | ||
const content = readFileSync(file, 'utf8'); | ||
for (const [_, name] of content.matchAll(/svg ["'`]([^"'`]+)["'`]/g)) { | ||
if (!knownSvgs.has(name)) { | ||
console.info(`SVG "${name}" not found, used in ${relative(rootPath, file)}`); | ||
hadErrors = true; | ||
} | ||
} | ||
} | ||
|
||
exit(hadErrors ? 1 : 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.