Skip to content

Commit

Permalink
LintError now implements Serializable interface.
Browse files Browse the repository at this point in the history
This is needed for better Gradle plugin support.
  • Loading branch information
Tapchicoma committed Mar 8, 2021
1 parent 8435fe3 commit da8c3f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- New `ktlint_ignore_back_ticked_identifier` EditorConfig option for `max-line-length` rule to ignore long method names inside backticks
(primarily used in tests) ([#1007](https://github.com/pinterest/ktlint/issues/1007))
- Allow to add/replace loaded `.editorconfig` values via `ExperimentalParams#editorConfigOverride` ([#1016](https://github.com/pinterest/ktlint/issues/1003))
- `ReporterProvider` now implements `Serializable` interface
- `ReporterProvider` and `LintError` now implement `Serializable` interface
### Fixed
- Incorrect indentation with multiple interfaces ([#1003](https://github.com/pinterest/ktlint/issues/1003))
- Empty line before primary constructor is not reported and formatted-out ([#1004](https://github.com/pinterest/ktlint/issues/1004))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.pinterest.ktlint.core

import java.io.Serializable

/**
* Lint error.
*
Expand All @@ -8,7 +10,12 @@ package com.pinterest.ktlint.core
* @param ruleId rule id (prepended with "<ruleSetId>:" in case of non-standard ruleset)
* @param detail error message
*/
data class LintError(val line: Int, val col: Int, val ruleId: String, val detail: String) {
public data class LintError(
val line: Int,
val col: Int,
val ruleId: String,
val detail: String
) : Serializable {

// fixme:
// not included in equals/hashCode for backward-compatibility with ktlint < 0.25.0
Expand All @@ -18,7 +25,7 @@ data class LintError(val line: Int, val col: Int, val ruleId: String, val detail
field = value
}

constructor(
public constructor(
line: Int,
col: Int,
ruleId: String,
Expand Down

0 comments on commit da8c3f6

Please sign in to comment.