Skip to content

Commit

Permalink
Merge branch 'master' into synk-for-swm
Browse files Browse the repository at this point in the history
  • Loading branch information
adarro authored Aug 1, 2024
2 parents 9aa4828 + deb27fd commit 1d2d927
Show file tree
Hide file tree
Showing 213 changed files with 14,586 additions and 2,896 deletions.
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
- run: ./gradlew assemble
- run: if [ -e ./gradlew ]; then ./gradlew reportScoverage aggregateScoverage --continue;else gradle reportScoverage aggregateScoverage --continue;fi
- codecov/upload
- coverage-reporter/send_report:
coverage-reports: build/reports/scoverage/cobertura.xml
project-token: $CODACY_PROJECT_TOKEN
# Download and cache dependencies
- restore_cache:
keys:
Expand Down
58 changes: 57 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
* text=auto
# .gitattributes snippet to force users to use same line endings for project.
#
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files NOT found below
# https://help.github.com/articles/dealing-with-line-endings/
# https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes



# These files are text and should be normalized (Convert crlf => lf)
*.php text
*.css text
*.js text
*.scala text
*.java text
*.kt text
*.kts text
*.gradle text
*.sh text
*.xml text
*.md text
*.json text
*.htm text
*.html text
*.xml text
*.txt text
*.ini text
*.inc text
*.pl text
*.rb text
*.py text
*.scm text
*.sql text
.htaccess text
*.sh text

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.pyc binary
42 changes: 42 additions & 0 deletions .github/workflows/codacy_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Codacy Analysis CLI
permissions: read-all
"on":
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
codacy-security-scan:
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@master
with:
output: results.sarif
format: sarif
gh-code-scanning-compat: true
max-allowed-issues: 2147483647
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@main
with:
sarif_file: results.sarif
codacy-analysis-cli:
name: Codacy Analysis CLI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@master
with:
tool: spotbugs
api-token: "${{secrets.CODACY_API_TOKEN}}"
upload: true
max-allowed-issues: 2147483647
55 changes: 22 additions & 33 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
name: Run Gradle on PRs

on:
push:
branches: [master]
pull_request:
branches: [master]
permissions: read-all
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: adopt
java-version: 11

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: build --scan
- name: Run test and Coverage
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: reportScoverage aggregateAllTestReports
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
name: codecov-umbrella # optional
verbose: true # optional (default = false)
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: 21
- name: Run test and Coverage
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: reportAcceptanceTestScoverage reportScoverage reportTestScoverage aggregateScoverage testAggregateTestReport
38 changes: 38 additions & 0 deletions .github/workflows/sonar_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: SonarCloud
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
permissions: read-all
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: zulu # Alternative distribution options are available
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build aggregateScoverage sonar --info
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*.hprof
hs*.log

archived/

docsold/

#Maven exclusions
Expand Down Expand Up @@ -210,4 +212,5 @@ local.properties

.quarkus/
/subprojects/common/ddo-modeling/src/main/avro/
/subprojects/common/ddo-core/src/generated/java/io/truthencode/ddo/core/GeneratedVersion.java
/subprojects/common/ddo-core/src/generated/java/io/truthencode/ddo/core/GeneratedVersion.java
fixle.sh
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.3.1
24 changes: 24 additions & 0 deletions .swm/adjustable-values-and-effects.vlrn49ld.sw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
id: vlrn49ld
title: Adjustable values and Effects
file_version: 1.1.3
app_version: 1.17.0
---

<!--MERMAID {width:100}-->

```mermaid
\---
title: Effect example
\---
erDiagram
EFFECT ||--o{ ADJUSTMENT : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
```

<!--MCONTENT {content: "\\---<br/>\ntitle: Effect example<br/>\n\\---<br/>\nerDiagram<br/>\nEFFECT ||--o{ ADJUSTMENT : places<br/>\nORDER ||--|{ LINE-ITEM : contains<br/>\nCUSTOMER }|..|{ DELIVERY-ADDRESS : uses"} --->

<br/>

This file was generated by Swimm. [Click here to view it in the app](https://app.swimm.io/repos/Z2l0aHViJTNBJTNBZGRvLWNhbGMlM0ElM0F0cnV0aGVuY29kZQ==/docs/vlrn49ld).
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.

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

<br/>

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

<br/>

This file was generated by Swimm. [Click here to view it in the app](https://app.swimm.io/repos/Z2l0aHViJTNBJTNBZGRvLWNhbGMlM0ElM0F0cnV0aGVuY29kZQ==/docs/2sgmr3sq).
5 changes: 4 additions & 1 deletion .swm/swimm.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"repo_id": "Z2l0aHViJTNBJTNBZGRvLWNhbGMlM0ElM0F0cnV0aGVuY29kZQ=="
"repo_id": "Z2l0aHViJTNBJTNBZGRvLWNhbGMlM0ElM0F0cnV0aGVuY29kZQ==",
"configuration": {
"swmd": true
}
}
4 changes: 4 additions & 0 deletions .trunk/configs/.hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Following source doesn't work in most setups
ignored:
- SC1090
- SC1091
19 changes: 13 additions & 6 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 @@ -9,24 +9,31 @@ plugins:
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- hadolint@2.12.0
- terrascan@1.18.3
- checkov@2.4.9
- osv-scanner@1.3.6
- trivy@0.45.0
- trufflehog@3.54.4
- osv-scanner@1.4.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.91.0
- renovate@36.97.3
- scalafmt@3.7.14
- shellcheck@0.9.0
- shfmt@3.6.0
- yamllint@1.32.0
ignore:
- linters: [ALL]
paths:
- incubating/**
- "**/gradlew"
runtimes:
enabled:
- go@1.21.0
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.1.0-alpha] - 2015-12-03

<!-- trunk-ignore(markdownlint/MD024) -->

### Added

[Unreleased]: https://github.com/truthencode/ddo-calc/0.1.0-alpha...HEAD
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* This Kotlin source file was generated by the Gradle "init" task.
*/
package io.truthencode.poc.kantlr.app

import org.antlr.v4.runtime.CharStreams
import org.antlr.v4.runtime.CommonTokenStream
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

class ParserTest {
@Test
fun testGetMessage() {
val ar = "(init { (value 4) , (value 5) , (value 323) })"
val input = CharStreams.fromString("{4,5,323}", "lary")
val lexer = io.truthencode.poc.kantlr.app.ArrayInitLexer(input)
val tokens = CommonTokenStream(lexer)
val parser = io.truthencode.poc.kantlr.app.ArrayInitParser(tokens)

val tree = parser.init()

assertEquals(ar, tree.toStringTree(parser))
}

@Test
fun testRefEnchantmentParser() {
val p: io.truthencode.ddo.grammar.antlr.EnchantmentsParser
}
}
Loading

0 comments on commit 1d2d927

Please sign in to comment.