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

YARD formatter doesn't bigint types well #962

Open
nfedyashev opened this issue Jul 3, 2022 · 0 comments
Open

YARD formatter doesn't bigint types well #962

nfedyashev opened this issue Jul 3, 2022 · 0 comments

Comments

@nfedyashev
Copy link

I wanted to switch the default formatter to YARD and from what I see bigint columns are not interpreted correctly

Commands

bundle exec annotate --models --show-foreign-keys -f yard

Before/after switching to YARD format

Please notice the @return [] part

--- a/app/models/team.rb
+++ b/app/models/team.rb
@@ -4,23 +4,40 @@
 #
 # Table name: teams
 #
-#  id                                                  :bigint           not null, primary key
-#  name                                                :string
-#  organization_id                                     :bigint           not null
+# @!attribute id
+#   @return []
+# @!attribute name
+#   @return [String]
+# @!attribute organization_id
+#   @return []

Expected behavior

for bigint columns(id, organization_id) I believe it should be the following instead:

+# @!attribute id
+#   @return [Integer]
+# @!attribute organization_id
+#   @return [Integer]

Version

  • annotate version 3.2.0
  • rails version 6.1.5.1
  • ruby version 3.1.2
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

No branches or pull requests

1 participant