Skip to content

Commit 421e660

Browse files
authored
Sonarcloud, jacoco plugin. (#19)
1 parent b96a5a5 commit 421e660

File tree

7 files changed

+284
-211
lines changed

7 files changed

+284
-211
lines changed

.editorconfig

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Windows-style newlines with a newline ending every file
5+
[**]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
# 4 space indentation
10+
[**.java]
11+
charset = utf-8
12+
indent_style = space
13+
indent_size = 4
14+
trim_trailing_whitespace=true
15+
16+
# 4 space indentation
17+
[**.jsx]
18+
charset = utf-8
19+
indent_style = space
20+
indent_size = 2
21+
trim_trailing_whitespace=true
22+
23+
[pom.xml]
24+
charset = utf-8
25+
indent_style = space
26+
indent_size = 4

.gitattributes

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* text=auto
2+
3+
*.conf text eol=lf
4+
*.sh text eol=lf
5+
*.cfg text eol=lf
6+
*.properties text eol=lf
7+
*.xml text eol=lf
8+
*.java text eol=lf
9+
*.html text eol=lf
10+
*.sql text eol=lf
11+
*.jsx text eol=lf
12+
*.js text eol=lf
13+
*.css text eol=lf
14+
*.sass text eol=lf
15+
*.less text eol=lf

.github/workflows/maven-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
mvn package -B -s .m2/settings.xml --file pom.xml -Dchangelist= -Dsha1=-$(git log -1 --pretty='%ad' --date=format:'%Y%m%d%H%M%S')-$(echo $GITHUB_SHA | cut -c1-7)
2323
env:
2424
GITHUB_USERNAME: x-access-token
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}

.github/workflows/maven.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ jobs:
2121
- name: Build with Maven
2222
run: |
2323
echo "Building artifacts $(echo $GITHUB_SHA | cut -c1-7)"
24-
mvn clean deploy --batch-mode --settings ./.m2/settings.xml -Dmaven.wagon.http.pool=false --file pom.xml -Dchangelist= -Dsha1=-$(git log -1 --pretty='%ad' --date=format:'%Y%m%d%H%M%S')-$(echo $GITHUB_SHA | cut -c1-7) -Dfile.encoding=UTF-8 -DinstallAtEnd=true -DdeployAtEnd=true
24+
mvn jacoco:prepare-agent deploy -e --batch-mode --settings ./.m2/settings.xml -Dmaven.wagon.http.pool=false --file pom.xml -Dchangelist= -Dsha1=-$(git log -1 --pretty='%ad' --date=format:'%Y%m%d%H%M%S')-$(echo $GITHUB_SHA | cut -c1-7) -Dfile.encoding=UTF-8 -DinstallAtEnd=true -DdeployAtEnd=true -Djacoco.destFile=$(pwd)/target/jacoco.exec
25+
mvn jacoco:report sonar:sonar -e --batch-mode --settings ./.m2/settings.xml --file pom.xml -Djacoco.dataFile=$(pwd)/target/jacoco.exec -Dsonar.projectKey="navikt_folketrygdloven-beregningsgrunnlag-regelmodell" -Dsonar.host.url='https://sonarcloud.io' -Dsonar.organization=navit -Dsonar.login=${SONAR_TOKEN}
2526
echo "Deployed artifacts"
2627
env:
2728
GITHUB_USERNAME: x-access-token
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}
30+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.java-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
11.0

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# WIP
1+
![](https://github.com/navikt/folketrygdloven-beregningsgrunnlag-regelmodell/workflows/Bygg%20og%20deploy/badge.svg)
2+
[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=navikt_folketrygdloven-beregningsgrunnlag-regelmodell&metric=alert_status)](https://sonarcloud.io/dashboard?id=navikt_fp-abakus)
3+
[![SonarCloud Coverage](https://sonarcloud.io/api/project_badges/measure?project=navikt_folketrygdloven-beregningsgrunnlag-regelmodell&metric=coverage)](https://sonarcloud.io/component_measures/metric/coverage/list?id=navikt_fp-abakus)
4+
[![SonarCloud Bugs](https://sonarcloud.io/api/project_badges/measure?project=navikt_folketrygdloven-beregningsgrunnlag-regelmodell&metric=bugs)](https://sonarcloud.io/component_measures/metric/reliability_rating/list?id=navikt_fp-abakus)
5+
[![SonarCloud Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=navikt_folketrygdloven-beregningsgrunnlag-regelmodell&metric=vulnerabilities)](https://sonarcloud.io/component_measures/metric/security_rating/list?id=navikt_fp-abakus)
26

37
# Beregningsgrunnlag (fra folketrygdloven kapittel 8)
48
Regelmodell for beregningsgrunnlag (Lov om folketrygd kapittel 8) som gir grunnlag for beregning av dagsats

0 commit comments

Comments
 (0)