Split command functions into separate files.
This commit is contained in:
19
editorconfig/rules_command.go
Normal file
19
editorconfig/rules_command.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package editorconfig
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func RulesCommand(c *cli.Context) error {
|
||||
path := c.Args()[0]
|
||||
configs := FindConfigFiles([]string{path})
|
||||
rules := GetRulesToApplyToSourcePath(path, configs)
|
||||
|
||||
fmt.Printf("%d rules match the path %s\n", len(rules), path)
|
||||
for key, value := range rules {
|
||||
fmt.Println(key + " = " + value)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user