mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Remove the years flag from checker.
This commit is contained in:
parent
f4d00cd9d8
commit
468e91cb8b
4 changed files with 8 additions and 37 deletions
|
|
@ -243,7 +243,7 @@ func (p *processor) run(domains []string) (*Report, error) {
|
|||
report := Report{
|
||||
Date: ReportTime{Time: time.Now().UTC()},
|
||||
Version: util.SemVersion,
|
||||
TimeRange: p.cfg.ageAccept,
|
||||
TimeRange: p.cfg.Range,
|
||||
}
|
||||
|
||||
for _, d := range domains {
|
||||
|
|
@ -546,7 +546,7 @@ func (p *processor) rolieFeedEntries(feed string) ([]csaf.AdvisoryFile, error) {
|
|||
rfeed.Entries(func(entry *csaf.Entry) {
|
||||
|
||||
// Filter if we have date checking.
|
||||
if accept := p.cfg.ageAccept; accept != nil {
|
||||
if accept := p.cfg.Range; accept != nil {
|
||||
if pub := time.Time(entry.Published); !pub.IsZero() && !accept.Contains(pub) {
|
||||
return
|
||||
}
|
||||
|
|
@ -667,7 +667,7 @@ func (p *processor) integrity(
|
|||
if m := yearFromURL.FindStringSubmatch(u); m != nil {
|
||||
year, _ := strconv.Atoi(m[1])
|
||||
// Check if we are in checking time interval.
|
||||
if accept := p.cfg.ageAccept; accept != nil && !accept.Contains(
|
||||
if accept := p.cfg.Range; accept != nil && !accept.Contains(
|
||||
time.Date(
|
||||
year, 12, 31, // Assume last day of year.
|
||||
23, 59, 59, 0, // 23:59:59
|
||||
|
|
@ -973,7 +973,7 @@ func (p *processor) checkChanges(base string, mask whereType) error {
|
|||
return nil, nil, err
|
||||
}
|
||||
// Apply date range filtering.
|
||||
if accept := p.cfg.ageAccept; accept != nil && !accept.Contains(t) {
|
||||
if accept := p.cfg.Range; accept != nil && !accept.Contains(t) {
|
||||
continue
|
||||
}
|
||||
path := r[pathColumn]
|
||||
|
|
@ -990,7 +990,7 @@ func (p *processor) checkChanges(base string, mask whereType) error {
|
|||
|
||||
if len(files) == 0 {
|
||||
var filtered string
|
||||
if p.cfg.ageAccept != nil {
|
||||
if p.cfg.Range != nil {
|
||||
filtered = " (maybe filtered out by time interval)"
|
||||
}
|
||||
p.badChanges.warn("no entries in changes.csv found" + filtered)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue