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

--exclude-untyped option does not exclude the untyped constants #171

Open
tk0miya opened this issue Jul 22, 2023 · 0 comments
Open

--exclude-untyped option does not exclude the untyped constants #171

tk0miya opened this issue Jul 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@tk0miya
Copy link

tk0miya commented Jul 22, 2023

Describe the bug
sord generates untyped definitions for constants even if --exclude-untyped option given.

To Reproduce

This is a minimal reproducible example.

# app/app.rb
class Foo
  CONST = 1
end

Expected behavior

I think they should be suppressed.

Actual behavior

I ran the following command:

$ bundle exec sord --rbs --exclude-untyped --no-sord-comments sig/sord.rbs  
[INFO ] Running YARD...
Files:           1
Modules:         0 (    0 undocumented)
Classes:         1 (    1 undocumented)
Constants:       1 (    1 undocumented)
Attributes:      0 (    0 undocumented)
Methods:         0 (    0 undocumented)
 0.00% documented
[OMIT ] (Foo::CONST) no YARD return type given, using untyped
[DONE ] Processed 1 objects (1 namespaces and 0 methods)  

Result:

class Foo
  CONST: untyped
end

Additional information

The latest version of rbs prototype rb command tries to analyze the type of constants statically and generates them as possible. So it's very helpful if sord does not generate the untyped constants. Then I'll be able to merge the result of these commands.

@tk0miya tk0miya added the bug Something isn't working label Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant