Skip to content

Commit 2e0f922

Browse files
authored
Merge pull request #67 from xdev-software/develop
Release 1.1.0
2 parents 3371e1c + 45612b9 commit 2e0f922

File tree

85 files changed

+4361
-3476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+4361
-3476
lines changed

.config/checkstyle/checkstyle.xml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
3+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
4+
<module name="Checker">
5+
<!-- Only check code -->
6+
<property name="fileExtensions" value="java"/>
7+
<property name="severity" value="error"/>
8+
9+
<property name="tabWidth" value="4"/>
10+
11+
<module name="SuppressionFilter">
12+
<property name="file" value="${config_loc}/suppressions.xml"/>
13+
</module>
14+
15+
<module name="FileLength"/>
16+
<module name="LineLength">
17+
<property name="max" value="120"/>
18+
<property name="fileExtensions" value="java"/>
19+
<!-- Ignore default + links -->
20+
<property name="ignorePattern" value="(^(package|import))|(^\s*(\/\/|\*) .*https?.*$)"/>
21+
</module>
22+
<module name="NewlineAtEndOfFile"/>
23+
24+
<module name="RegexpSingleline">
25+
<!-- Ignore inside block comments (*) -->
26+
<property name="format" value="[^\s\*][\s]{1,}$"/>
27+
<property name="minimum" value="0"/>
28+
<property name="maximum" value="0"/>
29+
<property name="message" value="Line has trailing whitespaces"/>
30+
</module>
31+
32+
<!-- Generated code -->
33+
<module name="SuppressionSingleFilter">
34+
<property name="checks" value="."/>
35+
<property name="files" value="[\\/]src[\\/]gen(erated)?[\\/].*\.java$"/>
36+
</module>
37+
<!-- Test code -->
38+
<module name="SuppressionSingleFilter">
39+
<property name="checks" value="MagicNumberCheck"/>
40+
<property name="files" value="[\\/]test[\\/].*\.java$"/>
41+
</module>
42+
43+
<!-- Suppressions -->
44+
<module name="SuppressWarningsFilter"/>
45+
<!-- https://github.com/checkstyle/checkstyle/issues/7287 -->
46+
<module name="SuppressWithPlainTextCommentFilter">
47+
<property name="offCommentFormat" value="// CHECKSTYLE\:OFF ([\w\|]+)"/>
48+
<property name="onCommentFormat" value="// CHECKSTYLE\:ON ([\w\|]+)"/>
49+
<property name="checkFormat" value="$1"/>
50+
</module>
51+
52+
<module name="TreeWalker">
53+
<!-- Checks - sorted alphabetically -->
54+
<module name="ArrayTypeStyle"/>
55+
<module name="AvoidStarImport"/>
56+
<module name="ConstantName"/>
57+
<module name="DefaultComesLast"/>
58+
<module name="EmptyBlock"/>
59+
<module name="EmptyCatchBlock"/>
60+
<module name="EmptyForInitializerPad"/>
61+
<module name="EmptyForIteratorPad"/>
62+
<module name="EmptyStatement"/>
63+
<module name="EqualsHashCode"/>
64+
<module name="ExplicitInitialization">
65+
<property name="severity" value="info"/>
66+
</module>
67+
<module name="FinalClass"/>
68+
<module name="FinalParameters"/>
69+
<module name="GenericWhitespace"/>
70+
<module name="HideUtilityClassConstructor"/>
71+
<module name="IllegalImport"/>
72+
<module name="InterfaceIsType"/>
73+
<module name="JavadocStyle">
74+
<property name="checkFirstSentence" value="false"/>
75+
</module>
76+
<module name="LeftCurly">
77+
<!-- Default minus Lambda -->
78+
<property name="tokens" value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, ENUM_DEF, INTERFACE_DEF, LITERAL_CASE, LITERAL_CATCH, LITERAL_DEFAULT, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, METHOD_DEF, OBJBLOCK, STATIC_INIT, RECORD_DEF, COMPACT_CTOR_DEF"/>
79+
<property name="option" value="nl"/>
80+
</module>
81+
<module name="LocalFinalVariableName"/>
82+
<module name="LocalVariableName"/>
83+
<module name="MagicNumber">
84+
<property name="ignoreAnnotation" value="true"/>
85+
<property name="ignoreFieldDeclaration" value="true"/>
86+
<property name="ignoreHashCodeMethod" value="true"/>
87+
<!-- Defaults + other common constant values (e.g. time) -->
88+
<property name="ignoreNumbers" value="-1, 0, 1, 2, 3, 4, 5, 10, 12, 24, 31, 60, 100, 1000"/>
89+
</module>
90+
<module name="MemberName"/>
91+
<module name="MethodLength"/>
92+
<module name="MethodName"/>
93+
<module name="MethodParamPad"/>
94+
<module name="MissingDeprecated"/>
95+
<module name="MissingOverride"/>
96+
<module name="MissingSwitchDefault"/>
97+
<module name="ModifierOrder"/>
98+
<module name="NeedBraces"/>
99+
<module name="NoClone"/>
100+
<module name="NoFinalizer"/>
101+
<module name="NonEmptyAtclauseDescription"/>
102+
<module name="NoWhitespaceAfter"/>
103+
<module name="NoWhitespaceBefore"/>
104+
<module name="OneStatementPerLine"/>
105+
<module name="OneTopLevelClass"/>
106+
<module name="OperatorWrap"/>
107+
<module name="OuterTypeNumber"/>
108+
<module name="PackageName"/>
109+
<module name="ParameterName"/>
110+
<module name="ParenPad"/>
111+
<module name="RedundantImport"/>
112+
<module name="RequireThis"/>
113+
<module name="RightCurly">
114+
<property name="option" value="alone"/>
115+
</module>
116+
<module name="SimplifyBooleanExpression"/>
117+
<module name="StaticVariableName"/>
118+
<module name="StringLiteralEquality"/>
119+
<module name="SuppressWarningsHolder"/>
120+
<module name="TodoComment">
121+
<property name="severity" value="info"/>
122+
</module>
123+
<module name="TypecastParenPad"/>
124+
<module name="TypeName"/>
125+
<module name="UnusedImports"/>
126+
<module name="UpperEll"/>
127+
<module name="VisibilityModifier">
128+
<property name="packageAllowed" value="true"/>
129+
<property name="protectedAllowed" value="true"/>
130+
</module>
131+
<module name="WhitespaceAfter">
132+
<property name="tokens" value="COMMA,SEMI"/>
133+
</module>
134+
<module name="WhitespaceAround">
135+
<property name="tokens"
136+
value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND"/>
137+
</module>
138+
</module>
139+
</module>

