Skip to content
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

Replace issue_* with issue-* in test filenames for consistency #5795

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fee1-dead
Copy link
Member

No description provided.

@calebcartwright
Copy link
Member

this is something that's been brought up a few times over the years, but of which i remain ambivalent on how to proceed.

consistency is indeed the desirable characteristic that I'm all for; my struggle is with snake vs kebab case. I've often wondered if there were any established convention on the tests side of things, but find myself leaning towards snake case over other conventions (perhaps just mental carry over from conventions around app/test modules that get imported).

rustc seems to have a blend, as does clippy (though ratio leans heavily towards snake). cargo seems to be heavily (perhaps ubiquitously) snake.

are you suggesting kebab because we have significantly more kebab than snake files, or is there a convention/standard/etc. you're aware of that prefers kebab?

@fee1-dead
Copy link
Member Author

As far as I'm concerned, rustc's ui tests prefer kebab case, and that can help distinguish different names in ui tests, e.g. some-test-related-to-some_feature_name.rs. rustc features, and in this case rustfmt's configuration options have snake case names, so using something like issue-1234-option_name.rs could help distinguishing them in test names. This is why I think kebab case is preferred, but it doesn't seem to be documented anywhere. At least for issues, rustc keeps them kebab case.

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

Successfully merging this pull request may close these issues.

3 participants