-
-
Notifications
You must be signed in to change notification settings - Fork 27
London | 25-SDC-July | Pezhman Azizi | Sprint 3 | Implement-shell-tools-with-NodeJS #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
London | 25-SDC-July | Pezhman Azizi | Sprint 3 | Implement-shell-tools-with-NodeJS #169
Conversation
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Sprint part (sprint3) doesn't match expected format (example: 'Sprint 2', without quotes) |
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Sprint part (Sprint3) doesn't match expected format (example: 'Sprint 2', without quotes) |
0c6be53
to
fff1928
Compare
809a558
to
512c6e7
Compare
512c6e7
to
bf61510
Compare
5ee1d1c
to
bc06d2e
Compare
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start on this sprint's tasks, I have spotted a few areas where you could improve code further
}); | ||
} | ||
|
||
function numberFile(file, { nonblank }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you would want two separate functions for printing out content normally and numbered? Could these be combined into one function?
const raw = process.argv.slice(2); | ||
|
||
let includeAll = false; // -a | ||
let onePerLine = false; // -1 (format already one-per-line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it defaults to one per line, this argument is not doing anything. What change would you need to make to the program to ensure that the default behaviour is to output all on the same line?
const targets = []; | ||
|
||
// Parse flags (supports combined like -a1 / -1a). Treat lone "-" as a path. | ||
for (const arg of raw) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an advantage of writing argument parsing yourself rather than using an API or library?
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
2 similar comments
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
Learners, PR Template
Self checklist
Changelist
Learners, PR Template
Self checklist
Changelist
cat/cat.js
with CLI entry and basic arg parsing.-n
→-b
.How to test (current scaffold)