.config/checkstyle/suppressions.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE suppressions PUBLIC
3+
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
4+
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
5+
<suppressions>
6+
<suppress files="[\\/]src[\\/]test[\\/]resources[\\/].*\.java$" checks=".*"/>
7+
<suppress
8+
files="[\\/]src[\\/]main[\\/]java[\\/]software[\\/]xdev[\\/]saveactions[\\/].*CustomAccessCanBeTightenedInspection\.java$"
9+
checks=".*"/>
10+
<suppress files="[\\/]src[\\/]test[\\/]java[\\/].*\.java$" checks="MethodName"/>
11+
</suppressions>

.github/workflows/checkBuild.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,45 @@ on:
66
branches: [ develop ]
77
paths-ignore:
88
- '**.md'
9+
- '.config/**'
10+
- '.idea/**'
11+
- 'assets/**'
912
pull_request:
1013
branches: [ develop ]
1114
paths-ignore:
1215
- '**.md'
16+
- '.config/**'
17+
- '.idea/**'
18+
- 'assets/**'
1319

1420
jobs:
1521
build:
1622
runs-on: ubuntu-latest
1723

1824
strategy:
1925
matrix:
20-
java: [17]
26+
java: [17, 21]
2127
distribution: [temurin]
2228

2329
steps:
2430
- uses: actions/checkout@v4
2531

2632
- name: Set up JDK
27-
uses: actions/setup-java@v3
33+
uses: actions/setup-java@v4
2834
with:
2935
distribution: ${{ matrix.distribution }}
3036
java-version: ${{ matrix.java }}
3137
cache: 'gradle'
3238

