microsoft / microsoft/STL

tests: Should we follow stylistic conventions more consistently?

Open
#1,110 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

test
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

In test code, we've historically been less strict about enforcing global stylistic conventions. We generally expect consistency within a test, but different tests vary in:

  • using namespace std; versus std:: qualification (there are a relatively small number of tests where this makes a real difference)
  • const T versus T const
  • class versus typename in template parameters

Historically, this seemed reasonable because it allowed each maintainer to write test code in their most preferred style, and we generally don't treat the test code as a unified whole (we generally write a test, and then it stays unchanged unless we need to fix/extend it). However, this makes things somewhat confusing for contributors, since we don't have consistent precedents to follow.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are identified in the issue. Review the issue discussion first to determine whether a consistent convention is wanted and which stylistic choices are in scope; done requires an explicit decision and an identified set of test changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.