Skip to content

Conversation

@bok-
Copy link
Contributor

@bok- bok- commented Dec 13, 2024

📒 Description

The Vexil 3 @Flag macro had a bit of a gap with initialising:

@Flag(default: nil, description: "Some flag")
var someFlag: SomeType?

Because the macro is declared as a generic, and the nil literal has no type to satisfy it. This forced you to provide an initialiser, but then a lot of linters complain about unnecessary nil initialisers.

This PR allows for omitting the default value and the initialiser, so long as the type is optional.

@bok- bok- added the vexil3 Part of the Vexil 3 alpha/beta development label Dec 13, 2024
@bok- bok- enabled auto-merge December 13, 2024 12:48
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@bok- bok- merged commit 01ed3f5 into main Dec 13, 2024
39 checks passed
@bok- bok- deleted the public-extensions branch December 13, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vexil3 Part of the Vexil 3 alpha/beta development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants