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
10 changes: 10 additions & 0 deletions .github/ghprcomment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@

You can then run these tests in IntelliJ to reproduce the failing tests locally.
We offer a quick test running howto in the section [Final build system checks](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.html#final-build-system-checks) in our setup guide.
- jobName: format
workflowName: 'Source Code Tests'
message: >
Your code currently does not meet JabRef's code guidelines.
IntelliJ auto format covers some cases.
There seem to be issues with your code style and autoformat configuration.
Please reformat your code (<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>L</kbd>) and commit, then push.


In special cases, consider using `// formatter:off` and `// formatter:on` annotations to allow deviation from the code style.
- jobName: Checkstyle
workflowName: 'Source Code Tests'
message: >
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/tests-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ jobs:
run: |
./gradlew --no-configuration-cache :rewriteDryRun

format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: koppor/intellij-idea-format@update-to-latest-intellij
with:
file-mask: "*.java"
settings-file: "config/IntelliJ Code Style.xml"
# job should fail in case there are changes
- name: Check if any files changed
run: git diff --exit-code

modernizer:
name: Modernizer
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion config/IntelliJ Code Style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
</option>
<option name="RECORD_COMPONENTS_WRAP" value="0" />
<option name="MULTI_CATCH_TYPES_WRAP" value="0" />
<option name="ENABLE_JAVADOC_FORMATTING" value="false" />
</JavaCodeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
Expand Down Expand Up @@ -306,4 +307,4 @@
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
</code_scheme>
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package org.jabref.logic.exporter;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package org.jabref.logic.formatter.bibtexfields;

import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package org.jabref.logic.formatter.bibtexfields;

import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package org.jabref.logic.formatter.bibtexfields;

import org.junit.jupiter.api.BeforeEach;
Expand Down
Loading