Skip to content

Commit

Permalink
reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
a-oselkov committed May 14, 2024
1 parent 41c950d commit 7305cc0
Show file tree
Hide file tree
Showing 31 changed files with 393 additions and 364 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Automatic tests

After completing all the steps in the project, automatic tests will become available to you. Tests are run on each commit - once all tasks in the Hexlet interface are completed, make a commit, and the tests will run automatically.
After completing all the steps in the project, automatic tests will become available to you. Tests are run on each
commit - once all tasks in the Hexlet interface are completed, make a commit, and the tests will run automatically.

The hexlet-check.yml file is responsible for running these tests - do not delete this file, edit it, or rename the repository.
The hexlet-check.yml file is responsible for running these tests - do not delete this file, edit it, or rename the
repository.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
[![Maintainability](https://api.codeclimate.com/v1/badges/ac87fdb9caec56dfac5b/maintainability)](https://codeclimate.com/github/a-oselkov/java-project-73/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/ac87fdb9caec56dfac5b/test_coverage)](https://codeclimate.com/github/a-oselkov/java-project-73/test_coverage)
___
На проекте используется:
На проекте используется:

- Spring Framework(Spring Boot, Web MVC, Security, Data)
- Hibernate ORM
- PostgeSQL
Expand All @@ -12,23 +13,25 @@ ___
- Mapstruct
- OpenApi
- Lombok
___

**Менеджер Задач** | Веб - приложение, система управления задачами. Для работы с приложением предусмотрена регистрация и аутоинтефикация пользователя. Далее пользователь имеет возможность создавать/редактировать/удалять задачи, создавать собственные метки и статусы. При просмотре списка задач предусмотрена фильтрация.
___

**Менеджер Задач** | Веб - приложение, система управления задачами. Для работы с приложением предусмотрена регистрация и
аутоинтефикация пользователя. Далее пользователь имеет возможность создавать/редактировать/удалять задачи, создавать
собственные метки и статусы. При просмотре списка задач предусмотрена фильтрация.

Чтобы ознакомиться с приложением, вы можете зарегистрировать пользователя или воспользоваться тестовым:

Логин: **test@user.com**

Пароль: **111**


https://task-manager-8yjq.onrender.com/users - приложение в сети.

https://task-manager-8yjq.onrender.com/api-docs/swagger-ui/index.html - документация.
___
Для локального запуска:

```
make run
```
Expand Down
200 changes: 100 additions & 100 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,150 +1,150 @@
plugins {
id 'application'
id 'checkstyle'
id 'org.springframework.boot' version '3.0.6'
id 'io.spring.dependency-management' version '1.1.0'
id 'com.adarshr.test-logger' version '2.1.1'
id 'com.github.ben-manes.versions' version '0.38.0'
id 'org.liquibase.gradle' version '2.2.0'
id 'org.springdoc.openapi-gradle-plugin' version '1.3.3'
id 'com.github.johnrengelman.processes' version '0.5.0'
id 'org.siouan.frontend-jdk11' version '6.0.0'
id 'jacoco'
id 'application'
id 'checkstyle'
id 'org.springframework.boot' version '3.0.6'
id 'io.spring.dependency-management' version '1.1.0'
id 'com.adarshr.test-logger' version '2.1.1'
id 'com.github.ben-manes.versions' version '0.38.0'
id 'org.liquibase.gradle' version '2.2.0'
id 'org.springdoc.openapi-gradle-plugin' version '1.3.3'
id 'com.github.johnrengelman.processes' version '0.5.0'
id 'org.siouan.frontend-jdk11' version '6.0.0'
id 'jacoco'
}

group = 'hexlet.code'
version = '1.0-SNAPSHOT'


application {
mainClass = 'hexlet.code.AppApplication'
mainClass = 'hexlet.code.AppApplication'
}

repositories {
mavenCentral()
mavenCentral()
}

wrapper {
gradleVersion = '8.1.1'
distributionType = Wrapper.DistributionType.ALL
gradleVersion = '8.1.1'
distributionType = Wrapper.DistributionType.ALL
}

compileJava {
options.release = 17
options.encoding = 'UTF-8'
options.release = 17
options.encoding = 'UTF-8'
}

dependencies {
developmentOnly 'org.springframework.boot:spring-boot-devtools'
compileOnly 'org.projectlombok:lombok:1.18.28'


testCompileOnly 'org.projectlombok:lombok:1.18.28'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.28'

annotationProcessor(
'org.projectlombok:lombok:1.18.28',
'com.querydsl:querydsl-apt:5.0.0:jakarta',
'jakarta.persistence:jakarta.persistence-api:3.1.0',
'org.mapstruct:mapstruct-processor:1.5.5.Final'
)
developmentOnly 'org.springframework.boot:spring-boot-devtools'

implementation(
'org.springframework.boot:spring-boot-starter-data-jpa',
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-actuator',
'org.springframework.boot:spring-boot-starter-validation',
'org.springframework.boot:spring-boot-starter-security',
'io.jsonwebtoken:jjwt:0.9.1',
'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.0',
'org.liquibase:liquibase-core',
'com.querydsl:querydsl-jpa:5.0.0:jakarta',
'com.rollbar:rollbar-spring-boot-webmvc:1.10.0',
'org.mapstruct:mapstruct:1.5.5.Final'

)

liquibaseRuntime(
sourceSets.main.output,
'org.liquibase:liquibase-core',
'info.picocli:picocli:4.7.1',
'org.liquibase.ext:liquibase-hibernate6:4.21.1',
'org.springframework.boot:spring-boot-starter-data-jpa',
'com.h2database:h2'
)

runtimeOnly (
'com.h2database:h2',
'org.postgresql:postgresql:42.6.0'
)

testImplementation(
'org.springframework.boot:spring-boot-starter-security',
'org.springframework.security:spring-security-test',
'org.springframework.boot:spring-boot-starter-test',
'com.tobedevoured.modelcitizen:spring:0.8.3',
'com.github.database-rider:rider-junit5:1.32.0'
)
developmentOnly 'org.springframework.boot:spring-boot-devtools'
compileOnly 'org.projectlombok:lombok:1.18.28'


testCompileOnly 'org.projectlombok:lombok:1.18.28'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.28'

annotationProcessor(
'org.projectlombok:lombok:1.18.28',
'com.querydsl:querydsl-apt:5.0.0:jakarta',
'jakarta.persistence:jakarta.persistence-api:3.1.0',
'org.mapstruct:mapstruct-processor:1.5.5.Final'
)
developmentOnly 'org.springframework.boot:spring-boot-devtools'

implementation(
'org.springframework.boot:spring-boot-starter-data-jpa',
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-actuator',
'org.springframework.boot:spring-boot-starter-validation',
'org.springframework.boot:spring-boot-starter-security',
'io.jsonwebtoken:jjwt:0.9.1',
'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.0',
'org.liquibase:liquibase-core',
'com.querydsl:querydsl-jpa:5.0.0:jakarta',
'com.rollbar:rollbar-spring-boot-webmvc:1.10.0',
'org.mapstruct:mapstruct:1.5.5.Final'

)

liquibaseRuntime(
sourceSets.main.output,
'org.liquibase:liquibase-core',
'info.picocli:picocli:4.7.1',
'org.liquibase.ext:liquibase-hibernate6:4.21.1',
'org.springframework.boot:spring-boot-starter-data-jpa',
'com.h2database:h2'
)

runtimeOnly(
'com.h2database:h2',
'org.postgresql:postgresql:42.6.0'
)

testImplementation(
'org.springframework.boot:spring-boot-starter-security',
'org.springframework.security:spring-security-test',
'org.springframework.boot:spring-boot-starter-test',
'com.tobedevoured.modelcitizen:spring:0.8.3',
'com.github.database-rider:rider-junit5:1.32.0'
)
}

test {
useJUnitPlatform()
finalizedBy jacocoTestReport
useJUnitPlatform()
finalizedBy jacocoTestReport
}

jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
dependsOn test
reports {
xml.required = true
}
}

diffChangelog {
dependsOn compileJava
dependsOn compileJava
}

liquibase {
activities {
main {
changelogFile 'src/main/resources/db/changelog/db.changelog-master.yaml'
url 'jdbc:h2:./task_manager'
referenceUrl 'hibernate:spring:hexlet.code.model.' +
'?dialect=org.hibernate.dialect.H2Dialect' +
'&hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy'
}
}
activities {
main {
changelogFile 'src/main/resources/db/changelog/db.changelog-master.yaml'
url 'jdbc:h2:./task_manager'
referenceUrl 'hibernate:spring:hexlet.code.model.' +
'?dialect=org.hibernate.dialect.H2Dialect' +
'&hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy'
}
}
}

tasks.named('test') {
useJUnitPlatform()
useJUnitPlatform()
}

frontend {
nodeVersion = '16.13.1'
installScript = 'install'
assembleScript = 'run build'
packageJsonDirectory = file("${projectDir}/frontend")
nodeVersion = '16.13.1'
installScript = 'install'
assembleScript = 'run build'
packageJsonDirectory = file("${projectDir}/frontend")
}

def configFrontendTasks = {
inputs.files(fileTree("$projectDir/frontend").exclude('build', 'node_modules'))
outputs.dir("$buildDir/resources/main/static")
inputs.files(fileTree("$projectDir/frontend").exclude('build', 'node_modules'))
outputs.dir("$buildDir/resources/main/static")
}

assembleFrontend {
configure configFrontendTasks

doLast {
copy {
from "$projectDir/frontend/build"
into "$buildDir/resources/main/static"
}
}
configure configFrontendTasks

doLast {
copy {
from "$projectDir/frontend/build"
into "$buildDir/resources/main/static"
}
}
}

installFrontend {
configure configFrontendTasks
configure configFrontendTasks
}

processResources.dependsOn assembleFrontend
Expand Down
34 changes: 17 additions & 17 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<!--
Expand Down Expand Up @@ -52,7 +52,7 @@
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
<module name="SuppressionFilter">
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}"
default="checkstyle-suppressions.xml" />
default="checkstyle-suppressions.xml"/>
<property name="optional" value="true"/>
</module>

