sassoftware / sassoftware/sas-copilot

Generate code: generate code for multiple comments instead of the one that was selected

Open
#33 0 comments 0 reactions 1 assignee View on GitHub

@2TomLi is already working on this.

Since Apr 5, 2024.

bug
Dominant language
TypeScript
Stars
12
Forks
1
Avg merge
4m
Merged PRs (30d)
1

Description

Describe the bug
Generate codes from comment: generate codes for multiple comments

To Reproduce
Existing programs

/* using a data step to create a dataset of random number /
/
Create a new dataset called 'random_number'/
data random_number;
/
Set the input dataset as 'sashelp.cars' /
set sashelp.cars;
/
Create a new variable 'Random' and assign random numbers generated using 'ranuni' function */
Random = ranuni(0);
run;

/* write hello world */
data null;
write "HELLO WORLD!";
put all;
run;

/* write the first 10 digit of pi */
data random_number;
set sashelp.cars;
Random = ranuni(0);
put "Hello World";
put pi 10.1;
run;

Put cursor on comment block "/* write the first 10 digit of pi */"

Then select Generate code

The code generated is:

/* Create a new dataset called 'random_number' */
proc sql;
create table random_number as
select *,
ranuni(0) as Random
from sashelp.cars;
quit;

/* Write 'Hello World' */
data null;
put 'Hello World';
run;

/* Write the first 10 digits of pi */
data null;
put 3.1415926535;
run;

Expected behavior
Only the code related to the specific comment to get generated

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. PC or Mac]
  • Version: [e.g. 0.0.2, you can find the version number by clicking the extension icon]

Reporter's Organization
SAS Cloud

Additional context
Add any other context about the problem here.
Copilot-before
Copilot-after

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.