Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Create a file naming convention #5131

Closed
milkbump opened this issue May 30, 2020 · 1 comment
Closed

Create a file naming convention #5131

milkbump opened this issue May 30, 2020 · 1 comment
Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one.

Comments

@milkbump
Copy link

milkbump commented May 30, 2020

Looking through V's source files, the naming convention doesn't seem entirely consistent. While I've mostly seen snake_case, I've also seen kebab-case. It seems to be a point of contention in Go. So now would be a nice time to use and document a convention.

Notable comment from the linked Go issue above:

A short new section on CodeReviewComments is more than sufficient.

Example:

There is a de facto standard for V source file names: all lowercase with underscore separation when necessary, i.e. snake case.

Thoughts?

Edit: most of the snake case violations happen in v/cmd/tools/

@milkbump milkbump added the Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one. label May 30, 2020
@spytheman
Copy link
Member

spytheman commented May 30, 2020

They are named like that, since they match the name of the command that they implement:
v test-fixed => cmd/tools/vtest-fixed.v
v setup-freetype.v => cmd/tools/vsetup-freetype.v
... and so on.

I guess it was just easier to type the name, without using shift at the time. It is easy to rename them, if we want to enforce a naming convention using _ instead of - for the file names.

@medvednikov what do you think?

@vlang vlang locked and limited conversation to collaborators Sep 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants