Skip to content

karlobrien/Standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Standards

Shared standards submodule for .NET projects. Contains:

File Purpose
CLAUDE.md Claude Code instructions — coding conventions, build commands, workflow rules
.editorconfig Editor formatting rules and Roslyn analyzer severity overrides
global.json .NET SDK version pin with roll-forward policy
nuget.config NuGet package sources and source mapping

Adding to a project

# From the root of your consuming repo
git submodule add <this-repo-url> standards
git submodule update --init --recursive

This creates a standards/ folder tracked as a submodule.


Wiring up the files

Each file must be reachable from the repo root so that the relevant tooling picks it up automatically. The approach differs by file type.

.editorconfig

EditorConfig has no import mechanism. Copy the file to your repo root:

cp standards/.editorconfig .editorconfig

When updating the submodule, re-copy if the shared rules have changed. If your repo has its own overrides, keep them in your .editorconfig below the copied block and note which sections are local additions.

global.json

global.json has no import mechanism. Copy it to your repo root and set the SDK version your projects require:

cp standards/global.json global.json

The rollForward: latestMinor policy accepts any newer minor SDK in the same major band, so you only need to update version when moving to a new major.

nuget.config

nuget.config has no import mechanism. Copy it to your repo root:

cp standards/nuget.config nuget.config

Uncomment the internal feed blocks if your organisation uses a private NuGet feed.

CLAUDE.md

Copy to your repo root so Claude Code picks it up automatically:

cp standards/CLAUDE.md CLAUDE.md

Add any repo-specific instructions below the copied content.


Updating the submodule

To pull the latest standards into a consuming repo:

git submodule update --remote --merge standards
git add standards
git commit -m "chore: update standards submodule"

To pin a specific commit instead of tracking main:

cd standards
git checkout <commit-sha>
cd ..
git add standards
git commit -m "chore: pin standards to <commit-sha>"

Cloning a repo that uses this submodule

git clone --recurse-submodules <repo-url>

# Or if already cloned without --recurse-submodules:
git submodule update --init --recursive

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors