Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/antlr #113

Merged
merged 2 commits into from
Sep 23, 2023
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
42 changes: 21 additions & 21 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: Run Gradle on PRs
permissions: read-all
on:
push:
branches: [master]
pull_request:
branches: [master]
on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Run test and Coverage
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: reportScoverage aggregateAllTestReports -no-daemon
gradle:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: Run test and Coverage
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: reportScoverage aggregateAllTestReports -no-daemon
1 change: 0 additions & 1 deletion .github/workflows/todo-issues.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Create issues from todos
permissions: read-all

on:
push:
Expand Down
22 changes: 22 additions & 0 deletions .swm/monster-manuals.2sgmr3sq.sw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: 2sgmr3sq
title: Monster Manuals
file_version: 1.1.3
app_version: 1.17.0
---

Basic Monster Type information will be located in the io.truthencode.ddo.model.compendium package.

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 80; Actual: 98

Expected: 80; Actual: 98

Ultimately, Entry, Type, Race and Sub-races should be applied. Although Monster Manual may not directly affect combat stats.

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 80; Actual: 124

Expected: 80; Actual: 124

<br/>

Check warning

Code scanning / Markdownlint (reported by Codacy)

Element: br

Element: br

| Monster Manual Entry | Type | Race | Sub-races |
| -------------------- | ------------- | ----------- | --------- |
| Elf | Elf | Elf | Drow Elf |
| Purple Worm | Magical Beast | Purple Worm | <br/> |

Check warning

Code scanning / Markdownlint (reported by Codacy)

Element: br

Element: br
| <br/> | <br/> | <br/> | <br/> |

Check warning

Code scanning / Markdownlint (reported by Codacy)

Element: br

Element: br

<br/>

Check warning

Code scanning / Markdownlint (reported by Codacy)

Element: br

Element: br

