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: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,25 @@ assignees: ''
*Describe your bug in detail.*

## Steps to Reproduce

*List in detail the exact steps to reproduce the unexpected behavior.*

## Expected Result

*Explain in detail what behavior you expected to happen.*

## Actual Result

*Explain in detail what behavior actually happened.*

## Your Environment and Setup

* **graphql-java-codegen version**: *X.X.X*
* **Build tool**: *E.g.: Maven/Gradle/SBT*
* **Mapping Config**: *E.g.:*
* **Mapping Config**: *E.g.:*

```xml

<configuration>
<outputDir>${project.build.directory}/generated-sources/graphql</outputDir>
<packageName>io.github.kobylynskyi.graphql.model</packageName>
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/check-code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check Code Style

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
check-code-style:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Check Code Style
env:
WORKDIR: ./
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHECKSTYLE_CONFIG: config/checkstyle/graphql-codegen-check-style.xml
REVIEWDOG_VERSION: v0.11.0
run: |
wget -O - -q https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.41/checkstyle-8.41-all.jar > /opt/checkstyle.jar
wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b /opt ${REVIEWDOG_VERSION}
java -jar /opt/checkstyle.jar "${WORKDIR}" -c "${CHECKSTYLE_CONFIG}" -f xml \
| /opt/reviewdog -f=checkstyle \
-reporter="${INPUT_REPORTER:-github-pr-check}" \
-filter-mode="${INPUT_FILTER_MODE:-added}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR:-false}"
2 changes: 1 addition & 1 deletion .github/workflows/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
jdk-version: [1.8]
jdk-version: [ 1.8 ]
steps:
- uses: actions/checkout@v2

Expand Down
20 changes: 11 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,24 @@ Before sending your pull requests, make sure you followed this list:
- Build the project locally.
- Run Unit Tests and ensure that you have the test coverage for your code.


## Development process

Please follow the steps below in order to make the changes:

1. Clone the repository and open it in your favourite IDE.
1. Clone the repository
2. Checkout **develop** branch.
3. Make code changes to the core library of `graphql-java-codegen`.
4. If changes are required in the plugin code, then **build** and **install** `graphql-java-codegen` first.
3. Open repository in your favourite IDE.
4. Enable and configure CheckStyle plugin in your IDE (for IntelliJ it is CheckStyle-IDEA).
Import [graphql-codegen-check-style.xml](config/checkstyle/graphql-codegen-check-style.xml) as a .
5. Make code changes to the core library of `graphql-java-codegen`.
6. If changes are required in the plugin code, then **build** and **install** `graphql-java-codegen` first.

```shell script
# This will install the library (including your recent changes) in your local maven repository.
./gradlew clean build publishToMavenLocal
```
5. Build the plugin project with updated `graphql-java-codegen` library.

7. Build the plugin project with updated `graphql-java-codegen` library.

```shell script
# Build Gradle plugin
Expand All @@ -37,8 +39,8 @@ Please follow the steps below in order to make the changes:
mvn clean verify
```

6. Make changes to the plugin code
7. Install the plugin (copy to your local maven repository).
8. Make changes to the plugin code
9. Install the plugin (copy to your local maven repository).

```shell script
# Install Gradle plugin
Expand All @@ -49,4 +51,4 @@ Please follow the steps below in order to make the changes:
mvn clean install
```

8. Make sure that `example` projects are compiling and running.
10. Make sure that `example` projects are compiling and running.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
id "org.sonarqube" version "3.1.1"
}

def graphqlCodegenVersion = '4.1.4' // This variable used in the automatic release process
def graphqlCodegenVersion = '4.1.5-SNAPSHOT' // This variable used in the automatic release process

group = "io.github.kobylynskyi"
version = graphqlCodegenVersion
Expand All @@ -22,7 +22,7 @@ repositories {
dependencies {
implementation "org.freemarker:freemarker:2.3.31"
implementation "com.graphql-java:graphql-java:15.0"
implementation "com.fasterxml.jackson.core:jackson-databind:2.12.2"
implementation "com.fasterxml.jackson.core:jackson-databind:2.12.1"

testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.1"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.7.1"
Expand Down
43 changes: 43 additions & 0 deletions config/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">

<suppressions>
<suppress checks=".*"
files=".*[/\\]target[/\\]"/>
<suppress checks=".*"
files=".*[/\\]build[/\\]"/>
<suppress checks=".*"
files=".*[/\\]generated.*[/\\]"/>

<suppress checks="MissingJavadocMethod"
files="[\\/]test[\\/]"/>
<suppress checks="MissingJavadocType"
files="[\\/]test[\\/]"/>
<suppress checks="SingleLineJavadoc"
files="[\\/]test[\\/]"/>
<suppress checks="AvoidEscapedUnicodeCharacters"
files="[\\/]test[\\/]"/>
<suppress checks="VariableDeclarationUsageDistance"
files="[\\/]test[\\/]"/>
<suppress checks="TypeName"
files="[\\/]test[\\/]"/>
<suppress checks="MissingJavadocMethod"
files="[\\/]example.*[\\/]"/>
<suppress checks="MissingJavadocType"
files="[\\/]example.*[\\/]"/>

<suppress checks="LineLength"
files="GraphQLCodegenGradleTask\.java"
lines="0-100"/>

<suppress checks="MethodName"
files="GraphQLResponseProjection\.java"/>

<suppress checks="MemberName"
message="Member name '\$alias'.*"/>

<suppress checks="CustomImportOrder"
message="Wrong lexicographical order for 'java\.[^']+' import\. Should be before 'javax\.[^']+'\."/>
</suppressions>
Loading