https://github.com/markstanden/coding-standards
A single source of truth for my development project configuration files, workflow templates, and development tools to ensure consistency across projects.
https://github.com/markstanden/coding-standards
c-sharp coding-standards dotnet git-hooks github-actions
Last synced: 3 months ago
JSON representation
A single source of truth for my development project configuration files, workflow templates, and development tools to ensure consistency across projects.
- Host: GitHub
- URL: https://github.com/markstanden/coding-standards
- Owner: markstanden
- Created: 2025-04-06T08:39:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-07T07:55:49.000Z (10 months ago)
- Last Synced: 2025-10-07T08:35:03.429Z (10 months ago)
- Topics: c-sharp, coding-standards, dotnet, git-hooks, github-actions
- Language: Shell
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Coding Standards
A single source of truth for my development project configuration files, workflow templates, and development tools to ensure consistency across projects.
## Project Structure
```bash
coding-standards/
└── dotnet/ # .NET specific standards and tools
├── editorconfig/ # Code formatting rules
├── directory-build-props/ # Common build properties
├── git-hooks/ # .NET-specific git hooks
├── workflows/ # GitHub Actions workflows for .NET
└── setup.sh # Script to set up all .NET standards
```
## Getting Started
### As a Submodule
Add this repository as a submodule to your project:
```bash
git submodule add https://github.com/markstanden/coding-standards .coding-standards
```
### Using .NET Standards
Run the setup script to configure all .NET standards at once:
```bash
sudo chmod +x .coding-standards/dotnet/setup.sh
.coding-standards/dotnet/setup.sh
```
This will:
- Add this repository as a submodule to your project:
- Copy or symlink the `.editorconfig` and `Directory.Build.props` to your project root
- Set up git hooks for .NET formatting
- Create a GitHub Actions workflow pipeline file if it doesn't exist
### Manual Setup
The script essentially automates the following steps:
1. Symlink the `.editorconfig` to your project root:
```bash
ln -s .coding-standards/dotnet/editorconfig/.editorconfig .editorconfig
```
2. Symlink the `Directory.Build.props` to your project root:
```bash
ln -s .coding-standards/dotnet/directory-build-props/Directory.Build.props Directory.Build.props
```
3. Set up git hooks:
```bash
.coding-standards/dotnet/git-hooks/setup-hooks.sh
```
4. Set up GitHub workflows:
```bash
mkdir -p .github/workflows
cp .github/workflows/dotnet/pipeline-example.yml .github/workflows/
```