MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / WriteTo

Function WriteTo

config/config.go:164–173  ·  view source on GitHub ↗

WriteTo writes config in yaml format to given io.Writer, including all settings and every field even if empty or zero-valued.

(w io.Writer, conf *lint.Config)

Source from the content-addressed store, hash-verified

162// WriteTo writes config in yaml format to given io.Writer, including all
163// settings and every field even if empty or zero-valued.
164func WriteTo(w io.Writer, conf *lint.Config) (retErr error) {
165 enc := yaml.NewEncoder(w)
166 defer func() {
167 err := enc.Close()
168 if retErr == nil && err != nil {
169 retErr = err
170 }
171 }()
172 return enc.Encode(conf)
173}
174
175// WriteCompactTo writes config in yaml format to given io.Writer.
176// Only settings for enabled rules are written, keeping the output compact.

Callers 1

configCreateFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected