Fix linting warnings

This commit is contained in:
2020-08-22 05:11:59 +02:00
parent bad5322abd
commit eeae982a71
19 changed files with 47 additions and 54 deletions
+4 -1
View File
@@ -1,3 +1,5 @@
@file:Suppress("unused")
package be.simplenotes.persistance.notes
import be.simplenotes.domain.model.Note
@@ -45,7 +47,8 @@ internal interface NoteEntity : Entity<NoteEntity> {
internal fun NoteEntity.toPersistedMetadata(tags: List<String>) = PersistedNoteMetadata(title, tags, updatedAt, uuid)
internal fun NoteEntity.toPersistedNote(tags: List<String>) = PersistedNote(NoteMetadata(title, tags), markdown, html, updatedAt, uuid)
internal fun NoteEntity.toPersistedNote(tags: List<String>) =
PersistedNote(NoteMetadata(title, tags), markdown, html, updatedAt, uuid)
internal fun Note.toEntity(uuid: UUID, userId: Int): NoteEntity {
val note = this
@@ -1,7 +1,6 @@
package be.simplenotes.persistance.users
import be.simplenotes.domain.model.PersistedUser
import be.simplenotes.domain.model.User
import me.liuwj.ktorm.database.*
import me.liuwj.ktorm.entity.*
import me.liuwj.ktorm.schema.*
@@ -26,12 +25,4 @@ internal interface UserEntity : Entity<UserEntity> {
internal fun UserEntity.toPersistedUser() = PersistedUser(username, password, id)
internal fun User.toEntity(): UserEntity {
val user = this
return UserEntity {
this.username = user.username
this.password = user.password
}
}
internal val Database.users get() = this.sequenceOf(Users, withReferences = false)
@@ -175,7 +175,6 @@ internal class NoteRepositoryImplTest {
assertThat(noteRepo.findAll(user2.id, tag = "c"))
.hasSize(1)
}
}
@Nested
@@ -320,8 +319,5 @@ internal class NoteRepositoryImplTest {
assertThat(noteRepo.restore(user1.id, note1.uuid)).isFalse
}
}
}