Skip to content

Add configurable Codeforces filename styles#673

Open
Naf66 wants to merge 7 commits into
agrawal-d:mainfrom
Naf66:feature/codeforces-filename-style
Open

Add configurable Codeforces filename styles#673
Naf66 wants to merge 7 commits into
agrawal-d:mainfrom
Naf66:feature/codeforces-filename-style

Conversation

@Naf66

@Naf66 Naf66 commented May 31, 2026

Copy link
Copy Markdown

Testing

Tested locally with multiple Codeforces problems and verified:

  • legacy mode
  • name mode
  • shortcode mode
  • both mode

Additional checks performed:

  • npm run lint
  • npm run test
  • npm run test-compile
  • npm run vscode:prepublish

All checks completed successfully.

Future Extensions

The implementation is intentionally structured around a naming style setting, making it straightforward to add similar configurable filename styles for other platforms (e.g. AtCoder) in the future if desired.

@agrawal-d agrawal-d left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, needs changes.

Comment thread package.json Outdated
"shortcode",
"both"
],
"description": "Choose how Codeforces problem files are named: name, shortcode, both, or legacy."

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs more details.

  1. In short in the settings description what each type means.
  2. In detail in the user guide markdown with examples.

Comment thread src/companion.ts
}
if (isCodeforcesUrl(new URL(problem.url)) && useShortCodeForcesName()) {
return `${getProblemName(problem.url)}.${ext}`;
if (isCodeforcesUrl(new URL(problem.url))) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add unit tests to check input details and expected output problem name for each type of setting.

@Naf66
Naf66 requested a review from agrawal-d June 3, 2026 08:33
@Naf66

Naf66 commented Jun 3, 2026

Copy link
Copy Markdown
Author

Thanks for the review!

I've addressed the feedback:

Added detailed description and also added localization as other settings for the 4 languages
Added documentation and examples to the user guide
Added unit tests covering all filename style options and legacy behavior

I also extracted the filename generation logic into a small helper to make it easier to unit test.

All tests and lint checks are passing now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants