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

Hunk headers don't work with Swift #444

Closed
lilyball opened this issue Jan 6, 2017 · 6 comments
Closed

Hunk headers don't work with Swift #444

lilyball opened this issue Jan 6, 2017 · 6 comments

Comments

@lilyball
Copy link

lilyball commented Jan 6, 2017

Reviewable's diff hunk header detection only seems to show me top-level declarations, e.g. the class declaration. It doesn't recognize functions. Ideally it would recognize the nearest enclosing function or type definition, including nested functions/types.

@pkaminski pkaminski added the bug label Jan 7, 2017
@pkaminski
Copy link
Member

Reviewable leverages highlightjs.org syntax coloring annotations to detect declarations in all supported languages, so it's possible that the Swift language definition there is misconfigured or incomplete. Since I don't know Swift, could you point me to any PR with Swift code and list a few lines that should be treated as declarations but aren't? Then I can look into what highlightjs does with them and report the bug upstream if appropriate. Thanks.

@lilyball
Copy link
Author

lilyball commented Jan 9, 2017

Huh, I just found an old public PR that I was going to use, but it's actually showing the hunk headers as expected. The PR that I was reviewing that prompted this particular issue is a private one. I'll have to investigate a bit further to see if I can figure out what the difference is.

@veeamd
Copy link

veeamd commented Jun 27, 2017

I have the same issue.

@veeamd
Copy link

veeamd commented Jun 27, 2017

Sorry, it's a private PR, I can only show you some screenshots of the code.
screenshot 2017-06-27 11 38 57
After expanding the code:
screenshot 2017-06-27 11 39 13

@pkaminski
Copy link
Member

These look like screenshots from github.com -- can you provide screenshots from Reviewable please?

@pkaminski
Copy link
Member

Closing due to lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants