I often hear that the printed "Rashi" commentary in certain masechtot of the Talmud Bavli (first that come to mind are Moed Katan and Nedarim) is not actually written by Rashi. Does anyone have a full list of which of the commentaries were actually written by Rabbi Shlomo Yitzchaki and which were written by others in his style? How would one tell the difference?
According to the JNUL website,
Printed editions of the commentaries on tractates Ta’anit, Nedarim, Nazir and Horayot have been mistakenly attributed to him, and were most probably written by the scholars of Mainz or others. Likewise the printed commentary on Moed Katan is wrongly attributed to him. Two tractates have partial Rashi commentaries: Bava Batra (until 29b) and Makkot (until 20a). There is some conjecture as to whether Rashi was the author of the commentary on the Tractate Avot printed in the Siddur Tefila (daily prayerbook), edited by Netanel ben Peretz Halfan, Trino, 1525.
As to how one would be able to tell the difference, I assume it is through normal literary analysis methods, such as style of writing, linguistics, access (or lack thereof) to certain other texts quoted within, reconciliation with author's other writings, etc.
I would just like to edit this post of mine, which after 11 years needs to be updated. I'll go through each Masechta. For anything that I say just "Rashi", that means that everyone who learns Gemara assumes that it's Rashi, and I have never seen any proof otherwise. For an original discussion of Rashi, see שם הגדולים לחיד׳׳א, ערך רש׳׳י. [Many of the things that I source could benefit from daf numbers, footnotes, and general sourcing. I am not going into all of that right this second. Anyone who knows the dapim, teshuvos numbers, etc, should edit them in.]
Brachos - Rashi.
Shabbos - Rashi, though the Rashi on Shabbos has some notable differences from other Masechots. The one that is most obvious is that he quotes his teachers (רבינו יהודה הלוי and רבינו יצחק) much more than in other Masechtos.
Eiruvin - Rashi, though at times it almost seems that Rashi assumes that you know more than can be accounted for. The reason for this (I have found) is that what is printed as Rashi isn't complete - the Or Zarua on Eiruvin very extensively quotes Rashi, with more actual text than is printed in the Vilna Shas. To get a full picture of what Rashi means, you need both.
Pesachim - Rashi, and Rashbam on the last perek. The Rashi on the last Perek is quite brief.
Rosh Hashanah: Rashi.
Yoma: Rashi. Moznaim printing house prints a commentary called "פירוש רבינו אליקם בן משולם" on Yoma. This commentary predates Rashi, and is written in a similar style. It is almost certainly the "Kuntres of Mayence", which is also sometimes attributed to R. Gershom Me'or HaGolah. There are some Rishonim that quote "Rashi", and it is none other than R. Elkayam (the Ritva does this in at least one place). This author wrote a commentary on most of Shas (see the Mozanim introduction), and if we had it, I assume that most of the confusion about the "Kuntres" of Tosafos which is not always in Rashi would be alleviated. See further under Bava Basra.
Sukka, Beitza - Rashi.
Taanis: Not Rashi. See the first Mahartzach on Taanis. Upon comparison between the commentary printed under the name "R. Gershom" on Taanis and the "Rashi", it it obvious that there's something like 90% overlap. It is very likely IMO that "Rashi" here is actual R. Elkayam. Something else to note is that Tosafos on Taanis (which is an odd commentary in of itself, see בעלי התוספת by E.E. Urbach in his entry about Maseches Taanis) quotes lots of "Rashi" - but never says פירוש הקונטרס or כתב רש׳׳י like they do in other Masechtos. It is just block quotes of the commentary on Taanis, without attribution. The few places he actually quotes Rashi are from other Masechtos.
Megillah - Rashi
Moed Katan - R. Gershom. The original Rashi, which is quoted by Tosafos, is printed in the set of seforim called "על מסכת", and reprinted in the Oz Vehadar Shas.
Chagiga - Rashi
Yevamos - Rashi
Kesubos - Rashi, though the Shitta Mekubetzes of R. Bezalel Ashkenazi extensively quotes a much longer version of Rashi.
Nedarim - Not Rashi. Some of the פירוש in the middle of the Masechta is attributed to R. Gershom. See above re: Maseches Yoma and R. Elkayam - it is possible that the commentary on Nedarim is by R. Elkayam.
Nazir - Rivan, Rashi's son-in-law
Sotah - Rashi
Gittin, Kidushin - Rashi
Bava Kama, Bava Metzia - Rashi
Bava Basra - Rashi until the second page of the third Perek, and Rashbam after that. We have the entire commentary of R. Gershom on Bava Basra, which was printed with a critical edition by מכון אור שמח. See the introduction, in which evidence is brought that it is possibly misattributed to R. Gershom, and is actually by R. Elkayam (the Rosh in Teshuvos quotes it as פירוש רבינו אלקים).
Sanhedrin - Rashi, except with possibly the 11th perek. See the Oz Vehadar notes, which raise the possibility that it is not by Rashi.
Makkos - Rashi until 18b, then Rivan. R. Gershom for the last page.
Shavuos - Rashi
Avodah Zarah - Rashi
Avos - R. Simcha of Vitri, Rashi's student and the author of מחזור ויטרי
Horayos - Everyone says "it's not Rashi", with no particular proof. A critical edition of Gemara, Rashi and Tosafos HaRosh was done by Machon Ahavat Shalom. In their introduction, they show how other rishonim quote the commentary on Horayos as "Rashi", and show that there isn't really any reason to doubt that.
Zevachim - Rashi, with the exception of several daf in the middle.
Menachos - Rashi, until the middle of the 6th perek. From there until the last perek, there are two printed versions of Rashi, one from the printer and one from R. Bezalel Ashkenazi. Tosafos usually quote the one from RBA. This would lead one to think that the "regular" Rashi is in fact R. Elkayam or R. Gershom.
Chullin - Rashi.
Bechoros - Rashi. The last few pages have a similar issue as the middle of Menachos.
Arachin, Temurah, Kerisos - Rashi. On Temurah "they say" that it isn't Rashi, but I have seen no such proof.
Meilah, Tamid, Kinnim - Not Rashi. On all of the these the commentator quotes Rashi from other Masechtos.
Niddah - Rashi.
In some cases it is brutally obvious -- pseudo-Rashi on Tamid, for example, cites Rashi on Shabbat by name. In others it's more difficult to tell. A few tools -- pseudo-Rashi occasionally cites different foreign languages, or the same ones (French, German/Yiddish) at different frequencies. pseudo-Rashi occasionally explicitly disagrees with genuine Rashi on other sugyos. An experienced reader will sometimes, but not always, notice a change in style, habitual vocabulary, or sources. And we are not the first to wonder -- in the case of many masechtot this is an old issue on which later commentaries have already done the work and recent printed editions may even mark the transition on the page.
According to Oz V’hadar, Rashi on Chelek is not actually Rashi; they note, however, that this isn’t so well-accepted. On Daf 90a, footnote נ, they write:
נראה למי שמכיר בלשון הרש״י הקצר והנקי שפירש פרק חלק אינו מרש״י אלא מאחד מתלמידיו, אבל מה אעשה שהרמ״ה העתיק ממנו דיבורים שלימים וכתב על זה ״ורבינו שלמה פירש.״
It appears to one who recognizes the words of Rashi as short and clear that the commentary on Perek Chelek is not from Rashi, but rather from one of his students. But what can I do? The Rama”h already quoted from him complete phrases, writing on this, “Rabbeinu Shlomo explained.”