3339
- name: Build
3440
run: ./gradlew build buildPlugin --info
41+
42+
- name: Try upload test reports when failure occurs
43+
uses: actions/upload-artifact@v4
44+
if: failure()
45+
with:
46+
name: test-reports-${{ matrix.java }}
47+
path: build/reports/tests/test/**
3548

3649
- name: Check for uncommited changes
3750
run: |
@@ -52,8 +65,29 @@ jobs:
5265
fi
5366
5467
- name: Upload plugin files
55-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v4
5669
with:
5770
name: plugin-files-java-${{ matrix.java }}
5871
path: build/libs/intellij-plugin-save-actions-*.jar
5972
if-no-files-found: error
73+
74+
code-style:
75+
runs-on: ubuntu-latest
76+
77+
strategy:
78+
matrix:
79+
java: [17]
80+
distribution: [temurin]
81+
82+
steps:
83+
- uses: actions/checkout@v4
84+
85+
- name: Set up JDK
86+
uses: actions/setup-java@v4
87+
with:
88+
distribution: ${{ matrix.distribution }}
89+
java-version: ${{ matrix.java }}
90+
cache: 'gradle'
91+
92+
- name: Run Checkstyle
93+
run: ./gradlew checkstyleMain checkstyleTest -PcheckstyleEnabled=true
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Check IDE Compatibility
2+
3+
on:
4+
schedule:
5+
- cron: '55 2 * * 1'
6+
workflow_dispatch:
7+
8+
jobs:
9+
check-ide-compatibility:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
java: [17]
15+
distribution: [temurin]
16+
platformType: [IC]
17+
platformVersion: [LATEST-EAP-SNAPSHOT]
18+
19+
steps:
20+
- name: Free up disk space
21+
run: |
22+
sudo df -h
23+
sudo docker system prune -af || true
24+
sudo rm -rf /usr/share/dotnet \
25+
/usr/local/.ghcup \
26+
/usr/local/swift \
27+
/usr/share/swift \
28+
/usr/lib/jvm \
29+
/usr/local/lib/android \
30+
/usr/lib/google-cloud-sdk \
31+
/usr/local/share/boost \
32+
/usr/local/share/powershell \
33+
/usr/local/share/chromium \
34+
/usr/local/lib/node_modules \
35+
/usr/lib/mono \
36+
/usr/lib/heroku \
37+
/usr/lib/firefox \
38+
/usr/share/miniconda \
39+
/opt/microsoft \
40+
/opt/chrome \
41+
/opt/pipx \
42+
"$AGENT_TOOLSDIRECTORY" || true
43+
sudo df -h
44+
45+
- uses: actions/checkout@v4
46+
47+
- name: Set up JDK
48+
uses: actions/setup-java@v4
49+
with:
50+
distribution: ${{ matrix.distribution }}
51+
java-version: ${{ matrix.java }}
52+
53+
- name: Check compatibility
54+
run: ./gradlew runPluginVerifier -PplatformVersion=LATEST-EAP-SNAPSHOT --info

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616

1717
- name: Set up JDK
18-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
1919
with:
2020
java-version: '17'
2121
distribution: 'temurin'
@@ -103,7 +103,7 @@ jobs:
103103
- uses: actions/checkout@v4
104104

105105
- name: Set up JDK
106-
uses: actions/setup-java@v3
106+
uses: actions/setup-java@v4
107107
with:
108108
distribution: 'temurin'
109109
java-version: 17
@@ -124,9 +124,9 @@ jobs:
124124
run: ./gradlew publishPlugin --info --stacktrace
125125

126126
- name: Upload plugin files
127-
uses: actions/upload-artifact@v3
127+
uses: actions/upload-artifact@v4
128128
with:
129-
name: plugin-files-java-${{ matrix.java }}
129+
name: plugin-files
130130
path: build/distributions/*
131131

132132
after_release:

.github/workflows/sonar.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ on:
66
branches: [ develop ]
77
paths-ignore:
88
- '**.md'
9+
- '.config/**'
10+
- '.idea/**'
911
- 'assets/**'
10-
- 'config/**'
1112
pull_request:
1213
types: [opened, synchronize, reopened]
1314
paths-ignore:
1415
- '**.md'
16+
- '.config/**'
17+
- '.idea/**'
1518
- 'assets/**'
16-
- 'config/**'
1719

1820
env:
1921
SONARCLOUD_ORG: ${{ github.event.organization.login }}
@@ -31,20 +33,20 @@ jobs:
3133
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
3234

3335
- name: Set up JDK
34-
uses: actions/setup-java@v3
36+
uses: actions/setup-java@v4
3537
with:
3638
distribution: 'temurin'
3739
java-version: 17
3840

3941
- name: Cache SonarCloud packages
40-
uses: actions/cache@v3
42+
uses: actions/cache@v4
4143
with:
4244
path: ~/.sonar/cache
4345
key: ${{ runner.os }}-sonar
4446
restore-keys: ${{ runner.os }}-sonar
4547

4648
- name: Cache Gradle packages
47-
uses: actions/cache@v3
49+
uses: actions/cache@v4
4850
with:
4951
path: ~/.gradle/caches
5052
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}

.github/workflows/test-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: Set up JDK
16-
uses: actions/setup-java@v3
16+
uses: actions/setup-java@v4
1717
with:
1818
distribution: 'temurin'
1919
java-version: 17
@@ -38,7 +38,7 @@ jobs:
3838
run: ./gradlew publishPlugin --info --stacktrace
3939

4040
- name: Upload plugin files
41-
uses: actions/upload-artifact@v3
41+
uses: actions/upload-artifact@v4
4242
with:
4343
name: plugin-files-java-${{ matrix.java }}
4444
path: build/distributions/*

.github/workflows/update-from-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8787
run: |
8888
gh_pr_up() {
89-
gh pr create -H "${{ env.UPDATE_BRANCH }}" "$@" || git checkout "${{ env.UPDATE_BRANCH }}" && gh pr edit "$@"
89+
gh pr create -H "${{ env.UPDATE_BRANCH }}" "$@" || (git checkout "${{ env.UPDATE_BRANCH }}" && gh pr edit "$@")
9090
}
9191
gh_pr_up -B "${{ steps.main.outputs.current_branch }}" \
9292
--title "Update from template" \

0 commit comments

Comments
 (0)