The F0.Analyzers
open source project is hosted on GitHub, so we start this document off with the GitHub Community Guidelines.
See .editorconfig file.
See also
Apply test-driven development when adding features or fixing bugs. Follow the rules of Clean Code for the entire codebase.
See Semantic Versioning.
Although .NET analyzers do not declare a public API, MAJOR
, MINOR
and PATCH
changes for each release are observed from the user's point of view, consumed by tools like Microsoft Visual Studio, JetBrains Rider or MSBuild.
Each issue should be submitted with an intention-revealing title and a descriptive comment. Define the scope of an issue by applying meaningful labels rather than prefixing the title. Before work is started, the issue should have contributing assignees added or updated.
Issues that result in changes to the repository are closed via pull requests.
Based on the GitHub flow.
The main branch is the default branch.
It includes all verified changes being published in the next release.
New topic branches are created off of main
.
Tags target the main
branch.
The publish branch is the second long-running branch.
It represents the state of the latest release.
On each release published, the publish
branch is updated from main
and pushed to.
Every change to the repository is committed to short-lived topic branches.
New topic branches are based on main
.
Their work in progress is status checked, reviewed and discussed through pull requests.
When approved, the topic branch may be merged into the main
branch while maintaining a linear history.
After a successful merge, the topic branch should be deleted.
Topic branch naming conventions:
- all lowercase
- start with
commit type
(see Commit Messages) - followed by a slash:
/
- end with a short description, use hyphen as word divider:
-
Format: {type}/{short-description}
Example: docs/contributing-guidelines
Based on Conventional Commits,
where a major/breaking change is indicated by a !
between the type/scope
and the :
,
and may optionally include a BREAKING CHANGE:
footer with additional information.
Another common footer is Co-authored-by: name <name@example.com>
to attribute a commit to more than one author. Such trailers should be provided after the BREAKING CHANGE:
footer.
Write both the description and the optional body of commit messages in present tense imperative.
For pull requests' squashed merge commit messages, append the Pull-Requests-Number to the end of the commit title surrounded by parentheses.
Format:
<type>[optional scope][!]: <description> [optional pull request number]
[optional body]
[optional footer(s)]
Example:
feat(object-initializer)!: add support for C# 9.0 (#123)
include init-only properties in Object Initializer refactoring
add tests for Records to Object Initializer
BREAKING CHANGE: drop support for Visual Studio 2017
Co-authored-by: name <name@example.com>
See GitHub Help: Creating a pull request.
The title of a pull request should be the commit message's commit title of the closing squash and merge.
Pull requests that resolve one or many issues should reference these by linking a pull request to an issue using a supported keyword in the pull request's description,
such as Closes #123
.
Based on Keep a Changelog,
where the Unreleased
section is called vNext
,
and where changes are grouped by product scope,
and where changes within a group begin with a type.
The ultimate requisite for each release is that all tests pass and the production codebase is both fully covered and asserted.
- ensure that Microsoft.CodeAnalysis.PublicApiAnalyzers' files are empty
- move all upcoming analyzer release rules
- bump SemVer version
- NuGet package:
/Project/PropertyGroup/VersionPrefix
- Visual Studio Extension:
/PackageManifest/Metadata/Identity/@Version
- NuGet package:
- update Release Notes
- Changelog: move the
vNext
section changes into a new release version section - NuGet package:
/Project/PropertyGroup/PackageReleaseNotes
- Changelog: move the
- ensure that the Documentation is updated
- commit changes
- merge into
main
branch - update
publish
branch frommain
branch
- merge into
- publish the release
- upload to NuGet.org
- publish to Visual Studio Marketplace
- create GitHub Release
- with new tag @
main
(prefix with the letterv
) - with release title
F0.Analyzers {Version}
(withoutv
prefix) - with description
- with new tag @
- finish the milestone
- edit & close current milestone
- open new milestone, with title
vNext