Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"rollForward": false
}
}
}
}
2 changes: 1 addition & 1 deletion .csharpierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ArchUnitNETTests/Fluent/Syntax/Elements/TypeSyntaxElementsTests.cs
ArchUnitNETTests/Fluent/Syntax/Elements/TypeSyntaxElementsTests.cs
ArchUnitNETTests/Fluent/Syntax/Elements/ObjectSyntaxElementsTests.cs
3 changes: 2 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
60e7aa44819edda932026dc2254db2876e70ead3
dce4f8e835aea7f610b6cdda6f89b62a711df35b
dce4f8e835aea7f610b6cdda6f89b62a711df35b
1619721dee9a8aac6570eaffe13993b3eee12838
2 changes: 1 addition & 1 deletion .gitconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[blame]
ignoreRevsFile = .git-blame-ignore-revs
ignoreRevsFile = .git-blame-ignore-revs
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ body:
.That()
.ImplementInterface(typeof(IExampleInterface))
.As("Example Classes");
[Fact]
public void TypesShouldBeInCorrectLayer()
{
Expand Down
53 changes: 30 additions & 23 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,36 @@ on:
release:
types: [published]

permissions:
contents: read

jobs:
formatting:
name: Check formatting
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
dotnet-version: 10.0.400
- name: Install tools
run: dotnet tool restore
- name: Check formatting
run: dotnet csharpier check .
persist-credentials: false
- name: Setup mise
uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
- name: Check formatting and lint
run: mise run check
coverage:
name: Check code coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
dotnet-version: 10.0.400
persist-credentials: false
- name: Setup mise
uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
- name: Run tests
run: dotnet test -c Debug --collect:"XPlat Code Coverage" --settings coverlet.runsettings ArchUnitNETTests/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7.0.0
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
run-tests:
Expand All @@ -50,17 +51,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
dotnet-version: 10.0.400
persist-credentials: false
- name: Setup mise
uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
- name: Run tests
run: dotnet test -c Debug
publish-docs:
name: Publish documentation
runs-on: ubuntu-latest
needs:
- formatting
- lint
- coverage
- run-tests
permissions:
Expand All @@ -70,18 +71,22 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: ./current
persist-credentials: false
- name: Checkout gh-pages branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: gh-pages
path: ./docs
# Credentials are needed here: the later "Commit and push changes" /
# "Update readthedocs preview" steps push to this checkout.
persist-credentials: true # zizmor: ignore[artipacked]
- name: Setup doxygen
run: sudo apt-get install doxygen graphviz
- name: Setup environment
run: |
if [[ "$GITHUB_REF" =~ ^"refs/tags/"[0-9]+.[0-9]+.[0-9]+$ ]]; then
docs_subpath="stable"
else
else
if [[ "$GITHUB_REF" =~ ^"refs/tags/"[0-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+$ ]]; then
docs_subpath="preview"
else
Expand All @@ -92,9 +97,11 @@ jobs:
echo "DOCS_OUTPUT_DIR=$GITHUB_WORKSPACE/docs/$docs_subpath" >> "$GITHUB_ENV"
- name: Generate documentation
working-directory: ./current/documentation
env:
DOCS_OUTPUT_DIR: ${{ env.DOCS_OUTPUT_DIR }}
run: |
set -eo pipefail
rm -rf "${{ env.DOCS_OUTPUT_DIR }}"
rm -rf "$DOCS_OUTPUT_DIR"
doxygen
touch .nojekyll
- name: Check release conditions
Expand Down Expand Up @@ -131,16 +138,16 @@ jobs:
runs-on: windows-latest
environment: deploy
needs:
- formatting
- lint
- coverage
- run-tests
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
dotnet-version: 10.0.400
persist-credentials: false
- name: Setup mise
uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
- name: Build
run: dotnet build -c Release
- name: Pack
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,20 @@ jobs:
security-events: write
strategy:
fail-fast: false
matrix:
language: ["csharp"]
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
languages: "csharp"
- name: Setup mise
uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
- name: Build
run: dotnet build -c Release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
category: "/language:${{matrix.language}}"
category: "/language:csharp"
10 changes: 10 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[extend]
useDefault = true

[allowlist]
# gitleaks' `dir` mode scans the working tree regardless of git tracking, so
# gitignored local IDE state (e.g. JetBrains .idea/workspace.xml, common for
# this C# project's contributors) gets scanned even though it's never committed.
paths = [
'''\.idea/''',
]
10 changes: 10 additions & 0 deletions .mise/tasks/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
#MISE description="Run formatting and lint checks via hk"
#USAGE flag "-f --fix" help="Apply fixes instead of only reporting them"
set -euo pipefail

if [ "${usage_fix:-}" = "true" ]; then
hk check --all --fix --no-fail-fast
else
hk check --all --no-fail-fast
fi
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# AGENTS.md

- Setup: `mise install` (also restores NuGet packages and local .NET tools)
- Build: `dotnet build`
- Test: `dotnet test`
- Lint/format check: `mise run check`
- Lint/format autofix: `mise run check --fix`
- Run build, test, and `mise run check` before finishing a task
- Sign off commits per the [DCO](DCO): `git commit -s`
4 changes: 2 additions & 2 deletions ArchUnit.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String>

<s:Boolean x:Key="/Default/CodeStyle/Naming/CSharpNaming/ApplyAutoDetectedRules/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CustomTools/CustomToolsData/@EntryValue"></s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECodeCleanup_002EFileHeader_002EFileHeaderSettingsMigrate/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -12,4 +12,4 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=lambda/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=namespc/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Xunit/@EntryIndexedValue">True</s:Boolean>
</wpf:ResourceDictionary>
</wpf:ResourceDictionary>
4 changes: 2 additions & 2 deletions ArchUnitNET/ArchUnitNET.csproj.DotSettings
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">

<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String>
<s:Boolean x:Key="/Default/CodeStyle/Naming/CSharpNaming/ApplyAutoDetectedRules/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=lambda/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/UserDictionary/Words/=lambda/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Loading
Loading