This file was generated by Swimm. [Click here to view it in the app](https://app.swimm.io/repos/Z2l0aHViJTNBJTNBZGRvLWNhbGMlM0ElM0F0cnV0aGVuY29kZQ==/docs/2sgmr3sq).
10 changes: 5 additions & 5 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 0.1
cli:
version: 1.15.0
version: 1.16.0

plugins:
sources:
Expand All @@ -13,18 +13,18 @@ lint:
- terrascan@1.18.3
- checkov@2.4.9
- osv-scanner@1.4.0
- trivy@0.45.0
- trufflehog@3.56.0
- trivy@0.45.1
- trufflehog@3.56.1
- taplo@0.8.1
- actionlint@1.6.25
- dotenv-linter@3.3.0
- git-diff-check
- gitleaks@8.18.0
- ktlint@1.0.0
- markdownlint@0.36.0
- markdownlint@0.37.0
- oxipng@8.0.0
- prettier@3.0.3
- renovate@36.93.7
- renovate@36.97.3
- scalafmt@3.7.14
- shellcheck@0.9.0
- shfmt@3.6.0
Expand Down
3 changes: 1 addition & 2 deletions build-logic/src/main/kotlin/code-quality.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,4 @@ configure<com.diffplug.gradle.spotless.SpotlessExtension> {
licenseHeaderFile(project.rootProject.file("gradle/LICENSE_HEADER_SPOTLESS"), "package")
}
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins {
jacoco
}
/*

Java's (jacoco) and Kotlin at this time.
Scala will utilize scoverage instead.
(Scala's coverage is available in scala-conventions.
NOTICE: You must still include a kotlin app / library etc. profile as we do not auto-include kotlin / java library conventions here.
*/

jacoco {
toolVersion = "0.8.10"
// reportsDirectory.set(layout.buildDirectory.dir("customJacocoReportDir"))
}

tasks.withType(JacocoReport::class) {
reports {
xml.required.set(false)
csv.required.set(false)
// html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
plugins {
id("djaxonomy.java-coverage-conventions")
}

/*
There is no kotlin specific coverage tool at this time.
We're just using Java's (jacoco)
Scala will utilize scoverage instead.

NOTICE: You must still include a kotlin app / library etc. profile as we do not auto-include kotlin / java library conventions here.
*/
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import io.truthencode.djaxonomy.etc.TestBuildSupport

plugins {
id("djaxonomy.test-conventions")
id("djaxonomy.kotlin-coverage-conventions")
}

val koTestVersion: String by project
Expand Down
70 changes: 48 additions & 22 deletions build-logic/src/main/kotlin/djaxonomy.test-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,43 @@ plugins {
}

tasks.withType(Test::class.java) {

systemProperties["concordion.output.dir"] = "${reporting.baseDir}/tests"
val outputDir = reports.junitXml.outputLocation
jvmArgumentProviders.add(CommandLineArgumentProvider {
mutableListOf(
"-Djunit.platform.reporting.open.xml.enabled=false", // Legacy format for sonar
"-Djunit.platform.reporting.output.dir=${outputDir.get().asFile.absolutePath}"
)
})
}

val extraProps = mutableListOf("-Djunit.platform.reporting.output.dir=${outputDir.get().asFile.absolutePath}")

jvmArgumentProviders.add(
CommandLineArgumentProvider {
extraProps.plus(
listOf(
"-Djunit.platform.reporting.open.xml.enabled=false", // Legacy format for sonar
),
)
},
)
}

sonar {
properties {
if (project.plugins.hasPlugin("scala")) {
val rPath =
listOf(
"scoverageAcceptanceTest/scoverage.xml",
"scoverage/scoverage.xml",
).joinToString()
property("sonar.scala.coverage.reportPaths", rPath)
} else {
// use Jacoco
// sonar.coverage.jacoco.xmlReportPaths
}
val junitPaths =
listOf("test-results/test", "test-results/acceptanceTest").joinToString {
project.layout.buildDirectory.dir(it).get().asFile.path
}
property("sonar.junit.reportPaths", junitPaths)
}
}
val libs = the<LibrariesForLibs>()

val extension = project.extensions.create<KotlinTestKitExtension>("KotlinTestKits")
Expand Down Expand Up @@ -67,7 +93,7 @@ fun JvmTestSuite.applyConcordionAcceptanceTest() {
dependencies {
implementation(project())
implementation(libs.concordion)
// flexmark (mostly for concordion / markdown)
// flexmark (mostly for concordion / markdown)
implementation(libs.flexmark.all)
}
}
Expand Down Expand Up @@ -97,7 +123,7 @@ fun JvmTestSuite.applyJupiterEngine() {
fun JvmTestSuite.applyScalaTest() {
dependencies {
runtimeOnly(libs.scalatest.plus.junit)
// runtimeOnly("org.junit.vintage:junit-vintage-engine:5.10.0")
// runtimeOnly("org.junit.vintage:junit-vintage-engine:5.10.0")
implementation(libs.scalatest.s213)
implementation(libs.scalatest.plus.mockito.s213)

Expand All @@ -106,7 +132,7 @@ fun JvmTestSuite.applyScalaTest() {
implementation(libs.wix.accord.scalatest.s213)

implementation(libs.scalatest.plus.scalacheck)
// JUnit
// JUnit
}

targets.all {
Expand All @@ -123,13 +149,13 @@ fun JvmTestSuite.applyScalaTest() {

project.testing {
suites {
/*
TODO: Add functional / integration etc as needed
Also need to determine if this is a limited scope (i.e opt in by project)
integrationTest by registering(JvmTestSuite::class)
functionalTest by registering(JvmTestSuite::class)
performanceTest by registering(JvmTestSuite::class)
*/
/*
TODO: Add functional / integration etc as needed
Also need to determine if this is a limited scope (i.e opt in by project)
integrationTest by registering(JvmTestSuite::class)
functionalTest by registering(JvmTestSuite::class)
performanceTest by registering(JvmTestSuite::class)
*/

val test by getting(JvmTestSuite::class)
val acceptanceTest = register<JvmTestSuite>("acceptanceTest")
Expand All @@ -156,7 +182,7 @@ project.testing {
}
}

// Scala Specific
// Scala Specific
if (project.plugins.hasPlugin("scala")) {

logger.info("Configuring ${project.name} for Scala ${tt.name} Testing : ${this.name} ")
Expand All @@ -179,8 +205,8 @@ project.testing {
targets.all {
testTask.configure {
useJUnitPlatform {
// includeEngines = setOf("vintage")
// includeEngines("junit-jupiter", "junit-vintage")
// includeEngines = setOf("vintage")
// includeEngines("junit-jupiter", "junit-vintage")
testLogging {
events("passed", "skipped", "failed")
}
Expand All @@ -196,11 +222,11 @@ project.testing {
}
}

// Concordian BDD Acceptance
// Concordian BDD Acceptance
if (tt == TestTypes.Acceptance) {
logger.info("applying Concordion Acceptance")

// systemProperties["concordion.output.dir"] = "${reporting.baseDir}/spec"
// systemProperties["concordion.output.dir"] = "${reporting.baseDir}/spec"
this.applyConcordionAcceptanceTest()
this.applyVintageEngine()
this.applyJupiterEngine()
Expand Down
5 changes: 3 additions & 2 deletions build-logic/src/main/kotlin/scala-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ plugins {
}
val libs = the<LibrariesForLibs>()

// dependencies {
dependencies {
implementation(libs.scala2.library)
// val scalaLibraryVersion: String by project
// val scalaMajorVersion: String by project
// val scalaCompilerPlugin by configurations.creating
// scalaCompilerPlugin("com.typesafe.genjavadoc:genjavadoc-plugin_$scalaLibraryVersion:0.18")
// compileOnly("org.scoverage:scalac-scoverage-plugin_$scalaMajorVersion.7:1.4.10")
//
// }
}

configure<org.scoverage.ScoverageExtension> {
scoverageVersion.set(libs.versions.scoverage)
Expand Down
Loading