mirror of https://github.com/ceph/go-ceph
implements: report on stable functions in json output
Because there will be a lot of stable functions we only report on them in the json report as the text report is more meant for summaries. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
d1aa76c613
commit
29c18bcfd0
|
@ -23,6 +23,7 @@ type Inspector struct {
|
||||||
|
|
||||||
deprecated []*goFunction
|
deprecated []*goFunction
|
||||||
preview []*goFunction
|
preview []*goFunction
|
||||||
|
stable []*goFunction
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetExpected sets the expected C functions, asuming the supplied prefix.
|
// SetExpected sets the expected C functions, asuming the supplied prefix.
|
||||||
|
@ -62,6 +63,7 @@ func (ii *Inspector) update() {
|
||||||
}
|
}
|
||||||
ii.deprecated = append(ii.deprecated, ii.visitor.deprecated...)
|
ii.deprecated = append(ii.deprecated, ii.visitor.deprecated...)
|
||||||
ii.preview = append(ii.preview, ii.visitor.preview...)
|
ii.preview = append(ii.preview, ii.visitor.preview...)
|
||||||
|
ii.stable = append(ii.stable, ii.visitor.stable...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewInspector returns a newly created code inspector object.
|
// NewInspector returns a newly created code inspector object.
|
||||||
|
|
|
@ -56,6 +56,7 @@ type jrPackage struct {
|
||||||
Missing []jrFunction `json:"missing,omitempty"`
|
Missing []jrFunction `json:"missing,omitempty"`
|
||||||
Deprecated []gFunc `json:"deprecated_api,omitempty"`
|
Deprecated []gFunc `json:"deprecated_api,omitempty"`
|
||||||
Preview []gFunc `json:"preview_api,omitempty"`
|
Preview []gFunc `json:"preview_api,omitempty"`
|
||||||
|
Stable []gFunc `json:"stable_api,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type jrOut map[string]jrPackage
|
type jrOut map[string]jrPackage
|
||||||
|
@ -121,6 +122,10 @@ func collectFuncs(jp *jrPackage, ii *Inspector) {
|
||||||
jp.Preview = append(jp.Preview,
|
jp.Preview = append(jp.Preview,
|
||||||
gFunc{Name: gf.fullName, Comment: gf.comment})
|
gFunc{Name: gf.fullName, Comment: gf.comment})
|
||||||
}
|
}
|
||||||
|
for _, gf := range ii.stable {
|
||||||
|
jp.Stable = append(jp.Stable,
|
||||||
|
gFunc{Name: gf.fullName, Comment: gf.comment})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func mkeys(m map[string]bool) []string {
|
func mkeys(m map[string]bool) []string {
|
||||||
|
|
Loading…
Reference in New Issue