-
Notifications
You must be signed in to change notification settings - Fork 64
fix issue 80 #81
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
fix issue 80 #81
Conversation
1. use code.test config to open/close writing test file 2. use code.comment_leading to comment the desc 3. use code.comment_problem_desc to open/close the description about the problem 4. use code.start_marker to mark the code begin 5. use code.end_marker to mark the code end
const LANGS = [
{lang: 'bash', ext: '.sh', style: '#'},
{lang: 'c', ext: '.c', style: 'c'},
{lang: 'cpp', ext: '.cpp', style: 'c'},
{lang: 'csharp', ext: '.cs', style: 'c'},
{lang: 'golang', ext: '.go', style: 'c'},
{lang: 'java', ext: '.java', style: 'c'},
{lang: 'javascript', ext: '.js', style: 'c'},
{lang: 'kotlin', ext: '.kt', style: 'c'},
{lang: 'mysql', ext: '.sql', style: '--'},
{lang: 'php', ext: '.php', style: 'c'},
{lang: 'python', ext: '.py', style: '#'},
{lang: 'python3', ext: '.py', style: '#'},
{lang: 'ruby', ext: '.rb', style: '#'},
{lang: 'rust', ext: '.rs', style: 'c'},
{lang: 'scala', ext: '.scala', style: 'c'},
{lang: 'swift', ext: '.swift', style: 'c'},
{lang: 'typescript', ext: '.ts', style: 'c'}
]; As now I introduce the code.comment_leading to let user to judge the comment style, should we use the default config like this? |
I just ran this but clearly something is wrong. I have not tried anything more.
Also, please fix the English: Parse config file failed. leetcode-cli has just generated a new configuration file at Why can't you list out the missing keys in the error message? |
Yeah, as i say, I know this problem, so if you have some suggestions about User must update their leetcode.toml ? Or, I can fix this |
The problem is that your error message says a |
I know is not be created and maybe an old bug. My question is if it is the best way to help user update their toml config. |
I've never had |
The newest version of this branch can generate the |
That's better. It's a pity that the user had to change the "comment_leading" value every time he changes "lang".
|
Another issue: You can't test or submit any of your old solutions (or new solutions) unless they have the |
And another issue: I can't work out what pattern causes this but some times the lines before It should be simple logic:
|
Do you give a failed exmpale?
The rule is simple that the content betwteen the end offset of Maybe should add a config item turn on/off the marker feature, but I think start and end marker should be on or off meanwhile. So It's not possible there is only |
Yeah, maybe should add a config item that control the marker feature.
About this, I think user maybe think every input the command should edit
Maybe the last two question, @clearloop can do better response, after all I only propose some PR for this project. |
* fix: clippy warning for rust 1.61 stable * feat: upgrade dep version, and use Rust 2021 Edition * fix: issue 80 1. use code.test config to open/close writing test file 2. use code.comment_leading to comment the desc 3. use code.comment_problem_desc to open/close the description about the problem 4. use code.start_marker to mark the code begin 5. use code.end_marker to mark the code end * fix: create empty test file * revert: use superscript and subscript, not ^ and _ * fix: not generate leetcode_tmp.toml * fix: clippy warning * chore: upgrade dep * backwark compability * cfg marker trun on/off
#80
But, this update need user to update the toml config, otherwise the program get panic error massage, I not get the perfect method to handle this. Do you have a good way to handle this?
@bulletmark @clearloop