์ด ๋ฌธ์์ ๋ฒ์ ์ JetBrains IDE์ Copilot์ ๋ํ ๊ฒ์ ๋๋ค. ๋ค๋ฅธ ํ๋ซํผ์์ Copilot์ ๊ฒฝ์ฐ ์์ ์ ์ ํ ํญ์ ํด๋ฆญํฉ๋๋ค.
์ด ๋ฌธ์์ ๋ฒ์ ์ Visual Studio Code์ Copilot์ ๋ํ ๊ฒ์ ๋๋ค. ๋ค๋ฅธ ํ๋ซํผ์์ Copilot์ ๊ฒฝ์ฐ ์์ ์ ์ ํ ํญ์ ํด๋ฆญํฉ๋๋ค.
์ด ๋ฌธ์์ ๋ฒ์ ์ GitHub ์น ์ฌ์ดํธ์ Copilot์ ๋ํ ๊ฒ์ ๋๋ค. ๋ค๋ฅธ ํ๋ซํผ์์ Copilot์ ๊ฒฝ์ฐ ์์ ์ ์ ํ ํญ์ ํด๋ฆญํฉ๋๋ค.
์ด ๋ฌธ์์ ๋ฒ์ ์ Visual Studio์ Copilot์ ๋ํ ๊ฒ์ ๋๋ค. ๋ค๋ฅธ ํ๋ซํผ์์ Copilot์ ๊ฒฝ์ฐ ์์ ์ ์ ํ ํญ์ ํด๋ฆญํฉ๋๋ค.
์๊ฐ
GitHub Copilot์ด ๊ณต๊ฐ์ ์ผ๋ก ์ฌ์ฉ ๊ฐ๋ฅํ ์ฝ๋์ ์ผ์นํ๋ ์ ์์ ํ ์ ์๋๋ก ํ์ฉํ๋ฉด Copilot์ ์ ์ฌํ ์ฝ๋์ ๋ํ ์ฐธ์กฐ๊ฐ ํ์๋ฉ๋๋ค. Copilot ์ฝ๋ ์ฐธ์กฐ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
ํ์ ์กฐ๊ฑด
์ผ์นํ๋ ์ฝ๋์ ๋ํ ์ฐธ์กฐ๋ ๊ณต๊ฐ์ ์ผ๋ก ์ฌ์ฉ ๊ฐ๋ฅํ ์ฝ๋์ ์ผ์นํ๋ ์ ์์ ํ์ฉํ๋๋ก Copilot๊ฐ ๊ตฌ์ฑ๋ ๊ฒฝ์ฐ์๋ง ์์ฑ๋ฉ๋๋ค. ์ด๋ ๊ฐ์ธ, ์กฐ์ง ๋๋ ์ํฐํ๋ผ์ด์ฆ ์ค์ ์์ ๊ตฌ์ฑ๋ฉ๋๋ค.
์์ธํ ๋ด์ฉ์ ๊ฐ๋ณ ๊ตฌ๋ ์๋ก Copilot ์ ์ฑ ๊ด๋ฆฌ, ์กฐ์ง์์ Copilot Business์ ๋ํ ์ ์ฑ ๊ณผ ๊ธฐ๋ฅ ๊ด๋ฆฌํ๊ธฐ ๋๋ ์ํฐํ๋ผ์ด์ฆ์์ Copilot Business์ ๋ํ ์ ์ฑ ๊ณผ ๊ธฐ๋ฅ ๊ด๋ฆฌํ๊ธฐ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
์ฝ๋ ์๋ฃ๋ฅผ ์ํ ์ฝ๋ ์ฐธ์กฐ ๋ณด๊ธฐ
JetBrains IDE์ ๋ํ ๋ก๊ทธ ํ์ผ์์ ์ฝ๋ ์ฐธ์กฐ๋ฅผ ๋ณผ ์ ์์ต๋๋ค.
-
JetBrains IDE์์ ๋์๋ง > /ํ์๊ธฐ์์ ๋ก๊ทธ์ธ ํ์ ์ ํํฉ๋๋ค.
๋ก๊ทธ ํ์ผ์ด ํ์ผ ๊ด๋ฆฌ์์ ํ์๋ฉ๋๋ค. ์๋ฅผ ๋ค์ด IntelliJ IDEA์ ๊ฒฝ์ฐ ๋ก๊ทธ ํ์ผ์
idea.log
์ ๋๋ค. -
JetBrains IDE์์ ๋ก๊ทธ ํ์ผ์ ์ฝ๋๋ค.
-
โ[ํผ๋ธ๋ฆญ ์ฝ๋ ์ฐธ์กฐ]โ๋ฅผ ๊ฒ์ํฉ๋๋ค.
๋ก๊ทธ ํญ๋ชฉ ์์
2025-02-26 09:22:12,045 [5581906] INFO - #copilot - [Public Code References] Text found matching public code in file:///Users/mona-lisa/git-repos/test-repo/fizzbuzz.js [Ln 1, Col 10] near fizzBuzz() ...:
1) [NOASSERTION] https://github.com/nixsticks/todos/blob/ae427a721c7784da64a619ba17f60637fe1cc819/Loops/fizzbuzz/fizzbuzz.js
2) [GPL-3.0] https://github.com/voloslg/algocasts/blob/34b423517486f908ca167b390d3b8bd05653829f/exercises/fizzbuzz/index.js
๋ก๊ทธ ํญ๋ชฉ์๋ ๋ค์ ์ธ๋ถ ์ ๋ณด๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
- ์ ์์ ์๋ฝํ ๋ ์ง์ ์๊ฐ
- ์ ์ฌํ ์ฝ๋๊ฐ ๋ฐ๊ฒฌ๋์์์ ์๋ฆฌ๋ โํผ๋ธ๋ฆญ ์ฝ๋ ์ฐธ์กฐโ ๋ฉ์์ง์ ๋๋ค.
- ์ ์์ด ์ถ๊ฐ๋ ํ์ผ์ ๊ฒฝ๋ก์ ๋๋ค.
- ์ ์์ด ์ถ๊ฐ๋ ์ค๊ณผ ์ด ๋ฒํธ์ ๋๋ค.
- ๋ค์์ ํฌํจํ ์ผ์น ํญ๋ชฉ ๋ชฉ๋ก์
๋๋ค.
- ์ผ์นํ๋ ์ฝ๋์ ๋ผ์ด์ ์ค ์ ํ์ด๊ฑฐ๋ ๋ผ์ด์ ์ค๋ฅผ ์ฐพ์ ์ ์๋ ๊ฒฝ์ฐ
NOASSERTION
์ ๋๋ค. - ์ผ์นํ๋ ์ฝ๋๊ฐ ๋ฐ๊ฒฌ๋ GitHub.com์ ์๋ ํ์ผ์ URL.
- ์ผ์นํ๋ ์ฝ๋์ ๋ผ์ด์ ์ค ์ ํ์ด๊ฑฐ๋ ๋ผ์ด์ ์ค๋ฅผ ์ฐพ์ ์ ์๋ ๊ฒฝ์ฐ
์ฝ๋ ์ฐธ์กฐ ๊ธฐ๋ฅ ํ์ธ
You can verify that code referencing is working by prompting Copilot to add some commonly used code and checking the output in the log.
-
Create a file called
fizz-buzz.js
and open it in the editor. -
Display the log as described in the previous section.
-
In the editor, type:
function fizzBuzz()
With a space after the closing parenthesis.
GitHub Copilot should suggest code to complete the function. Typically the suggestion will be a common implementation of the fizz buzz algorithm that will match publicly available code on the GitHub website.
-
To accept the suggestion, press Tab.
-
Check whether any entries for similar code have been added to the log.
์ฝ๋ ์๋ฃ๋ฅผ ์ํ ์ฝ๋ ์ฐธ์กฐ ๋ณด๊ธฐ
Visual Studio Code์ GitHub Copilot ๋ก๊ทธ ์ค ํ๋์์ ์ฝ๋ ์ฐธ์กฐ๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค.
-
Visual Studio Code์ ๋ฉ๋ด ๋ชจ์์์ ๋ณด๊ธฐ > ์ถ๋ ฅ์ ์ ํํ์ฌ ์ถ๋ ฅ ์ฐฝ์ ์ฝ๋๋ค.
-
Output ์ฐฝ์ ์ค๋ฅธ์ชฝ์ ์๋ ๋๋กญ๋ค์ด ๋ฉ๋ด์์ GitHub Copilot Log (Code References) ๋ฅผ ์ ํํฉ๋๋ค.
-
Visual Studio Code์์ GitHub Copilot์ ์ฌ์ฉํ๋ ๋์ GitHub Copilot Log (Code References) ๋ณด๊ธฐ๋ฅผ ํ์ํฉ๋๋ค.
๊ณต์ฉ GitHub ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ฝ๋์ ์ผ์นํ๋ ์ฝ๋ ์์ฑ ์ ์์ ์๋ฝํ๋ฉด ํญ๋ชฉ์ด ๋ก๊ทธ์ ์ถ๊ฐ๋ฉ๋๋ค.
๋ก๊ทธ ํญ๋ชฉ์๋ ๋ค์ ์ธ๋ถ ์ ๋ณด๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
- ์ ์์ ์๋ฝํ ๋ ์ง์ ์๊ฐ
- ์ ์์ด ์ถ๊ฐ๋ ํ์ผ์ ์ด๋ฆ
- "Similar code at" ๋ค์ ์ ์์ด ์ถ๊ฐ๋ ํ์ผ ์์น๊ฐ ํ์๋ฉ๋๋ค.
- ์ฝ๋ ์์ฑ์ ํตํด ์ถ๊ฐ๋ ์ฝ๋์ ์ถ์ถ๋ฌผ์ ๋๋ค.
- ์ผ์นํ๋ ์ฝ๋๊ฐ ๋ฐ๊ฒฌ๋๋ฉด ํด๋น ๋ผ์ด์ ์ค ์ ํ์ด๊ณ , ๊ทธ๋ ์ง ์์ผ๋ฉด
unknown
์ ๋๋ค. - ์ ์ฌํ ์ฝ๋๊ฐ ๋ฐ๊ฒฌ๋ GitHub.com์ ์๋ ํ์ผ์ URL.
๋ก๊ทธ ํญ๋ชฉ ์์
2025-03-27 12:17:54.759 [info] file:///Users/monalisa/fizzbuzz.js Similar code at [Ln 2, Col 8] let i = 1; i <= 100; i++) { let output = ''; if (i % 3 === 0) { output += 'Fizz';...
2025-03-27 12:17:54.759 [info] License: unknown, URL: https://github.com/octo-org/octo-repo/blob/8563f3b1d4f33952b22212b86e745539d1567ed1/examples/fizzBuzz.js
2025-03-27 12:17:54.759 [info] License: MIT, URL: https://github.com/octo-org/monalisa/blob/7e974691f4c8e6bc55f9b50688f05d746d1bc52b/exercises/2/fizz-buzz.js
์ฝ๋ ์ฐธ์กฐ ๊ธฐ๋ฅ ํ์ธ
You can verify that code referencing is working by prompting Copilot to add some commonly used code and checking the output in the log.
-
Create a file called
fizz-buzz.js
and open it in the editor. -
Display the log as described in the previous section.
-
In the editor, type:
function fizzBuzz()
With a space after the closing parenthesis.
GitHub Copilot should suggest code to complete the function. Typically the suggestion will be a common implementation of the fizz buzz algorithm that will match publicly available code on the GitHub website.
-
To accept the suggestion, press Tab.
-
Check whether any entries for similar code have been added to the log.
์ฝ๋ ์๋ฃ๋ฅผ ์ํ ์ฝ๋ ์ฐธ์กฐ ๋ณด๊ธฐ
Visual Studio์ GitHub Copilot ๋ก๊ทธ์์ ์ฝ๋ ์ฐธ์กฐ๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค.
-
๋ฉ๋ด ๋ชจ์์์ View๋ฅผ ํด๋ฆญํฉ๋๋ค.
-
๋๋กญ๋ค์ด ๋ฉ๋ด์์ Output์ ํด๋ฆญํฉ๋๋ค.
-
์ถ๋ ฅ ๋ณด๊ธฐ์์ "Show output from" ์ค๋ฅธ์ชฝ์ ์๋ ์์๋ฅผ ํด๋ฆญํ๊ณ GitHub Copilot ์ ์ ํํฉ๋๋ค.
-
Visual Studio Code์์ GitHub Copilot์ ์ฌ์ฉํ๋ ๋์ ๋ก๊ทธ๋ฅผ ํ์๋ ์ํ๋ก ๋ก๋๋ค.
๊ณต์ฉ GitHub ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ฝ๋์ ์ผ์นํ๋ ์ฝ๋ ์์ฑ ์ ์์ ์๋ฝํ๋ฉด ํญ๋ชฉ์ด ๋ก๊ทธ์ ์ถ๊ฐ๋ฉ๋๋ค.
๋ก๊ทธ ํญ๋ชฉ์๋ ๋ค์ ์ธ๋ถ ์ ๋ณด๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
- ์ ์์ ์๋ฝํ ์๊ฐ์ ๋๋ค. ์๊ฐ์ด ํ์๋์ง ์์ผ๋ฉด "Show Timestamp" ์๊ณ ์์ด์ฝ์ ํด๋ฆญํ์ธ์.
[Completions Public Code Match Information]
์ค๋ช ์ ๋๋ค.- ์ผ์นํ๋ ์ฝ๋๊ฐ ๋ฐ๊ฒฌ๋๋ฉด ํด๋น ๋ผ์ด์ ์ค ์ ํ์ด๊ณ , ๊ทธ๋ ์ง ์์ผ๋ฉด
NOASSERTION
์ ๋๋ค. - ์ ์ฌํ ์ฝ๋๊ฐ ๋ฐ๊ฒฌ๋ GitHub.com์ ์๋ ํ์ผ์ URL.
๋ก๊ทธ ํญ๋ชฉ ์์
09:39:16:203 [Completions Public Code Match Information] Similar code with license type [MIT] https://github.com/octo-org/octo-repo/blob/34deb75eb6a2e22483ed465a6aec38c02eb2536e/routines/quicksort.js
์ฝ๋ ์ฐธ์กฐ ๊ธฐ๋ฅ ํ์ธ
You can verify that code referencing is working by prompting Copilot to add some commonly used code and checking the output in the log.
-
Create a file called
fizz-buzz.js
and open it in the editor. -
Display the log as described in the previous section.
-
In the editor, type:
function fizzBuzz()
With a space after the closing parenthesis.
GitHub Copilot should suggest code to complete the function. Typically the suggestion will be a common implementation of the fizz buzz algorithm that will match publicly available code on the GitHub website.
-
To accept the suggestion, press Tab.
-
Check whether any entries for similar code have been added to the log.
Copilot Chat์ ์ฝ๋ ์ฐธ์กฐ๋ฅผ ํ์ธํ์ธ์.
Copilot Chat์ ์๋ต์ ์ผ์นํ๋ ์ฝ๋๊ฐ ํฌํจ๋ ๊ฒฝ์ฐ ์๋ต ๋์ ๋ค์ ํ ์คํธ๋ก ํ์๋ฉ๋๋ค.
N ๋ผ์ด์ ์ค ์ ํ์ด ์๋ ์ ์ฌํ ์ฝ๋ - ์ผ์น ํญ๋ชฉ ๋ณด๊ธฐ
-
์ผ์น ํญ๋ชฉ ๋ณด๊ธฐ๋ฅผ ํด๋ฆญํ์ฌ ์ผ์นํ๋ ์ฝ๋์ ์ธ๋ถ ์ ๋ณด๋ฅผ ์ ํธ์ง๊ธฐ ํญ์ ํ์ํฉ๋๋ค.
์ผ์นํ๋ ์ฝ๋์ ๊ฐ ์๊ฐ ํธ์ง๊ธฐ์ ํ์๋ฉ๋๋ค.
- ์ผ์นํ๋ ์ฝ๋์ ๋ผ์ด์ ์ค ์ ํ(์๋ ค์ง ๊ฒฝ์ฐ).
- ์ผ์นํ๋ ์ฝ๋๊ฐ ๋ฐ๊ฒฌ๋ GitHub.com์ ์๋ ํ์ผ์ URL.
- ์ผ์นํ๋ ์ฝ๋๋ฅผ ๋ณด์ฌ ์ฃผ๋ ์ฝ๋ ์กฐ๊ฐ.
-
ํธ์ง๊ธฐ์์ URL์ Ctrl+ํด๋ฆญ(Windows/Linux) ๋๋ Command+ํด๋ฆญ(Mac)ํ์ฌ GitHub.com์ ์ ์ฒด ํ์ผ์ ๋ด ๋๋ค.
Copilot Chat์ ์๋ต์ ์ผ์นํ๋ ์ฝ๋๊ฐ ํฌํจ๋ ๊ฒฝ์ฐ ์๋ต ๋์ ๋ค์ ํ ์คํธ๋ก ํ์๋ฉ๋๋ค.
N ๋ผ์ด์ ์ค ์ ํ์ด ์๋ ์ ์ฌํ ์ฝ๋ - ์ผ์น ํญ๋ชฉ ๋ณด๊ธฐ
-
์ผ์น ํญ๋ชฉ ๋ณด๊ธฐ๋ฅผ ํด๋ฆญํ์ฌ ์ผ์นํ๋ ์ฝ๋์ ์ธ๋ถ ์ ๋ณด๋ฅผ ์ ํธ์ง๊ธฐ ํญ์ ํ์ํฉ๋๋ค.
์ผ์นํ๋ ์ฝ๋์ ๊ฐ ์๊ฐ ํธ์ง๊ธฐ์ ํ์๋ฉ๋๋ค.
- ์ผ์นํ๋ ์ฝ๋์ ๋ผ์ด์ ์ค ์ ํ(์๋ ค์ง ๊ฒฝ์ฐ).
- ์ผ์นํ๋ ์ฝ๋๊ฐ ๋ฐ๊ฒฌ๋ GitHub.com์ ์๋ ํ์ผ์ URL.
- ์ผ์นํ๋ ์ฝ๋๋ฅผ ๋ณด์ฌ ์ฃผ๋ ์ฝ๋ ์กฐ๊ฐ.
-
ํธ์ง๊ธฐ์์ URL์ Ctrl+ํด๋ฆญ(Windows/Linux) ๋๋ Command+ํด๋ฆญ(Mac)ํ์ฌ GitHub.com์ ์ ์ฒด ํ์ผ์ ๋ด ๋๋ค.
Copilot Chat์ ์๋ต์ ์ผ์นํ๋ ์ฝ๋๊ฐ ํฌํจ๋ ๊ฒฝ์ฐ ๋ค์ ํ ์คํธ์ ๋ฐ๋ผ ์ ์๋ ์ฝ๋ ์๋์ ํ์๋ฉ๋๋ค.
ํผ๋ธ๋ฆญ ๋ฆฌํฌ์งํ ๋ฆฌ์์ ์ ์ฌํ ์ฝ๋๋ฅผ ์ฐพ์์ต๋๋ค. View matches
View matches๋ฅผ ํด๋ฆญํ์ฌ GitHub Copilot ๋ก๊ทธ๊ฐ ์์ง ์ด๋ ค ์์ง ์์ผ๋ฉด ๋ก๊ทธ๋ฅผ ์ด๊ณ ์ผ์นํ๋ ์ฝ๋์ ์ธ๋ถ ์ ๋ณด๋ฅผ ์ถ๊ฐํฉ๋๋ค.
์ธ๋ถ ์ ๋ณด๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- ๋ก๊ทธ์ ์ธ๋ถ ์ ๋ณด๋ฅผ ์ถ๊ฐํ ์๊ฐ์ ๋๋ค. ์๊ฐ์ด ํ์๋์ง ์์ผ๋ฉด "Show Timestamp" ์๊ณ ์์ด์ฝ์ ํด๋ฆญํ์ธ์.
- ์ผ์นํ๋ ์ฝ๋ ๋ชฉ๋ก ์์ ์ฒซ ๋ฒ์งธ ๋ก๊ทธ ํญ๋ชฉ์ธ ์ค๋ช
[Code Match]
์ ๋๋ค. - ์ ์ฌํ ์ฝ๋์ ๊ฐ ์ธ์คํด์ค์ ๋ํ ๋ผ์ด์ ์ค ์ ํ(๋ฐ๊ฒฌ๋ ๊ฒฝ์ฐ)์ ๋๋ค.
- ์ผ์นํ๋ ์ฝ๋๊ฐ ๋ฐ๊ฒฌ๋ GitHub.com์ ์๋ ํ์ผ์ URL.
- ์ผ์นํ๋ ์ฝ๋๋ฅผ ๋ณด์ฌ ์ฃผ๋ ์ฝ๋ ์กฐ๊ฐ.
๋ก๊น ์์
09:24:10:525 [Code Match] Similar code with 2 license type(s) [MIT, NOASSERTION]
09:24:10:525 ## License: MIT
09:24:10:525 https://github.com/octo-org/octo-repo/tree/127aac4ab27a42706af01be80f7aae3b83f44fbc/buzzfizz.py
09:24:10:525 ```
09:24:10:525 for i in range(1, n + 1):
09:24:10:525 if i % 3 == 0 and i % 5 == 0:
09:24:10:525 print('FizzBuzz')
09:24:10:525 elif i % 3 == 0:
09:24:10:525 print('Fizz')
09:24:10:525 elif i % 5 == 0:
09:24:10:525 ```
09:24:10:525 ## License: NOASSERTION
09:24:10:525 https://github.com/octo-org/monalisa/tree/011308746e53b26b128fa53c044a2527c39231f0/fizz-buzz.py
09:24:10:525 ```
09:24:10:525 i % 3 == 0 and i % 5 == 0:
09:24:10:525 print('FizzBuzz')
09:24:10:525 elif i % 3 == 0:
09:24:10:525 print('Fizz')
09:24:10:525 elif i % 5 == 0:
09:24:10:525 print('Buzz')
09:24:10:525 else:
09:24:10:525 print(i)
09:24:10:525 ```
Copilot Chat์ด ํผ๋ธ๋ฆญ GitHub ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ฝ๋์ ์ผ์นํ๋ ์ฝ๋๋ฅผ ํฌํจํ๋ ์๋ต์ ์ ๊ณตํ๋ ๊ฒฝ์ฐ ์ฝ๋ ์ ์ ์๋์ ํ์๋ฉ๋๋ค.
n ๋ฆฌํฌ์งํ ๋ฆฌ์์ < > ๊ณต์ฉ ์ฝ๋ ์ฐธ์กฐ
์ผ์นํ๋ ์ฝ๋์ ์ธ๋ถ ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ๋ค์์ ์ํํฉ๋๋ค.
-
"๊ณต์ฉ ์ฝ๋ ์ฐธ์กฐ..."๋ฅผ ํด๋ฆญํฉ๋๋ค. ์ฝ๋ ์ ์ ์๋์ ํ ์คํธ์ ๋๋ค.
์ผ์นํ๋ ์ฝ๋๊ฐ ํฌํจ๋ GitHub ๋ฆฌํฌ์งํ ๋ฆฌ ๋ชฉ๋ก์ด ๋ผ์ด์ ์ค ์ ๋ณด์ ํจ๊ป ๋๋กญ๋ค์ด์ ํ์๋ฉ๋๋ค(์๋ ๊ฒฝ์ฐ).
-
GitHub.com์ ํด๋น ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ํ์ํ๋ ค๋ฉด ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ด๋ฆ์ ํด๋ฆญํฉ๋๋ค.