nginxinc / nginx-go-crossplane

A library for working with NGINX configs in Go
Apache License 2.0
46 stars 12 forks source link

enhancement: add option to skip acyclic check #82

Closed CodeMonkeyF5 closed 6 months ago

CodeMonkeyF5 commented 6 months ago

Support skip of acyclic check for cases where cyclical includes are warranted.

Proposed changes

If the file parsed is not the root conf file, then no need to perform acyclic check. If no root conf file is specified for the parsing options, then perform the acyclic check.

This allows for separate parsing of multiple configuration files without getting a "configs contain include cycle" error for ones that are not the root conf.

Issue: https://github.com/nginxinc/nginx-go-crossplane/issues/81

Checklist

Before creating a PR, run through this checklist and mark each as complete.