Skip to content

Commit

Permalink
feat: add sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgerabello3 committed Sep 8, 2024
1 parent 389a77f commit 195b3d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ jobs:
with:
go-version: 1.23.1
- run: go test -coverprofile=coverage.out
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5 changes: 3 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
sonar.projectKey=go-project
sonar.projectKey=jorgerabello3_fc2-sonarcloud
sonar.organization=jorgerabello3

sonar.sources=.
sonar.exclusions=**/*_test.go

sonar.tests=.
sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.go.coverage.reportPaths=coverage.out
16 changes: 0 additions & 16 deletions sum.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,3 @@ func main() {
func sum(a int, b int) int {
return a + b
}

func sub(a int, b int) int {
return a - b
}

func div(a int, b int) int {
return a / b
}

func times(a int, b int) int {
return a * b
}

func suX(a int, b int) int {
return a + b + b
}

0 comments on commit 195b3d7

Please sign in to comment.