Enable reformat for the whole file for the reformat inspection
This commit is contained in:
@@ -34,7 +34,10 @@ import javax.swing.JComponent
|
|||||||
import javax.xml.bind.annotation.XmlAttribute
|
import javax.xml.bind.annotation.XmlAttribute
|
||||||
|
|
||||||
class ReformatInspection : LocalInspectionTool() {
|
class ReformatInspection : LocalInspectionTool() {
|
||||||
@XmlAttribute var processChangedFilesOnly: Boolean = false
|
@XmlAttribute
|
||||||
|
var processChangedFilesOnly: Boolean = false
|
||||||
|
|
||||||
|
override fun runForWholeFile(): Boolean = true
|
||||||
|
|
||||||
override fun checkFile(file: PsiFile, manager: InspectionManager, isOnTheFly: Boolean): Array<out ProblemDescriptor>? {
|
override fun checkFile(file: PsiFile, manager: InspectionManager, isOnTheFly: Boolean): Array<out ProblemDescriptor>? {
|
||||||
if (file !is KtFile || !ProjectRootsUtil.isInProjectSource(file)) {
|
if (file !is KtFile || !ProjectRootsUtil.isInProjectSource(file)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user