Closed DG0BAB closed 3 years ago
+1
apply_to_dictionaries
is only verified for dictionary literals. In terms of language, literals and dictionary type declarations are different things. Feel free to submit a PR to improve this, but my initial guess is that it might be tricky to get it right.
Yeah, you are right. Only dictionary literals are ignored and not dictionary declarations. But that changed with version 0.23.x. In former versions even dictionary declarations were ignored. So currently we are still using version 0.22 as a workaround.
+1
PRs are welcome 😉
+1
+1
+1
@marcelofabri I've just tested this on master
and the issue seems to solved. Based on the commit history from version 0.25.0
to master
it seems that https://github.com/realm/SwiftLint/commit/dddb0f6cdd0f486e41257406e9cdc2d07f8f131c fixed it.
Should this issue be closed? Do you have an ETA for the next release?
@guidomb I think this is still valid. dddb0f6 is about another issue and I don't believe it would affect this one.
@marcelofabri Here is a first attempt of fixing this issue but some tests are failing I'd like to see if my patch makes sense
+1
+1 😇
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
New Issue Checklist
Bug Report
Since version 0.23.0 the "apply_to_dictionaries: false" for the colon rule isn't respected anymore. In our Project we specify dictionaries like
[key : value]
. The bug only appears if value is of type Any. This worked fine until version 0.23.0 with "apply_to_dictionaries: false"Environment