Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add compatBird213 flag #24

Merged
merged 1 commit into from
Nov 6, 2024
Merged

add compatBird213 flag #24

merged 1 commit into from
Nov 6, 2024

Conversation

skoef
Copy link
Owner

@skoef skoef commented Nov 5, 2024

To solve issue #21 , the compatbird213 configuration flag was introduced. This will remove the return type from the functions.
Template rendering was overhauled a bit as well.

Copy link

sonarqubecloud bot commented Nov 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
8 Security Hotspots
24.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@tommysitehost
Copy link

cat /etc/birdwatcher.conf
compatbird213 = true
[services]
  [services."foo"]
  command = "echo test > /tmp/test"
  prefixes = ["192.168.0.0/24", "fc00::/7"]

This config generates

# DO NOT EDIT MANUALLY
function match_route()
{
	return net ~ [
		192.168.0.0/24,
		fc00::/7
	];
}

Without compatbird213 flag, it generates

# DO NOT EDIT MANUALLY
function match_route() -> bool
{
	return net ~ [
		192.168.0.0/24,
		fc00::/7
	];
}

appears to be working for me. I only tested config generation.

@skoef skoef merged commit d0f2bdc into master Nov 6, 2024
2 of 3 checks passed
@skoef
Copy link
Owner Author

skoef commented Nov 6, 2024

Thanks for testing @tommysitehost, I'll create a new release!

@skoef skoef deleted the compatFlag branch November 6, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants