Exemple #1
0
func (s *SpecInfoGatherer) onConceptFileModify(file string) {
	logger.ApiLog.Info("Concept file added / modified: %s", file)
	conceptParser := new(parser.ConceptParser)
	concepts, parseResults := conceptParser.ParseFile(file)
	if parseResults != nil && parseResults.Error != nil {
		logger.ApiLog.Error("Error parsing concepts: ", parseResults.Error)
		return
	}

	for _, concept := range concepts {
		c := parser.Concept{concept, file}
		s.addToConceptsCache(file, &c)
		stepsFromConcept := s.getStepsFromConcept(&c)
		s.addToStepsCache(stepsFromConcept)
	}
}
Exemple #2
0
func (s *SpecInfoGatherer) onConceptFileModify(file string) {
	s.waitGroup.Add(1)
	defer s.waitGroup.Done()

	logger.APILog.Info("Concept file added / modified: %s", file)
	conceptParser := new(parser.ConceptParser)
	concepts, parseResults := conceptParser.ParseFile(file)
	if parseResults != nil && parseResults.Error != nil {
		logger.APILog.Error("Error parsing concepts: ", parseResults.Error)
		return
	}

	for _, concept := range concepts {
		c := gauge.Concept{ConceptStep: concept, FileName: file}
		s.addToConceptsCache(file, &c)
		stepsFromConcept := getStepsFromConcept(&c)
		s.addToStepsCache(stepsFromConcept)
	}
}