Skip to content

Commit

Permalink
Merge branch 'release/v0.3' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiascibien committed Nov 22, 2021
2 parents 4d32d32 + e456b48 commit ea86f54
Show file tree
Hide file tree
Showing 33 changed files with 797 additions and 250 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
runtime: [win-x64, osx-x64, linux-x64]
runtime: [win-x64, linux-x64] # osx-x64
steps:
- uses: actions/checkout@v2
with:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: SonarCloud Analysis
on:
push:
branches:
- main
- develop
- feature/*
- release/*
- hotfix/*
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: windows-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.11
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v1
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- 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: Build and analyze
env:
DOTNET_ROLL_FORWARD: Major
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"mattiascibien_godot-hub" /o:"mattiascibien-github" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet build
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
15 changes: 15 additions & 0 deletions .sonarlint/GodotHub.slconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"ServerUri": "https://sonarcloud.io/",
"Organization": {
"Key": "mattiascibien-github",
"Name": "Mattias Cibien"
},
"ProjectKey": "mattiascibien_godot-hub",
"ProjectName": "godot-hub",
"Profiles": {
"CSharp": {
"ProfileKey": "AWd6CK4SQrt00S5VFE1o",
"ProfileTimestamp": "2021-11-17T09:02:30Z"
}
}
}
89 changes: 89 additions & 0 deletions .sonarlint/mattiascibien_godot-hub/CSharp/SonarLint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<AnalysisInput xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Settings>
<Setting>
<Key>sonar.cs.analyzeGeneratedCode</Key>
<Value>false</Value>
</Setting>
<Setting>
<Key>sonar.cs.file.suffixes</Key>
<Value>.cs</Value>
</Setting>
<Setting>
<Key>sonar.cs.ignoreHeaderComments</Key>
<Value>true</Value>
</Setting>
<Setting>
<Key>sonar.cs.roslyn.ignoreIssues</Key>
<Value>false</Value>
</Setting>
</Settings>
<Rules>
<Rule>
<Key>S107</Key>
<Parameters>
<Parameter>
<Key>max</Key>
<Value>7</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S110</Key>
<Parameters>
<Parameter>
<Key>max</Key>
<Value>5</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S1479</Key>
<Parameters>
<Parameter>
<Key>maximum</Key>
<Value>30</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S2342</Key>
<Parameters>
<Parameter>
<Key>flagsAttributeFormat</Key>
<Value>^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?s$</Value>
</Parameter>
<Parameter>
<Key>format</Key>
<Value>^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?$</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S2436</Key>
<Parameters>
<Parameter>
<Key>max</Key>
<Value>2</Value>
</Parameter>
<Parameter>
<Key>maxMethod</Key>
<Value>3</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S3776</Key>
<Parameters>
<Parameter>
<Key>propertyThreshold</Key>
<Value>3</Value>
</Parameter>
<Parameter>
<Key>threshold</Key>
<Value>15</Value>
</Parameter>
</Parameters>
</Rule>
</Rules>
</AnalysisInput>
Loading

0 comments on commit ea86f54

Please sign in to comment.