Skip to content

Commit 0248534

Browse files
committed
ci: decomission of CheckStyle
The following issue won't be fixed: Closes #260 Closes #1015 Part of #1669
1 parent b77bce7 commit 0248534

File tree

53 files changed

+7
-433
lines changed

Some content is hidden

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

53 files changed

+7
-433
lines changed

.github/workflows/static-analysis.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,6 @@ defaults:
1515
shell: bash
1616

1717
jobs:
18-
run-checkstyle:
19-
name: Run CheckStyle
20-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
21-
runs-on: ubuntu-20.04
22-
steps:
23-
- name: Clone source code
24-
uses: actions/[email protected] # https://github.com/actions/checkout
25-
with:
26-
# Whether to configure the token or SSH key with the local git config. Default: true
27-
persist-credentials: false
28-
- name: Install JDK
29-
uses: actions/[email protected] # https://github.com/actions/setup-java
30-
with:
31-
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions
32-
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax
33-
- name: Restore existing cache
34-
uses: actions/[email protected] # https://github.com/actions/cache
35-
with:
36-
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
37-
key: maven-repository-${{ hashFiles('pom.xml') }}
38-
path: ~/.m2/repository
39-
restore-keys: maven-repository-
40-
- name: Run CheckStyle
41-
run: ./src/main/scripts/execute-command.sh checkstyle
4218

4319
run-pmd:
4420
name: Run PMD

pom.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@
569569
<bootstrap.version>3.4.1</bootstrap.version>
570570

571571
<cglib.version>2.2.2</cglib.version>
572-
<checkstyle.plugin.version>2.17</checkstyle.plugin.version>
573572
<clean.plugin.version>3.0.0</clean.plugin.version>
574573

575574
<!-- Redefine default value from spring-boot-dependencies -->
@@ -831,20 +830,6 @@
831830
</configuration>
832831
</plugin>
833832

834-
<plugin>
835-
<groupId>org.apache.maven.plugins</groupId>
836-
<artifactId>maven-checkstyle-plugin</artifactId>
837-
<version>${checkstyle.plugin.version}</version>
838-
<configuration>
839-
<enableRSS>false</enableRSS>
840-
<consoleOutput>true</consoleOutput>
841-
<includeTestSourceDirectory>true</includeTestSourceDirectory>
842-
<linkXRef>false</linkXRef>
843-
<configLocation>${basedir}/src/main/config/checkstyle.xml</configLocation>
844-
<suppressionsLocation>${basedir}/src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
845-
</configuration>
846-
</plugin>
847-
848833
<plugin>
849834
<groupId>org.apache.maven.plugins</groupId>
850835
<artifactId>maven-clean-plugin</artifactId>

src/main/config/checkstyle-suppressions.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/main/config/checkstyle.xml

Lines changed: 0 additions & 276 deletions
This file was deleted.

src/main/java/ru/mystamps/web/common/Pager.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,12 @@ private static List<Integer> createItems(
145145
nextItemsCnt--;
146146
}
147147

148-
// CheckStyle: ignore LineLength for next 3 lines
149148
// we've added too much to the beginning
150149
} else if (prevItemsCnt > ITEMS_BEFORE_CURRENT && nextItemsCnt <= ITEMS_AFTER_CURRENT) {
151150
while (prevItemsCnt > ITEMS_BEFORE_CURRENT && (prevItemsCnt + nextItemsCnt + 1) > MAX_ITEMS) {
152151
prevItemsCnt--;
153152
}
154153

155-
// CheckStyle: ignore LineLength for next 3 lines
156154
// we've added too much to the end
157155
} else if (nextItemsCnt > ITEMS_AFTER_CURRENT && prevItemsCnt <= ITEMS_BEFORE_CURRENT) {
158156
while (nextItemsCnt > ITEMS_AFTER_CURRENT && (prevItemsCnt + nextItemsCnt + 1) > MAX_ITEMS) {

src/main/java/ru/mystamps/web/config/MvcConfig.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
113113
VersionResourceResolver resourceResolver = new VersionResourceResolver()
114114
.addFixedVersionStrategy(ResourceUrl.RESOURCES_VERSION, "/**");
115115

116-
// CheckStyle: ignore MagicNumber for next 1 line
117116
CacheControl cacheControl = CacheControl.maxAge(Duration.ofDays(7));
118117

119118
registry.addResourceHandler("/static/**")
@@ -168,7 +167,6 @@ public void addInterceptors(InterceptorRegistry registry) {
168167
}
169168

170169
@Override
171-
// CheckStyle: ignore LineLength for next 2 lines
172170
// LATER: remove deprecation and usage of setUseSuffixPatternMatch() during upgrade to Spring Framework 5.3
173171
// See: https://docs.spring.io/spring-framework/docs/5.2.22.RELEASE/javadoc-api/org/springframework/web/servlet/config/annotation/PathMatchConfigurer.html#setUseSuffixPatternMatch-java.lang.Boolean-
174172
@SuppressWarnings("deprecation")

src/main/java/ru/mystamps/web/feature/account/JdbcUsersActivationDao.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public class JdbcUsersActivationDao implements UsersActivationDao {
3838
private final String removeByActivationKeySql;
3939
private final String addActivationKeySql;
4040

41-
@SuppressWarnings("checkstyle:linelength")
4241
public JdbcUsersActivationDao(Environment env, NamedParameterJdbcTemplate jdbcTemplate) {
4342
this.jdbcTemplate = jdbcTemplate;
4443
this.findByActivationKeySql = env.getRequiredProperty("users_activation.find_by_activation_key");

0 commit comments

Comments
 (0)