Skip to content

Commit

Permalink
chore: implement licensebat
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Brault <alan.brault@visus.io>
  • Loading branch information
xaevik committed Oct 30, 2024
1 parent 14c6e10 commit e4f83cd
Show file tree
Hide file tree
Showing 27 changed files with 1,247 additions and 1,247 deletions.
18 changes: 11 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true

# C# files
[*.cs]

[*]
#### Core EditorConfig Options ####

# Indentation and spacing
Expand All @@ -15,6 +13,12 @@ tab_width = 4
end_of_line = lf
insert_final_newline = true

# Razor files
[*.{cs,razor}]
dotnet_diagnostic.CA2007.severity = none

# C# files
[*.cs]
#### .NET Coding Conventions ####

# this. and Me. preferences
Expand Down Expand Up @@ -80,9 +84,6 @@ csharp_style_expression_bodied_properties = true
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion

# Namespace Declaration Style
csharp_style_namespace_declarations = block_scoped

# Null-checking preferences
csharp_style_conditional_delegate_call = true:suggestion

Expand Down Expand Up @@ -195,6 +196,7 @@ resharper_csharp_keep_existing_attribute_arrangement = false
resharper_csharp_keep_existing_initializer_arrangement = false
resharper_csharp_max_attribute_length_for_same_line = 120
resharper_csharp_max_initializer_elements_on_line = 1
resharper_csharp_naming_rule.enum_member = AaBb
resharper_csharp_other_braces = next_line
resharper_csharp_outdent_binary_ops = true
resharper_csharp_outdent_binary_pattern_ops = true
Expand All @@ -205,5 +207,7 @@ resharper_csharp_place_simple_initializer_on_single_line = true
resharper_csharp_type_declaration_braces = next_line
resharper_csharp_wrap_object_and_collection_initializer_style = chop_always

dotnet_diagnostic.CA2007.severity = error

# warning suppressions
dotnet_diagnostic.CA2255.severity = none
dotnet_diagnostic.CA2255.severity = none
92 changes: 46 additions & 46 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"configMigration": true,
"extends": [
"config:recommended",
":disableDependencyDashboard",
":gitSignOff",
":preserveSemverRanges"
],
"timezone": "America/New_York",
"packageRules": [
{
"automerge": true,
"matchUpdateTypes": [
"digest",
"minor",
"patch"
],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"labels": [
"dependencies"
],
"schedule": [
"after 8:00am"
],
"matchPackageNames": [
"*"
]
},
{
"automerge": false,
"matchUpdateTypes": [
"major"
],
"labels": [
"dependencies",
"breaking"
],
"schedule": [
"after 8:00am on tuesday"
],
"matchPackageNames": [
"*"
]
}
]
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"configMigration": true,
"extends": [
"config:recommended",
":disableDependencyDashboard",
":gitSignOff",
":preserveSemverRanges"
],
"timezone": "America/New_York",
"packageRules": [
{
"automerge": true,
"matchUpdateTypes": [
"digest",
"minor",
"patch"
],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"labels": [
"dependencies"
],
"schedule": [
"after 8:00am"
],
"matchPackageNames": [
"*"
]
},
{
"automerge": false,
"matchUpdateTypes": [
"major"
],
"labels": [
"dependencies",
"breaking"
],
"schedule": [
"after 8:00am on tuesday"
],
"matchPackageNames": [
"*"
]
}
]
}
160 changes: 80 additions & 80 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
name: Continuous Integration

on:
push:
branches:
- develop
paths-ignore:
- '**.md'
- '.github/renovate.json'
- '.github/workflows/release.yaml'

pull_request:
paths-ignore:
- '**.md'
- '.github/renovate.json'
- '.github/workflows/release.yaml'
push:
branches:
- develop
paths-ignore:
- '**.md'
- '.github/renovate.json'
- '.github/workflows/release.yaml'
pull_request:
paths-ignore:
- '**.md'
- '.github/renovate.json'
- '.github/workflows/release.yaml'

jobs:
unit-tests:
name: Unit Tests
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: SonarCloud Packages Cache
uses: actions/cache@v4
with:
path: .\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: SonarCloud Scanner Cache
id: cache-sonar-scanner
uses: actions/cache@v4
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install Java SDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install SonarCloud Scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: powershell
run: |
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- name: Test
run: |
.\.sonar\scanner\dotnet-sonarscanner begin `
/k:"visus:cuid.net" `
/o:"visus" `
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" `
/d:sonar.cs.opencover.reportsPaths=${{ runner.temp }}\CodeCoverage\*.xml `
/d:sonar.cs.vstest.reportsPaths=${{ runner.temp }}\TestResults\*.trx `
/d:sonar.host.url="https://sonarcloud.io"
dotnet test -c release `
--logger:trx `
--results-directory ${{ runner.temp }}\TestResults `
-p:CollectCoverage=true `
-p:CoverletOutputFormat=opencover `
-p:CoverletOutput=${{ runner.temp }}\CodeCoverage\coverage.opencover.xml
.\.sonar\scanner\dotnet-sonarscanner end `
/d:sonar.token="${{ secrets.SONAR_TOKEN }}"
- name: Test Results
uses: dorny/test-reporter@v1
with:
name: Test Results
path: ${{ runner.temp }}\TestResults\*.trx
reporter: dotnet-trx
path-replace-backslashes: true
unit-tests:
name: Unit Tests
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: SonarCloud Packages Cache
uses: actions/cache@v4
with:
path: .\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: SonarCloud Scanner Cache
id: cache-sonar-scanner
uses: actions/cache@v4
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install Java SDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install SonarCloud Scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: powershell
run: |
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- name: Test
run: |
.\.sonar\scanner\dotnet-sonarscanner begin `
/k:"visus:cuid.net" `
/o:"visus" `
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" `
/d:sonar.cs.opencover.reportsPaths=${{ runner.temp }}\CodeCoverage\*.xml `
/d:sonar.cs.vstest.reportsPaths=${{ runner.temp }}\TestResults\*.trx `
/d:sonar.host.url="https://sonarcloud.io"
dotnet test -c release `
--logger:trx `
--results-directory ${{ runner.temp }}\TestResults `
-p:CollectCoverage=true `
-p:CoverletOutputFormat=opencover `
-p:CoverletOutput=${{ runner.temp }}\CodeCoverage\coverage.opencover.xml
.\.sonar\scanner\dotnet-sonarscanner end `
/d:sonar.token="${{ secrets.SONAR_TOKEN }}"
- name: Test Results
uses: dorny/test-reporter@v1
with:
name: Test Results
path: ${{ runner.temp }}\TestResults\*.trx
reporter: dotnet-trx
path-replace-backslashes: true



Loading

0 comments on commit e4f83cd

Please sign in to comment.