Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix:
Removing WithProcessAnnotation(true) which is not needed for loading data files

Signed-off-by: Punith C K <[email protected]>
  • Loading branch information
Punith C K authored and pckvcode committed Feb 11, 2025
commit 47385ce6c30e25c649a9f41d28dbafffd25dac2a
2 changes: 1 addition & 1 deletion policy/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func LoadWithData(policyPaths []string, dataPaths []string, capabilities string,
return nil, fmt.Errorf("filter data paths: %w", err)
}

documents, err := loader.NewFileLoader().WithProcessAnnotation(true).Filtered(dataPaths, func(_ string, info os.FileInfo, _ int) bool {
documents, err := loader.NewFileLoader().Filtered(dataPaths, func(_ string, info os.FileInfo, _ int) bool {
return !info.IsDir() && !contains([]string{".yaml", ".yml", ".json"}, filepath.Ext(info.Name()))
})
if err != nil {
Expand Down