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

[SourceKitten] No longer count initializers with parameters as undocumented #184

Merged
merged 3 commits into from
Mar 23, 2015

Conversation

jpsim
Copy link
Collaborator

@jpsim jpsim commented Mar 23, 2015

Fixes #183.

Initializers with parameters would be counted additional times for each undocumented parameter (which SourceKit oddly categorizes as local variables instead of parameters). This meant that initializers showed up in /undocumented.txt and affected code coverage percentage.

Care to take a look @segiddins and @jessesquires?

@@ -13,7 +13,9 @@

##### Bug Fixes

* None.
* No longer count initializers with parameters as undocumented.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two spaces

def declaration?
kind =~ /^source\.lang\.swift\.decl\..*/
end

def param?
kind == 'source.lang.swift.decl.var.parameter' ||
kind == 'source.lang.swift.decl.var.local'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a comment saying why var.local is a param

@segiddins
Copy link
Collaborator

Do we need to add a test to misc?

@jessesquires
Copy link
Contributor

thanks @jpsim ! 👍

@jpsim
Copy link
Collaborator Author

jpsim commented Mar 23, 2015

All good comments, @segiddins. Thanks.

@segiddins
Copy link
Collaborator

👍

jpsim added a commit that referenced this pull request Mar 23, 2015
[SourceKitten] No longer count initializers with parameters as undocumented
@jpsim jpsim merged commit 359fb8c into master Mar 23, 2015
@jpsim jpsim deleted the jp-skip-params branch March 23, 2015 00:57
@pigeondotdev pigeondotdev modified the milestone: The Past Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initializers with parameters are incorrectly detected as undocumented
4 participants