Skip to content

Commit

Permalink
Merge pull request #35 from wyvrtn/test-action
Browse files Browse the repository at this point in the history
ci: Pipelined custom checkstyle config file
  • Loading branch information
wyvrtn authored Dec 13, 2024
2 parents 4c55785 + b2d261c commit 8553908
Show file tree
Hide file tree
Showing 11 changed files with 269 additions and 314 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2.1
orbs:
codecov: codecov/codecov@3
Expand Down
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,22 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.xml]
indent_style = tab
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true


[*.sh]
indent_style = tab
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Bug report
description: Report a problem you encountered
title: "[Bug]: "
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
blank_issues_enabled: false
contact_links:
- name: Help
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Feature request
description: Suggest an idea for this project
title: "[Feature]: "
Expand Down
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
Expand Down
18 changes: 18 additions & 0 deletions .github/scripts/checkstyle-prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -euxo pipefail

echo 'attempting to copy checkstyle-config.xml into super linter directory'

array=()

readarray -d '' array < <(sudo find /var/lib/docker/overlay2/ -type d -name '.automation' -print0)

len=${#array[*]}

i=0

while [ $i -lt "$len" ]; do
sudo cp "${GITHUB_WORKSPACE}"/checkstyle_config.xml "${array[$i]}"
((i++)) || true
done
1 change: 1 addition & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Maven Release on Central

on:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,17 @@ jobs:
# list of files that changed across commits
fetch-depth: 0

- name: Setup Checkstyle
# super linter directory: /var/lib/docker/overlay2/{sha}/diff/action/lib/.automation
run: bash .github/scripts/checkstyle-prepare.sh

- name: Super-linter
uses: super-linter/super-linter@e1cb86b6e8d119f789513668b4b30bf17fe1efe4
env:
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_FILE_NAME: checkstyle_config.xml
VALIDATE_BASH_EXEC: false
VALIDATE_CHECKOV: false
# Disable google-java-format linter as it produces no useful error messages
VALIDATE_GOOGLE_JAVA_FORMAT: false
Expand Down
Loading

0 comments on commit 8553908

Please sign in to comment.