-
-
Notifications
You must be signed in to change notification settings - Fork 909
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
fix: with_foreign_key modifier fails with wrong error message #1376
fix: with_foreign_key modifier fails with wrong error message #1376
Conversation
There is something wrong with the Run linters action:
I will try to understand the problem. |
Hmm, it seems to be related to this problem: wearerequired/lint-action#13. I think since you have commit access now you should be able to push a branch directly to the repo instead of making a PR from your fork. That may be a solution for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this bug wasn't caught before but your fix seems right to me!
I see. For the next PR I will not use my fork anymore. Thanks for the suggestion. So, for now, if anyone opens a PR we will need to ask them to run the rubocop locally just to make sure that they're not adding any offense. I did it on this PR and there is no offense. Can I merge it or do you prefer that I open a new PR not using my fork? |
That will defeat the purpose of automating it.
I was aware of the issue but i didn't anticipated this effect. I misunderstood that issue in some way thinking that the token was of the fork so it would not add the annotation on the destination repo, but once #1371 is merged this will not happen. @mcmire what do you think about removing OR we can try this wearerequired/lint-action#13 (comment). |
So for now using a custom rubocop lint action without annotation seems a reasonable compromise as hound does not support rubocop > 0.91 @mcmire Thoughts? |
@KapilSachdev Dang, that's annoying. Well, okay, I guess a lint action that doesn't support annotations is better than not having one. So I'd be fine with that. |
I noticed that a fix for the CI was recently added on master. I'll rebase this branch. |
2649b17
to
1f1f9f1
Compare
Yes, the annotation based rubocop linting is replaced with a simple workflow to check rubocop offences. |
It worked. Merging. Thanks! |
Closes #1374
I noticed that for the scenario described on issue #1374 the class_has_foreign_key?(klass) was entering in the first conditional and than running this piece of code:
It seems to me that the problem with this flow is that it just returns false without updating the failure message. What do you think?