Expand All @@ -72,8 +72,8 @@
<!-- See https://checkstyle.org/config_sizes.html -->
<module name="FileLength"/>
<module name="LineLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
</module>

<!-- Checks for whitespace -->
Expand All @@ -83,10 +83,10 @@
<!-- Miscellaneous other checks. -->
<!-- See https://checkstyle.org/config_misc.html -->
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
<property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
</module>

<!-- Checks for Headers -->
Expand All @@ -100,11 +100,11 @@

<!-- Checks for Javadoc comments. -->
<!-- See https://checkstyle.org/config_javadoc.html -->
<!-- <module name="InvalidJavadocPosition"/>-->
<!-- <module name="JavadocMethod"/>-->
<!-- <module name="JavadocType"/>-->
<!-- <module name="InvalidJavadocPosition"/>-->
<!-- <module name="JavadocMethod"/>-->
<!-- <module name="JavadocType"/>-->
<!-- <module name="JavadocVariable"/> -->
<!-- <module name="JavadocStyle"/>-->
<!-- <module name="JavadocStyle"/>-->
<!-- <module name="MissingJavadocMethod"/> -->

<!-- Checks for Naming Conventions. -->
Expand Down Expand Up @@ -163,18 +163,18 @@
<!-- See https://checkstyle.org/config_coding.html -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<!-- <module name="HiddenField"/>-->
<!-- <module name="HiddenField"/>-->
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<!-- <module name="MagicNumber"/>-->
<!-- <module name="MagicNumber"/>-->
<module name="MissingSwitchDefault"/>
<module name="MultipleVariableDeclarations"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>

<!-- Checks for class design -->
<!-- See https://checkstyle.org/config_design.html -->
<!-- <module name="DesignForExtension"/>-->
<!-- <module name="DesignForExtension"/>-->
<module name="FinalClass"/>
<!-- <module name="HideUtilityClassConstructor"/> -->
<module name="InterfaceIsType"/>
Expand All @@ -190,7 +190,7 @@
<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
<module name="SuppressionXpathFilter">
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
default="checkstyle-xpath-suppressions.xml" />
default="checkstyle-xpath-suppressions.xml"/>
<property name="optional" value="true"/>
</module>

Expand Down
2 changes: 1 addition & 1 deletion frontend/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ rules:
functional/functional-parameters: 0
functional/no-try-statement: 0
functional/no-throw-statement: 0
no-underscore-dangle: [2, { "allow": ["__filename", "__dirname"] }]
no-underscore-dangle: [ 2, { "allow": [ "__filename", "__dirname" ] } ]
testing-library/no-debug: 0
Loading

0 comments on commit 7305cc0

Please sign in to comment.