Fix linting issues in manifest.go and plugin_test.go

- Add blank line before return statement in manifest.go
- Fix table formatting alignment in plugin_test.go

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Felipe M 2025-07-14 19:19:11 +02:00
parent 278958d1e4
commit 03c521f237
No known key found for this signature in database
GPG key ID: 52E5D65FCF99808A
2 changed files with 41 additions and 40 deletions

View file

@ -44,6 +44,7 @@ func RunManifestCommand(args []string, pluginPath string) error {
case "check": case "check":
if err := manifest.IsValid(); err != nil { if err := manifest.IsValid(); err != nil {
Logger.Error("Plugin manifest validation failed", "error", err) Logger.Error("Plugin manifest validation failed", "error", err)
return err return err
} }
Logger.Info("Plugin manifest is valid") Logger.Info("Plugin manifest is valid")

View file

@ -521,73 +521,73 @@ func TestParsePluginCtlConfig(t *testing.T) {
func TestIsPathIgnored(t *testing.T) { func TestIsPathIgnored(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
relativePath string relativePath string
ignorePatterns []string ignorePatterns []string
expectedIgnore bool expectedIgnore bool
expectedPattern string expectedPattern string
}{ }{
{ {
name: "No ignore patterns", name: "No ignore patterns",
relativePath: "webapp/dist/main.js", relativePath: "webapp/dist/main.js",
ignorePatterns: []string{}, ignorePatterns: []string{},
expectedIgnore: false, expectedIgnore: false,
expectedPattern: "", expectedPattern: "",
}, },
{ {
name: "Direct file match", name: "Direct file match",
relativePath: "test.js", relativePath: "test.js",
ignorePatterns: []string{"*.js"}, ignorePatterns: []string{"*.js"},
expectedIgnore: true, expectedIgnore: true,
expectedPattern: "*.js", expectedPattern: "*.js",
}, },
{ {
name: "Directory pattern with slash", name: "Directory pattern with slash",
relativePath: "build/output.js", relativePath: "build/output.js",
ignorePatterns: []string{"build/"}, ignorePatterns: []string{"build/"},
expectedIgnore: true, expectedIgnore: true,
expectedPattern: "build/", expectedPattern: "build/",
}, },
{ {
name: "Directory pattern without slash", name: "Directory pattern without slash",
relativePath: "build/output.js", relativePath: "build/output.js",
ignorePatterns: []string{"build"}, ignorePatterns: []string{"build"},
expectedIgnore: true, expectedIgnore: true,
expectedPattern: "build", expectedPattern: "build",
}, },
{ {
name: "Nested directory match", name: "Nested directory match",
relativePath: "webapp/dist/main.js", relativePath: "webapp/dist/main.js",
ignorePatterns: []string{"dist"}, ignorePatterns: []string{"dist"},
expectedIgnore: true, expectedIgnore: true,
expectedPattern: "dist", expectedPattern: "dist",
}, },
{ {
name: "Multiple patterns - first match", name: "Multiple patterns - first match",
relativePath: "test.js", relativePath: "test.js",
ignorePatterns: []string{"*.js", "*.css"}, ignorePatterns: []string{"*.js", "*.css"},
expectedIgnore: true, expectedIgnore: true,
expectedPattern: "*.js", expectedPattern: "*.js",
}, },
{ {
name: "Multiple patterns - second match", name: "Multiple patterns - second match",
relativePath: "style.css", relativePath: "style.css",
ignorePatterns: []string{"*.js", "*.css"}, ignorePatterns: []string{"*.js", "*.css"},
expectedIgnore: true, expectedIgnore: true,
expectedPattern: "*.css", expectedPattern: "*.css",
}, },
{ {
name: "No match", name: "No match",
relativePath: "README.md", relativePath: "README.md",
ignorePatterns: []string{"*.js", "*.css"}, ignorePatterns: []string{"*.js", "*.css"},
expectedIgnore: false, expectedIgnore: false,
expectedPattern: "", expectedPattern: "",
}, },
{ {
name: "Complex path with match", name: "Complex path with match",
relativePath: "webapp/node_modules/package/file.js", relativePath: "webapp/node_modules/package/file.js",
ignorePatterns: []string{"node_modules"}, ignorePatterns: []string{"node_modules"},
expectedIgnore: true, expectedIgnore: true,
expectedPattern: "node_modules", expectedPattern: "node_modules",
}, },
} }