command and help ux pass
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
|
||||
"git.westgate.pw/ShadowsOverWestgate/sow-tools/internal/erf"
|
||||
"git.westgate.pw/ShadowsOverWestgate/sow-tools/internal/gff"
|
||||
"git.westgate.pw/ShadowsOverWestgate/sow-tools/internal/music"
|
||||
"git.westgate.pw/ShadowsOverWestgate/sow-tools/internal/project"
|
||||
)
|
||||
|
||||
@@ -101,8 +100,7 @@ func ValidateProject(p *project.Project) Report {
|
||||
}
|
||||
|
||||
for _, rel := range p.Inventory.AssetFiles {
|
||||
musicSource := isMusicSourceAsset(p, rel)
|
||||
if hasUppercaseResourceName(rel) && !musicSource {
|
||||
if hasUppercaseResourceName(rel) {
|
||||
report.add(rel, "resource filenames should be lowercase", SeverityWarning)
|
||||
}
|
||||
base := strings.ToLower(strings.TrimSuffix(filepath.Base(rel), filepath.Ext(rel)))
|
||||
@@ -116,9 +114,6 @@ func ValidateProject(p *project.Project) Report {
|
||||
if _, exists := assetIndex[key]; !exists {
|
||||
assetIndex[key] = rel
|
||||
}
|
||||
if musicSource {
|
||||
continue
|
||||
}
|
||||
|
||||
group, err := resolver.groupFor(rel)
|
||||
if err != nil {
|
||||
@@ -507,30 +502,6 @@ func hasAsset(name string, extensions []string, assets map[string]string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func isMusicSourceAsset(p *project.Project, rel string) bool {
|
||||
rel = filepath.ToSlash(strings.TrimSpace(rel))
|
||||
ext := strings.ToLower(filepath.Ext(rel))
|
||||
effective := p.EffectiveConfig()
|
||||
for _, dataset := range effective.Music.Datasets {
|
||||
if !music.PathIsUnder(dataset.Source, rel) {
|
||||
continue
|
||||
}
|
||||
for _, candidate := range dataset.ConvertExtensions {
|
||||
if ext == strings.ToLower(strings.TrimSpace(candidate)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
if music.PathIsUnder("envi/music", rel) {
|
||||
for _, candidate := range effective.Music.ConvertExtensions {
|
||||
if ext == strings.ToLower(strings.TrimSpace(candidate)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func isBuiltinScript(name string, builtinScriptPrefixes []string) bool {
|
||||
lower := strings.ToLower(name)
|
||||
for _, prefix := range builtinScriptPrefixes {
|
||||
|
||||
Reference in New Issue
Block a user