Is it OK if I write a question and include a link to GitHub/Pastebin/other similar site instead of putting the code here on Code Review?
No. We require the code to be contained within the question, for the following reasons:
- To avoid dependency on third-party hosting services. These links tend to go away after a while.
- To prevent review requests of huge projects.
- To make it easier to see the code and so it can interest more reviewers and get more reviews.
- To avoid confusion when the OP changes the code in the repository and suddenly the answers no longer apply to the code.
(Some of these points have been taken from Winston Ewert's answer to another question.)
If your code is too long (doesn't fit within the 65 535 character limit for posts on Code Review), please select only the portions of the code where you are especially interested in getting reviewed. In such a case, you may add a link to a site where more of your code can be seen, but don't expect anyone here to review it.
Why other users should avoid updating questions to add in the code for you
You might think, "Why don't you just update my question and add the code from my link, instead of putting my question on hold?" We can't do this because of copyright. All code posted here must be licensed under Creative Commons Attribution-ShareAlike. As the owner of copyright in the code you have written, you are the only person who can license it. No-one else has the legal authority to do it for you.