Skip to content

Commit

Permalink
Migrate checktyle.xml to the root directory of the project, fix ESLin…
Browse files Browse the repository at this point in the history
…t issues
  • Loading branch information
jdubois committed Sep 20, 2019
1 parent 53d2d40 commit 51163b8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 36 deletions.
2 changes: 1 addition & 1 deletion generators/server/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const serverFiles = {
],
serverBuild: [
{
templates: [{ file: 'config/checkstyle/checkstyle.xml', method: 'copy', noEjs: true }]
templates: [{ file: 'checkstyle.xml', method: 'copy', noEjs: true }]
},
{
condition: generator => generator.buildTool === 'gradle',
Expand Down
13 changes: 13 additions & 0 deletions generators/server/templates/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"https://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">

<!-- Configure checker to use UTF-8 encoding -->
<property name="charset" value="UTF-8"/>
<!-- Configure checker to run on files with these extensions -->
<property name="fileExtensions" value=""/>
<!-- For detailed checkstyle configuration, see https://github.com/spring-io/nohttp/tree/master/nohttp-checkstyle -->
<module name="io.spring.nohttp.checkstyle.check.NoHttpCheck">
</module>
</module>
24 changes: 0 additions & 24 deletions generators/server/templates/config/checkstyle/checkstyle.xml

This file was deleted.

2 changes: 1 addition & 1 deletion generators/server/templates/pom.xml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@
</dependency>
</dependencies>
<configuration>
<configLocation>config/checkstyle/checkstyle.xml</configLocation>
<configLocation>checkstyle.xml</configLocation>
<includes>pom.xml,README.md</includes>
</configuration>
<executions>
Expand Down
13 changes: 3 additions & 10 deletions test/utils/expected-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ const expectedFiles = {
},

gradle: [
'config/checkstyle/checkstyle.xml',
'gradle.properties',
'build.gradle',
'settings.gradle',
Expand All @@ -142,17 +141,11 @@ const expectedFiles = {
'gradle/profile_prod.gradle',
'gradle/sonar.gradle',
'gradle/wrapper/gradle-wrapper.jar',
'gradle/wrapper/gradle-wrapper.properties'
'gradle/wrapper/gradle-wrapper.properties',
'checkstyle.xml'
],

maven: [
'pom.xml',
'mvnw',
'mvnw.cmd',
'.mvn/wrapper/maven-wrapper.jar',
'.mvn/wrapper/maven-wrapper.properties',
'config/checkstyle/checkstyle.xml'
],
maven: ['pom.xml', 'mvnw', 'mvnw.cmd', '.mvn/wrapper/maven-wrapper.jar', '.mvn/wrapper/maven-wrapper.properties', 'checkstyle.xml'],

common: ['.prettierignore', '.prettierrc', 'README.md', '.gitignore', '.gitattributes', '.editorconfig'],

Expand Down

0 comments on commit 51163b8

Please sign in to comment.