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
Attributes with arguments lead to false positives #4843
Comments
The current implementation is like, when an attribute has arguments it should be on a separate line. You can configure that with the option |
This is a breaking change from 0.50.3. |
Not really. It has always been intended like that. However, the rule contained a bug that prevented custom (not built in) attributes to be ignored. |
In first instance maybe better then to update the message given, indicating that this is expected behavior for attributes with arguments. |
These main concepts in SwiftUI apps are flagging too. Seems like this will have to be a rule I temporary turn off until customization is allowed in detail.
|
#4855 adds a new option Besides that, the existing options @edorphy: The rule considers your attribute to be on the same line with the variable declaration because the closing parenthesis is. With the new option set to @FetchRequest(
// ...
)
var entities: FetchedResults<EntityType> if your style guide allows. Are people happy with this new option? Opinions? |
New Issue Checklist
Describe the bug
lines like
@Persisted(primaryKey: true) var id: Int
are marked withAttributes Violation: Attributes should be on their own lines in functions and types, but on the same line as variables and imports (attributes)
, but lines like@Persisted var reelId: Int
are (correctly) recognised as fineEnvironment
If so, paste their relative paths and respective contents.
The text was updated successfully, but these errors were encountered: