Check Number of lines
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Start by locating the CSV-reading entry point and the macro definition that sets the maximum, then investigate the proposed countLines function and its wc -l approach. Done means the file's line count is checked against the defined maximum and the excess-line behavior is verified.
Written by the indexing model from the issue text.
Description
Check the number of lines in file to confront with the maximum defined of macro definition.
The following approach can be investigated further
int countLines(int *lineNum, char *filename)
{
char cmd[512];
sprintf(cmd,"wc -l < %s", filename);
FILE *pipe = popen(cmd,"r");
if(pipe == NULL) {
perror("popen failed");
return 1;
}
if(!(fscanf(pipe,"%d",lineNum))){
perror("fscanf failed");
pclose(pipe);
return 1;
}
pclose(pipe);
return 0;
}
- Dominant language
- C
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DiamondLightSource/ppmac_read_csv
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Make it thread-safeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
-
Add protected regionOpen
Difficulty 3/5 1-2 days Newbie friendliness 38/100
All issues in DiamondLightSource/ppmac_read_csv
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
containers/bubblewrap#813 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
tree-sitter/tree-sitter#6005 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
facebookincubator/muse-gadget-sdk#47 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kubernetes-sigs/security-profiles-operator#3537 ·
Maintainers usually reply within 1 day