Files
editorconfig-cli/editorconfig/rules_command.go
2016-06-24 21:28:24 +01:00

20 lines
380 B
Go

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
}