I heard a quote once how carefully a person needs to analyze every drop of ink in Rashi, but I don't remember who said it. Does any Rishon (medieval scholar) ever discuss their approach to Rashi's perush on Gemara? Do they ever make diyyukim, or do very close readings of rashi?
There are many supercommentaries on Rashi's commentary to Chumash, which do pay very close attention to each word he wrote, but these are written by Acharonim for the most part.
Rashi's commentary was popular already throughout the times of the Rishonim. Here are several famous quotes from Rishonim about Rashi that I know of:
Ramban: (Inro. to commentary on Torah)
ואשים למאור פני נרות המנורה הטהורה, פירושי רבינו שלמה עטרת צבי וצפירת תפארה, מוכתר בנמוסו במקרא במשנה ובגמרא, לו משפט הבכורה, בדבריו אהגה, באהבתם אשגה, ועמהם יהיה לנו משא ומתן דרישה וחקירה, בפשטיו ובמדרשיו וכל אגדה בצורה, אשר בפירושיו זכורה
Rashbam: (Bereshis 37:2)
רבינו שלמה אבי אמי מאיר עיני גולה שפירש תורה נביאים וכתובים נתן לב לפרש פשוטו של מקרא, ואף אני שמואל ב"ר מאיר חתנו זצ"ל נתווכחתי עמו ולפניו והודה לי שאילו היה לו פנאי היה צריך לעשות פרושים אחרים לפי הפשטות המתחדשים בכל יום
Abarbanel: (Intro. to Yehoshua)
כי רע ומר לי המעשה שהרב הגדול רש"י ז"ל נסתפק בפירושיו לספרי הקדש ברוב הענינים עם מה שדרשו חז"ל
(The title implies you are speaking about Rash"i's commentary on the g'mara, which was not composed the same way as his commentary on chumash but the question does not make a distinction.)
There are many supercommentaries on the commentary on the Torah, many of whom make statements like that. A great book that analyzes it all is this one: Patterns in Rashi. If you are looking for close readings and diyukim, that is the book for you.
There is a rishon who explicitly says how to analyze Rashi. It is Rabbi Yitzhak Kanpanton from Spain. He was the rabbi of the Abuhav who was the rabbi of the Bet Yosef. He wrote a clear approach of how to learn gemara.
This book can save the world. Nothing like it in the last 500 years. The Chason Ish held highly of the book, as did the Shelah. It is Darchei Hatalmud or Darchei Hagemera.
There are two rishonim who specifically praised Rashi's work on Gemara (as opposed to Chumash):
Rashi z"l had the custom and method not to speak a thing or emit a word in his language if it were not necessary, I mean to say that when he speaks something about the language of the Gemara or explains something it is because it is [otherwise] opaque [as in, unclear], or to save one from an alternative explanation which is incorrect, or [to save one] from a question, difficulty, or problem, or to fix the language.
He similarly writes regarding questions of Tosafos: (siman 1)
With every word of Tosfos and their innovations in halakha, after you know his intent or doubt or question, you should return to inspect the words of Rashi z"l and see if he felt this [i.e. was aware of this problem] and guarded himself from it
The Meiri also has a poetic description of how Rashi must be studied with great care:
Though numerous are those who fight with him, his weapon is in his hand, and his responses that are discernable whithn his explanations are correct to those who understand them; his greatness is recognizable to only a few, for with one word he will sometimes include answers to bundles of questions
While not a rishon, R. Joseph Messas (Otzar Hamichtavim Vol. I Siman 339) mentions the quote about each drop of ink of Rashi and how rishonim viewed this.
ואף על השגור בפי כמה חכמים לומר על כל טפת דיו של רש"י ז"ל צריך לישב שבעה נקיים אין זה לדעתי רק דרך גוזמא והלצה להודיע שצריך לעיין בטוב בדבריו ואך אם אחר העיון הדק היטב לא נמצא פתרון לדבריו נקשה עליו שאף שהיה חכם אלקי ודאי שלא פלט משגיעות והרבה פעמים הקשו עליו התוס' והמפרשי' ז"ל ורשבם נכדו דבר בסתר קשות נגדו
And even the statement that is frequently in the mouths of many sages, to say that on every drop of ink of Rashi one needs to sit "seven clean days", is to my mind merely exaggerative and jocular, to point out that one needs to carefully analyze his words. But if after careful examination one does not find an interpretation for his words, one can ask against him. For even though he was a godly scholar he was certainly not saved from errors, and many times Tosafos and the commentaries ask against him. And Rashbam his grandson spoke questions against him in secret...