Skip to content

fix: More accurate source locations for method names. #92

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

Merged
merged 19 commits into from
Sep 6, 2022

Conversation

varungandhi-src
Copy link
Contributor

@varungandhi-src varungandhi-src commented Sep 5, 2022

TODO

  • Add more tests
  • Clean up added TODOs
  • Fix behavior for def_delegator.
  • Perhaps add more docs on other source locations
  • Remove debug print statements

Motivation

Fixes #49, make progress towards #1.

Test plan

Updated existing tests, added new test for structs

Comment on lines +5 to +6
alias_method :am_aaa, :aaa
alias :a_aaa :aaa
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've filed #93 for this.

Comment on lines +6 to +8
delegate :ball, to: :thing, private: true, allow_nil: true
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reference [..] Proc#
# ^^^^^ definition [..] MethodNameManipulation#ball().
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missing a reference for :thing, filed #95.

Comment on lines +19 to +26
from 1..2, :foo
# ^^^^ definition [..] Flatfile#`foo=`().
# ^^^^ definition [..] Flatfile#foo().
pattern(/A-Za-z/, :bar)
# ^^^^^^^^ reference [..] Regexp#
# ^^^^ definition [..] Flatfile#bar().
# ^^^^ definition [..] Flatfile#`bar=`().
field :baz
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are missing references for 'from', 'pattern' and 'field', filed #96.

Comment on lines +56 to +62
instance_helper
end

it 'can read foo' do
# ^^^^^^^^^^^^^^ definition [..] MyTest#`<it 'can read foo'>`().
T.assert_type!(@foo, Integer)
instance_helper
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missing references for instance_helper here, filed #94.

def assert(test)
# ^^^^^^ definition [..] MyTest#assert().
# ^^^^ definition local 1~#2774883451
test ? true : false
Copy link
Contributor Author

@varungandhi-src varungandhi-src Sep 6, 2022

Choose a reason for hiding this comment

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

Missing a reference for the parameter here, filed #97.


setup do
# ^^^^^ definition [..] MyTest#initialize().
@a = T.let(1, Integer)
Copy link
Contributor Author

@varungandhi-src varungandhi-src Sep 6, 2022

Choose a reason for hiding this comment

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

Missing a definition/reference here, filed #97.

Copy link
Contributor Author

@varungandhi-src varungandhi-src left a comment

Choose a reason for hiding this comment

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

Well, that was a bunch of work...

@varungandhi-src varungandhi-src changed the title [WIP] fix: More accurate source locations for method names. fix: More accurate source locations for method names. Sep 6, 2022
@varungandhi-src varungandhi-src merged commit 8e19d02 into scip-ruby/master Sep 6, 2022
@varungandhi-src varungandhi-src deleted the vg/structs branch September 6, 2022 12:46
@varungandhi-src varungandhi-src mentioned this pull request Sep 6, 2022
57 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix source ranges for def_delegator
1 participant