Skip to content

Commit

Permalink
Merge pull request #285 from RipplB/fix-formatting
Browse files Browse the repository at this point in the history
Change all reference of codestyle to new path
  • Loading branch information
leventeBajczi authored Jul 27, 2024
2 parents a77c3ad + 4216e40 commit 0c85d3b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/actions/benchexec-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ runs:
- name: Deploy to GHPages
if: github.event_name == 'pull_request'
uses: JamesIves/github-pages-deploy-action@22a6ee251d6f13c6ab1ecb200d974f1a6feb1b8d # v4.4.2
continue-on-error: true # if we are in a fork, this will fail, but we don't care (tables will be missing)
with:
branch: gh-pages
folder: artifacts
Expand All @@ -68,10 +69,11 @@ runs:
- name: Comment on PR
if: github.event_name == 'pull_request'
uses: thollander/actions-comment-pull-request@dadb7667129e23f12ca3925c90dc5cd7121ab57e
continue-on-error: true # if we are in a fork, this will fail, but we don't care (tables will be missing)
with:
comment_tag: 'diffcheck'
mode: 'recreate'
message: |
Benchexec test report for a selection of SV-Benchmarks (correct / incorrect / all):
${{ steps.generate.outputs.Message }}
${{ steps.generate.outputs.Message }}
2 changes: 1 addition & 1 deletion .github/actions/check-formatting/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ runs:
- name: Check for formatting
uses: leventeBajczi/[email protected]
with:
settings-file: "./doc/ThetaIntelliJCodeStyle.xml"
settings-file: "./.idea/codeStyles/Project.xml"
file-mask: "*.java,*.kt"
additional-options: "-dry"
3 changes: 3 additions & 0 deletions .github/workflows/check-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
check-version:
runs-on: ubuntu-latest
steps:
- name: Set java home to java 17
run: |
echo "JAVA_HOME=$(echo $JAVA_HOME_17_X64)" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: New version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reformat-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Do reformat
uses: leventeBajczi/[email protected]
with:
settings-file: "./doc/ThetaIntelliJCodeStyle.xml"
settings-file: "./.idea/codeStyles/Project.xml"
file-mask: ${{ inputs.file_mask }}

- name: Create Pull Request
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
version-bump:
runs-on: ubuntu-latest
steps:
- name: Set java home to java 17
run: |
echo "JAVA_HOME=$(echo $JAVA_HOME_17_X64)" >> $GITHUB_ENV
- uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
id: generate-token
with:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ buildscript {

allprojects {
group = "hu.bme.mit.theta"
version = "6.2.1"
version = "6.2.2"

apply(from = rootDir.resolve("gradle/shared-with-buildSrc/mirrors.gradle.kts"))
}
Expand Down
4 changes: 2 additions & 2 deletions doc/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The `master` branch is protected, meaning direct pushes to the branch are forbid
* The source is up-to-date with the destination.
* The following checks passed:
* License headers are present (and up-to-date) on all files (see [check-copyright.yml](https://github.com/ftsrg/theta/actions/workflows/check-copyright.yml))
* The style guide `ThetaIntelliJCodeStyle.xml` is applied to all files (see [check-formatting.yml](https://github.com/ftsrg/theta/actions/workflows/check-formatting.yml))
* The style guide `.idea/codeStyles/Project.xml` is applied to all files (see [check-formatting.yml](https://github.com/ftsrg/theta/actions/workflows/check-formatting.yml))
* SonarCloud check for code quality succeeds (see job `run-sonar` in [linux-build-test-deploy.yml](https://github.com/ftsrg/theta/actions/workflows/linux-build-test-deploy.yml)), including test coverage criteria (at least 60% of the new code)
* Building and tests succeed for `ubuntu-latest` ([linux-build-test-deploy.yml](https://github.com/ftsrg/theta/actions/workflows/linux-build-test-deploy.yml)), `windows-latest` ([win-build-test.yml](https://github.com/ftsrg/theta/actions/workflows/win-build-test.yml)) and `macos-latest` ([mac-build-test.yml](https://github.com/ftsrg/theta/actions/workflows/mac-build-test.yml)).
* Valid javadoc can be generated (`javadoc` in [linux-build-test-deploy.yml](https://github.com/ftsrg/theta/actions/workflows/linux-build-test-deploy.yml))
Expand All @@ -22,7 +22,7 @@ Administrators are allowed to bypass these rules, but are strongly encouraged _n

## Code style

Theta adopts (with small adjustments) the coding style of [Google](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml) via the `doc/ThetaIntelliJCodeStyle.xml` IntelliJ formatting file. Automatic reformatting of files can either be set up in [IDEA](https://www.jetbrains.com/help/idea/reformat-and-rearrange-code.html), or be done via the [reformat-code.yml](https://github.com/ftsrg/theta/actions/workflows/reformat-code.yml) manually launchable github action, with options for direct commit (not to master) or an automatically opened PR.
Theta adopts (with small adjustments) the coding style of [Google](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml) via the `.idea/codeStyles/Project.xml` IntelliJ formatting file. Automatic reformatting of files can either be set up in [IDEA](https://www.jetbrains.com/help/idea/reformat-and-rearrange-code.html), or be done via the [reformat-code.yml](https://github.com/ftsrg/theta/actions/workflows/reformat-code.yml) manually launchable github action, with options for direct commit (not to master) or an automatically opened PR.

Every file containing code should have the license header defined in `doc/copyright-header.txt`. This behavior can either be set up in [IDEA](https://www.jetbrains.com/help/idea/copyright.html), or be done via the [reapply_copyright.yml](https://github.com/ftsrg/theta/actions/workflows/reapply_copyright.yml) manually launchable github action, with options for direct commit (not to master) or an automatically opened PR.

Expand Down
2 changes: 1 addition & 1 deletion scripts/reformat.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
scriptdir=$(dirname $(realpath "$0"))

docker run -v $scriptdir/..:/github/workspace ghcr.io/leventebajczi/intellij-format:latest '*java,*kts,*kt' "" ./doc/ThetaIntelliJCodeStyle.xml
docker run -v $scriptdir/..:/github/workspace ghcr.io/leventebajczi/intellij-format:latest '*java,*kts,*kt' "" ./.idea/codeStyles/Project.xml

0 comments on commit 0c85d3b

Please sign in to comment.