Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Java CI with Maven

on:
push:
branches: [ "master" ]
branches: [ "main" ]
pull_request:
branches: [ "master" ]
branches: [ "main", "develop" ]

jobs:
build:
Expand All @@ -29,4 +29,4 @@ jobs:
run: mvn sonar:sonar -Dsonar.token=$SONAR_TOKEN

- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
uses: advanced-security/maven-dependency-submission-action@v4
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public void can_report_metrics() {
TestOpenApiVisitorRunner.scanFile(new File(BASE_DIR, "file-lines.yaml"), visitor);

// sonar extensions are counted as lines of code
assertThat(visitor.getLinesOfCode()).hasSize(16);
assertThat(visitor.getLinesOfCode()).containsOnly(1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 18, 19);
assertThat(visitor.getLinesOfCode()).hasSize(15);
assertThat(visitor.getLinesOfCode()).containsOnly(1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 18);

assertThat(visitor.getLinesOfComments()).hasSize(3);
assertThat(visitor.getLinesOfComments()).containsOnly(8, 15, 16);
Expand All @@ -55,8 +55,8 @@ public void correctly_reports_strings_with_embedded_newline() {

TestOpenApiVisitorRunner.scanFile(new File(BASE_DIR, "embedded-newlines-lines.yaml"), visitor);

assertThat(visitor.getLinesOfCode()).hasSize(16);
assertThat(visitor.getLinesOfCode()).containsOnly(1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 18, 19);
assertThat(visitor.getLinesOfCode()).hasSize(15);
assertThat(visitor.getLinesOfCode()).containsOnly(1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 18);
}

@Test
Expand All @@ -65,7 +65,7 @@ public void correctly_reports_multiline_strings() {

TestOpenApiVisitorRunner.scanFile(new File(BASE_DIR, "multiline-lines.yaml"), visitor);

assertThat(visitor.getLinesOfCode()).hasSize(18);
assertThat(visitor.getLinesOfCode()).containsOnly(1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21);
assertThat(visitor.getLinesOfCode()).hasSize(17);
assertThat(visitor.getLinesOfCode()).containsOnly(1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 19, 20);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ paths:
#
# another comment line
/newpets:
$ref: '#/paths/~1pets'
$ref: '#/paths/~1pets'
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ paths:
#
# another comment line
/newpets:
$ref: '#/paths/~1pets'
$ref: '#/paths/~1pets'
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ paths:
#
# another comment line
/newpets:
$ref: '#/paths/~1pets'
$ref: '#/paths/~1pets'
Loading