-
Notifications
You must be signed in to change notification settings - Fork 1
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
Working on the output strings #5
Conversation
rm -rf SwiftLineTemp | ||
|
||
@echo "Clone new Swiftline from oarrabi/linux! branch" | ||
git clone -b oarrabi/linux! https://github.com/oarrabi/Swiftline.git SwiftLineTemp |
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.
Are we commiting to maintaing this branch green. I think we shoudl use another name. Like 'vendored'.
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.
The branch in Swiftline is about making it work on linux nsomar/Swiftline#30
I think we should keep the name until we merge it
Sources/GuakaClILib/MiscTypes.swift
Outdated
return [ | ||
"Wrong path given:", | ||
" \(path)", | ||
"The path cannot be used as its not empty" |
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.
"The path must be an empty directory"
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.
Done
Sources/GuakaClILib/MiscTypes.swift
Outdated
case .setupFileAltered: | ||
return "Guaka setup.swift file has been altered.\nThe placeholder used to insert commands cannot be found \(GeneratorParts.comamndAddingPlaceholder).\nYou can try to add it yourself by updating `setup.swift` to look like\n\n\(GeneratorParts.setupFileContent())\n\nAdding command wont be possible." | ||
return "Guaka setup.swift file has been altered.\nThe placeholder used to insert commands cannot be found \(GeneratorParts.comamndAddingPlaceholder).\nYou can try to add it yourself by updating `setup.swift` to look like\n\n\(GeneratorParts.setupFileContent())\n\nAdding command wont be possible.".f.red |
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.
"Adding command won't be possible"
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.
Done
Sources/GuakaClILib/MiscTypes.swift
Outdated
case .notAGuakaProject: | ||
return "This command can only be executed in a Guaka project.\nThe following directory does not contain guaka files" | ||
return "This command can only be executed in a Guaka project.\nThe following directory does not contain guaka files".f.red |
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.
"This command can only be executed inside a Guaka project." I think it's enough.
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.
Done
Sources/GuakaClILib/MiscTypes.swift
Outdated
case .missingCommandName: | ||
return [ | ||
"`guaka add` requires a command that was not given.", | ||
"`guaka add` requires a command that was not given.".f.red, |
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.
"Missing sub-command for guaka add
"?
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.
Done
Sources/GuakaClILib/MiscTypes.swift
Outdated
"Call `guaka add CommandName` to create a new command.", | ||
"" | ||
].joined(separator: "\n") | ||
|
||
case .commandAlreadyExist(let name, let path): | ||
return [ "The command name passed `\(name)` already exist:".f.red, |
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.
"The command \(name)
already exists:"
case .tooManyArgsPassed: | ||
return "Too many arguments passed to command." | ||
return "Too many arguments passed to command.".f.red |
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.
Can't we just ignore the extra args? Also we could say something like "Too many arguments. Trailing arguments will be ignored"
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.
Can we scope this out of this PR? I created #6 for that
👍 |
Note:
swiftline/linux!
branch in swiftline.cc @goyox86